diff --git a/DEPS b/DEPS
index 1bc1b664..35d5e37 100644
--- a/DEPS
+++ b/DEPS
@@ -138,11 +138,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': '1ae6ac81e68a98067d82b64a22af141a3c06f288',
+  'skia_revision': 'cc84ea1d6c32b61b192a4891cb1e8fc608909c64',
   # 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': 'd3a6eb96bc8dcd4526cfff4bf7cd841ca1ff9578',
+  'v8_revision': '0f67ee5f40b18b9cf8d53c8d12479f4da8abbf1d',
   # 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.
@@ -150,7 +150,7 @@
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling ANGLE
   # and whatever else without interference from each other.
-  'angle_revision': 'eb66fe4e15e8ad4d11eabcdac3ee1e012b06697a',
+  'angle_revision': '74e98f6cb07daf8b9c1d373013cc3b881f2be6c9',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling SwiftShader
   # and whatever else without interference from each other.
@@ -201,7 +201,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': '8db999ee35fffb101c48baf7713006991ef1960e',
+  'catapult_revision': 'bd9775167ba8e71820d2160886ee64cc4dc4985c',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling libFuzzer
   # and whatever else without interference from each other.
@@ -273,7 +273,7 @@
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling feed
   # and whatever else without interference from each other.
-  'dawn_revision': '99b76d1b8fddadd1696dd39fdeee5b074ae45101',
+  'dawn_revision': '41c24ee4eb6960c751993b85e7ff86f7431f449b',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling feed
   # and whatever else without interference from each other.
@@ -807,7 +807,7 @@
 
   # Build tools for Chrome OS. Note: This depends on third_party/pyelftools.
   'src/third_party/chromite': {
-      'url': Var('chromium_git') + '/chromiumos/chromite.git' + '@' + 'ce76d1e960eb22a2f6de4d2bd8f43bbebf8f0feb',
+      'url': Var('chromium_git') + '/chromiumos/chromite.git' + '@' + '3df9c76a49990d758076452ea8aef60da7916085',
       'condition': 'checkout_linux',
   },
 
@@ -1187,7 +1187,7 @@
   },
 
   'src/third_party/perfetto':
-    Var('android_git') + '/platform/external/perfetto.git' + '@' +  '967947db0661a8dc47979a59ba886ae9e872d830',
+    Var('android_git') + '/platform/external/perfetto.git' + '@' +  'dcd49b01615f532d50bdc2aabd619cc2e8204a0a',
 
   'src/third_party/perl': {
       'url': Var('chromium_git') + '/chromium/deps/perl.git' + '@' + '6f3e5028eb65d0b4c5fdd792106ac4c84eee1eb3',
@@ -1355,7 +1355,7 @@
     Var('chromium_git') + '/external/khronosgroup/webgl.git' + '@' + '6f0b34abee8dba611c253738d955c59f703c147a',
 
   'src/third_party/webrtc':
-    Var('webrtc_git') + '/src.git' + '@' + 'f4996d436060f2956549833d9564d680fd68a487',
+    Var('webrtc_git') + '/src.git' + '@' + '2308bb223ef2bd139be6375139832c0cfc4b2849',
 
   'src/third_party/xdg-utils': {
       'url': Var('chromium_git') + '/chromium/deps/xdg-utils.git' + '@' + 'd80274d5869b17b8c9067a1022e4416ee7ed5e0d',
@@ -1396,7 +1396,7 @@
     Var('chromium_git') + '/v8/v8.git' + '@' +  Var('v8_revision'),
 
   'src-internal': {
-    'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@c0cc2343f646de73801b174b3737b4400b8ff42e',
+    'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@45f99e2caaf7bc7ea5f18959cfa5dc3b23316758',
     'condition': 'checkout_src_internal',
   },
 
diff --git a/WATCHLISTS b/WATCHLISTS
index 2f1a0fa..dcc916f 100644
--- a/WATCHLISTS
+++ b/WATCHLISTS
@@ -1972,8 +1972,9 @@
     'autofill_payments': ['jsaul+autofillwatch@google.com'],
     'background_fetch': ['peter@chromium.org',
                          'rayankans+watch@chromium.org',
-                         'nator@chromium.org'],
+                         'nator+watch@chromium.org'],
     'background_sync': ['iclelland+watch@chromium.org',
+                        'nator+watch@chromium.org',
                         'peter@chromium.org',
                         'rayankans+watch@chromium.org'],
     'banners': ['dominickn+watch-banners@chromium.org',
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AndroidScrollIntegrationTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/AndroidScrollIntegrationTest.java
index 965a771..20d47897 100644
--- a/android_webview/javatests/src/org/chromium/android_webview/test/AndroidScrollIntegrationTest.java
+++ b/android_webview/javatests/src/org/chromium/android_webview/test/AndroidScrollIntegrationTest.java
@@ -10,7 +10,6 @@
 import android.content.Context;
 import android.support.test.InstrumentationRegistry;
 import android.support.test.filters.SmallTest;
-import android.view.View;
 
 import org.junit.After;
 import org.junit.Assert;
@@ -197,8 +196,10 @@
         return CommonResources.makeHtmlPageFrom(TEST_PAGE_COMMON_HEADERS, content);
     }
 
-    private void scrollToOnMainSync(final View view, final int xPix, final int yPix) {
+    private void scrollToOnMainSync(final AwTestContainerView view, final int xPix, final int yPix)
+            throws Throwable {
         InstrumentationRegistry.getInstrumentation().runOnMainSync(() -> view.scrollTo(xPix, yPix));
+        mActivityTestRule.waitForVisualStateCallback(view.getAwContents());
     }
 
     private void setMaxScrollOnMainSync(final ScrollTestContainerView testContainerView,
@@ -850,12 +851,8 @@
     }
 
     @Test
-    /**
-     * @SmallTest
-     * @Feature("AndroidWebView")
-     * BUG=977526
-     */
-    @DisabledTest
+    @SmallTest
+    @Feature("AndroidWebView")
     public void testScrollOffsetAfterCapturePicture() throws Throwable {
         final TestAwContentsClient contentsClient = new TestAwContentsClient();
         final ScrollTestContainerView testContainerView =
diff --git a/ash/assistant/ui/assistant_container_view.cc b/ash/assistant/ui/assistant_container_view.cc
index fd869a3..ff5688f 100644
--- a/ash/assistant/ui/assistant_container_view.cc
+++ b/ash/assistant/ui/assistant_container_view.cc
@@ -262,8 +262,10 @@
 }
 
 void AssistantContainerView::AddedToWidget() {
-  GetWidget()->GetNativeWindow()->SetEventTargeter(
-      std::make_unique<AssistantContainerEventTargeter>());
+  // Exclude the Assistant window for occlusion, so it doesn't trigger auto-pip.
+  auto* window = GetWidget()->GetNativeWindow();
+  occlusion_excluder_.emplace(window);
+  window->SetEventTargeter(std::make_unique<AssistantContainerEventTargeter>());
 }
 
 ax::mojom::Role AssistantContainerView::GetAccessibleWindowRole() {
diff --git a/ash/assistant/ui/assistant_container_view.h b/ash/assistant/ui/assistant_container_view.h
index 0d9a751..db3e09ae 100644
--- a/ash/assistant/ui/assistant_container_view.h
+++ b/ash/assistant/ui/assistant_container_view.h
@@ -11,6 +11,8 @@
 #include "ash/assistant/ui/assistant_container_view_focus_traversable.h"
 #include "base/component_export.h"
 #include "base/macros.h"
+#include "base/optional.h"
+#include "ui/aura/window_occlusion_tracker.h"
 #include "ui/views/bubble/bubble_dialog_delegate_view.h"
 
 namespace ash {
@@ -76,6 +78,9 @@
   std::unique_ptr<AssistantContainerViewAnimator> animator_;
   AssistantContainerViewFocusTraversable focus_traversable_;
 
+  base::Optional<aura::WindowOcclusionTracker::ScopedExclude>
+      occlusion_excluder_;
+
   DISALLOW_COPY_AND_ASSIGN(AssistantContainerView);
 };
 
diff --git a/ash/wm/splitview/split_view_controller.cc b/ash/wm/splitview/split_view_controller.cc
index 91e38d37..58c08c6a 100644
--- a/ash/wm/splitview/split_view_controller.cc
+++ b/ash/wm/splitview/split_view_controller.cc
@@ -768,10 +768,10 @@
     const gfx::Rect& new_bounds,
     ui::PropertyChangeReason reason) {
   if (split_view_type_ != SplitViewType::kClamshellType ||
-      reason == ui::PropertyChangeReason::FROM_ANIMATION ||
-      !InSplitViewMode()) {
+      reason == ui::PropertyChangeReason::FROM_ANIMATION) {
     return;
   }
+  DCHECK(InSplitViewMode());
 
   wm::WindowState* window_state = wm::GetWindowState(window);
   const bool is_window_moved = window_state->is_dragged() &&
@@ -1109,37 +1109,14 @@
   UpdateSnappedWindowsAndDividerBounds();
 }
 
-void SplitViewController::OnTabletModeStarting() {
+void SplitViewController::OnTabletModeStarted() {
   split_view_type_ = SplitViewType::kTabletType;
-
-  // If splitview is active when tablet mode is starting, do the clamshell mode
-  // splitview to tablet mode splitview transition by adding the split view
-  // divider bar.
-  if (InSplitViewMode()) {
-    divider_position_ = GetClosestFixedDividerPosition();
-    split_view_divider_ = std::make_unique<SplitViewDivider>(
-        this, GetDefaultSnappedWindow()->GetRootWindow());
-    UpdateSnappedWindowsAndDividerBounds();
-    NotifyDividerPositionChanged();
-  }
 }
 
 void SplitViewController::OnTabletModeEnding() {
-  if (IsClamshellSplitViewModeEnabled()) {
+  if (IsClamshellSplitViewModeEnabled())
     split_view_type_ = SplitViewType::kClamshellType;
-
-    // If splitview is active when tablet mode is ending, simply destroy the
-    // split view divider bar as we don't have the bar in clamshell split view
-    // mode.
-    if (InSplitViewMode())
-      split_view_divider_.reset();
-  } else if (InSplitViewMode()) {
-    // If clamshell splitview mode is not enabled, fall back to the old
-    // behavior: end splitview and overivew and all windows will return to its
-    // old window state before entering tablet mode.
-    EndSplitView();
-    EndOverview();
-  }
+  EndSplitView();
 }
 
 void SplitViewController::OnTabletControllerDestroyed() {
diff --git a/ash/wm/splitview/split_view_controller.h b/ash/wm/splitview/split_view_controller.h
index fcde393..7a4a801 100644
--- a/ash/wm/splitview/split_view_controller.h
+++ b/ash/wm/splitview/split_view_controller.h
@@ -59,17 +59,18 @@
   // top of the screen.
   enum SnapPosition { NONE, LEFT, RIGHT };
 
-  // Why splitview was ended.
+  // Why splitview was ended. For now, all reasons will be kNormal except when
+  // the home launcher button is pressed, an unsnappable window just got
+  // activated, the active user session changed, or the window dragging
+  // started.
   enum class EndReason {
     kNormal = 0,
     kHomeLauncherPressed,
     kUnsnappableWindowActivated,
     kActiveUserChanged,
     kWindowDragStarted,
-    // TODO(edcourtney): Consider not ending Split-View on PIP expand.
-    // See crbug.com/950827.
+    // TODO(950827): Consider not ending Split-View on PIP expand.
     kPipExpanded,
-    kExitTabletMode,
   };
 
   // The behaviors of split view are very different when in tablet mode and in
@@ -191,7 +192,7 @@
                                uint32_t metrics) override;
 
   // TabletModeObserver:
-  void OnTabletModeStarting() override;
+  void OnTabletModeStarted() override;
   void OnTabletModeEnding() override;
   void OnTabletControllerDestroyed() override;
 
diff --git a/ash/wm/splitview/split_view_divider.cc b/ash/wm/splitview/split_view_divider.cc
index 08cf190..bedb6a2b 100644
--- a/ash/wm/splitview/split_view_divider.cc
+++ b/ash/wm/splitview/split_view_divider.cc
@@ -251,7 +251,8 @@
   divider_widget_->Close();
   split_view_window_targeter_.reset();
   for (auto* iter : observed_windows_)
-    RemoveObservedWindow(iter);
+    iter->RemoveObserver(this);
+  observed_windows_.clear();
 }
 
 // static
diff --git a/ash/wm/tablet_mode/tablet_mode_controller.cc b/ash/wm/tablet_mode/tablet_mode_controller.cc
index 126f095..21f55a2 100644
--- a/ash/wm/tablet_mode/tablet_mode_controller.cc
+++ b/ash/wm/tablet_mode/tablet_mode_controller.cc
@@ -906,8 +906,6 @@
 }
 
 void TabletModeController::FinishInitTabletMode() {
-  for (auto& observer : tablet_mode_observers_)
-    observer.OnTabletModeStarting();
   tablet_mode_window_manager_ = std::make_unique<TabletModeWindowManager>();
   tablet_mode_window_manager_->Init();
 
diff --git a/ash/wm/tablet_mode/tablet_mode_observer.h b/ash/wm/tablet_mode/tablet_mode_observer.h
index bcf7a45e..80eec39 100644
--- a/ash/wm/tablet_mode/tablet_mode_observer.h
+++ b/ash/wm/tablet_mode/tablet_mode_observer.h
@@ -13,9 +13,6 @@
 // NOTE: Code in chrome should use TabletModeClientObserver.
 class ASH_EXPORT TabletModeObserver {
  public:
-  // Called when the tablet mode is about to start.
-  virtual void OnTabletModeStarting() {}
-
   // Called when the tablet mode has started. Windows might still be animating
   // though.
   virtual void OnTabletModeStarted() {}
diff --git a/ash/wm/tablet_mode/tablet_mode_window_manager.cc b/ash/wm/tablet_mode/tablet_mode_window_manager.cc
index d73b1bd..cb36af4 100644
--- a/ash/wm/tablet_mode/tablet_mode_window_manager.cc
+++ b/ash/wm/tablet_mode/tablet_mode_window_manager.cc
@@ -9,7 +9,6 @@
 #include "ash/public/cpp/app_types.h"
 #include "ash/public/cpp/ash_switches.h"
 #include "ash/public/cpp/shell_window_ids.h"
-#include "ash/public/cpp/window_properties.h"
 #include "ash/root_window_controller.h"
 #include "ash/scoped_animation_disabler.h"
 #include "ash/session/session_controller_impl.h"
@@ -37,18 +36,25 @@
 
 namespace {
 
-// This function is called to check if window[i] is eligible to be carried over
-// to split view mode during clamshell <-> tablet mode transition. Returns true
-// if windows[i] exists, can snap in split view, is not showing in overview, and
-// is not ARC window.
-// TODO(xdai): Make it work for ARC windows. (see
-// https://crbug.com/922282 and
+// Exits overview mode if it is currently active. Returns true if overview is
+// active before cancelling it.
+bool CancelOverview() {
+  OverviewController* controller = Shell::Get()->overview_controller();
+  if (controller->InOverviewSession()) {
+    controller->EndOverview();
+    return true;
+  }
+  return false;
+}
+
+// Returns true if windows[i] exists, can snap in split view, and is not ARC. A
+// window snapped in clamshell mode must meet these criteria to potentially
+// carry over into tablet mode split view. We want ARC windows to be included,
+// but there is an obstacle (see https://crbug.com/922282 and
 // https://buganizer.corp.google.com/issues/123432223).
-bool IsCarryOverCandidateForSplitView(
-    const MruWindowTracker::WindowList& windows,
-    size_t i) {
+bool IsCandidateForSplitView(const MruWindowTracker::WindowList& windows,
+                             size_t i) {
   return windows.size() > i && CanSnapInSplitview(windows[i]) &&
-         !windows[i]->GetProperty(kIsShowingInOverviewKey) &&
          static_cast<ash::AppType>(windows[i]->GetProperty(
              aura::client::kAppType)) != AppType::ARC_APP;
 }
@@ -67,24 +73,6 @@
     split_view_controller->SnapWindow(windows[i], positions[i]);
 }
 
-// Returns the windows that are currently showing in splitscreen.
-base::flat_map<aura::Window*, WindowStateType> GetWindowsInSplitView() {
-  base::flat_map<aura::Window*, WindowStateType> windows;
-  SplitViewController* split_view_controller =
-      Shell::Get()->split_view_controller();
-  if (split_view_controller && split_view_controller->InSplitViewMode()) {
-    if (split_view_controller->left_window()) {
-      windows.emplace(split_view_controller->left_window(),
-                      WindowStateType::kLeftSnapped);
-    }
-    if (split_view_controller->right_window()) {
-      windows.emplace(split_view_controller->right_window(),
-                      WindowStateType::kRightSnapped);
-    }
-  }
-  return windows;
-}
-
 }  // namespace
 
 // Class which tells tablet mode controller to observe a given window for UMA
@@ -144,19 +132,9 @@
 }
 
 void TabletModeWindowManager::Init() {
-  // There are 3 cases when entering tablet mode:
-  // 1) overview is active but split view is inactive: keep overview active in
-  //    tablet mode.
-  // 2) overview and splitview are both active (splitview can only be active
-  //    when overview is active in clamshell mode): keep overview and splitview
-  //    both active in tablet mode.
-  // 3) overview is inactive: keep the current behavior, i.e.,
-  //    a. if the top window is a snapped window, put it in splitview
-  //    b. if the second top window is also a snapped window and snapped to
-  //       the other side, put it in split view as well. Otherwise, open
-  //       overview on the other side of the screen
-  //    c. if the top window is not a snapped window, maximize all windows
-  //       when entering tablet mode.
+  // The overview mode needs to be ended before the tablet mode is started. To
+  // guarantee the proper order, it will be turned off from here.
+  CancelOverview();
 
   {
     ScopedObserveWindowAnimation scoped_observe(GetTopWindow(), this,
@@ -175,41 +153,10 @@
 }
 
 void TabletModeWindowManager::Shutdown() {
-  // There are 4 cases when exiting tablet mode:
-  // 1) overview is active but split view is inactive: keep overview active in
-  //    clamshell mode.
-  // 2) overview and splitview are both active: keep overview and splitview both
-  //    active in clamshell mode, unless if it's single split state, splitview
-  //    and overview will both be ended.
-  // 3) overview is inactive but split view is active (two snapped windows):
-  //    split view is no longer active. But the two snapped windows will still
-  //    keep snapped in clamshell mode.
-  // 4) overview and splitview are both inactive: keep the current behavior,
-  //    i.e., restore all windows to its window state before entering tablet
-  //    mode.
-
-  // TODO(xdai): Instead of caching snapped windows and their state here, we
-  // should try to see if it can be done in the WindowState::State impl.
-  base::flat_map<aura::Window*, WindowStateType> windows_in_splitview =
-      GetWindowsInSplitView();
-
-  // For case 2 and 3: End splitview mode for two snapped windows case or single
-  // split case to match the clamshell split view behavior. (there is no both
-  // snapped state or single split state in clamshell split view). The windows
-  // will still be kept snapped though.
-  SplitViewController* split_view_controller =
-      Shell::Get()->split_view_controller();
-  if (split_view_controller->InSplitViewMode()) {
-    OverviewController* overview_controller =
-        Shell::Get()->overview_controller();
-    if (!overview_controller->InOverviewSession() ||
-        overview_controller->overview_session()->IsEmpty()) {
-      Shell::Get()->split_view_controller()->EndSplitView(
-          SplitViewController::EndReason::kExitTabletMode);
-      overview_controller->EndOverview();
-    }
-  }
-
+  // Overview mode needs to be ended before exiting tablet mode to prevent
+  // transforming windows which are currently in
+  // overview: http://crbug.com/366605
+  const bool was_in_overview = CancelOverview();
   for (aura::Window* window : added_windows_)
     window->RemoveObserver(this);
   added_windows_.clear();
@@ -222,7 +169,7 @@
 
   ScopedObserveWindowAnimation scoped_observe(GetTopWindow(), this,
                                               /*exiting_tablet_mode=*/true);
-  ArrangeWindowsForClamshellMode(windows_in_splitview);
+  ArrangeWindowsForDesktopMode(was_in_overview);
 }
 
 int TabletModeWindowManager::GetNumberOfManagedWindows() {
@@ -291,7 +238,6 @@
     case SplitViewController::EndReason::kHomeLauncherPressed:
     case SplitViewController::EndReason::kActiveUserChanged:
     case SplitViewController::EndReason::kWindowDragStarted:
-    case SplitViewController::EndReason::kExitTabletMode:
       // For the case of kHomeLauncherPressed, the home launcher will minimize
       // the snapped windows after ending splitview, so avoid maximizing them
       // here. For the case of kActiveUserChanged, the snapped windows will be
@@ -496,7 +442,7 @@
 TabletModeWindowManager::GetSnapPositions(
     const MruWindowTracker::WindowList& windows) const {
   std::vector<SplitViewController::SnapPosition> result;
-  if (!IsCarryOverCandidateForSplitView(windows, 0u))
+  if (!IsCandidateForSplitView(windows, 0u))
     return result;
   switch (GetDesktopWindowStateType(windows[0])) {
     case WindowStateType::kLeftSnapped:
@@ -504,7 +450,7 @@
       // the left in split view. If windows[1] was snapped on the right in
       // desktop mode, then snap windows[1] on the right in split view.
       result.push_back(SplitViewController::LEFT);
-      if (IsCarryOverCandidateForSplitView(windows, 1u) &&
+      if (IsCandidateForSplitView(windows, 1u) &&
           GetDesktopWindowStateType(windows[1]) ==
               WindowStateType::kRightSnapped) {
         result.push_back(SplitViewController::RIGHT);
@@ -515,7 +461,7 @@
       // the right in split view. If windows[1] was snapped on the left in
       // desktop mode, then snap windows[1] on the left in split view.
       result.push_back(SplitViewController::RIGHT);
-      if (IsCarryOverCandidateForSplitView(windows, 1u) &&
+      if (IsCandidateForSplitView(windows, 1u) &&
           GetDesktopWindowStateType(windows[1]) ==
               WindowStateType::kLeftSnapped) {
         result.push_back(SplitViewController::LEFT);
@@ -565,25 +511,11 @@
   DoSplitView(split_view_eligible_windows, snap_positions);
 }
 
-void TabletModeWindowManager::ArrangeWindowsForClamshellMode(
-    base::flat_map<aura::Window*, WindowStateType> windows_in_splitview) {
+void TabletModeWindowManager::ArrangeWindowsForDesktopMode(
+    bool was_in_overview) {
   while (window_state_map_.size()) {
     aura::Window* window = window_state_map_.begin()->first;
-    ForgetWindow(window, /*destroyed=*/false);
-
-    // Arriving here the window state has changed to its clamshell window state.
-    // Since we need to keep the windows that were in splitview still be snapped
-    // in clamshell mode, change its window state to the corresponding snapped
-    // window state.
-    if (windows_in_splitview.find(window) != windows_in_splitview.end() &&
-        IsClamshellSplitViewModeEnabled()) {
-      WindowStateType type = windows_in_splitview[window];
-      const wm::WMEvent event((type == WindowStateType::kLeftSnapped)
-                                  ? wm::WM_EVENT_SNAP_LEFT
-                                  : wm::WM_EVENT_SNAP_RIGHT);
-      wm::GetWindowState(window)->OnWMEvent(&event);
-      windows_in_splitview.erase(window);
-    }
+    ForgetWindow(window, /*destroyed=*/false, was_in_overview);
   }
 }
 
@@ -606,7 +538,8 @@
 }
 
 void TabletModeWindowManager::ForgetWindow(aura::Window* window,
-                                           bool destroyed) {
+                                           bool destroyed,
+                                           bool was_in_overview) {
   added_windows_.erase(window);
   window->RemoveObserver(this);
 
@@ -627,7 +560,7 @@
   } else {
     // By telling the state object to revert, it will switch back the old
     // State object and destroy itself, calling WindowStateDestroyed().
-    it->second->LeaveTabletMode(wm::GetWindowState(it->first));
+    it->second->LeaveTabletMode(wm::GetWindowState(it->first), was_in_overview);
     DCHECK(!IsTrackingWindow(window));
   }
 }
diff --git a/ash/wm/tablet_mode/tablet_mode_window_manager.h b/ash/wm/tablet_mode/tablet_mode_window_manager.h
index 64d82e5..42cec9a 100644
--- a/ash/wm/tablet_mode/tablet_mode_window_manager.h
+++ b/ash/wm/tablet_mode/tablet_mode_window_manager.h
@@ -124,10 +124,9 @@
   void ArrangeWindowsForTabletMode();
 
   // Revert all windows to how they were arranged before tablet mode.
-  // |windows_in_splitview| contains the windows that were in splitview before
-  // entering clamshell mode.
-  void ArrangeWindowsForClamshellMode(
-      base::flat_map<aura::Window*, WindowStateType> windows_in_splitview);
+  // |was_in_overview| indicates whether it was in overview before entering
+  // desktop mode.
+  void ArrangeWindowsForDesktopMode(bool was_in_overview = false);
 
   // If the given window should be handled by us, this function will add it to
   // the list of known windows (remembering the initial show state).
@@ -138,10 +137,13 @@
                    bool snap = false,
                    bool animate_bounds_on_attach = true);
 
-  // Remove a window from our tracking list. If the window is going to be
-  // destroyed, do not restore its old previous window state object as it will
-  // send unnecessary window state change event.
-  void ForgetWindow(aura::Window* window, bool destroyed);
+  // Remove a window from our tracking list. |was_in_overview| used when
+  // |destroyed| is false to help handle leaving tablet mode. If the window is
+  // going to be destroyed, do not restore its old previous window state object
+  // as it will send unnecessary window state change event.
+  void ForgetWindow(aura::Window* window,
+                    bool destroyed,
+                    bool was_in_overview = false);
 
   // Returns true when the given window should be modified in any way by us.
   bool ShouldHandleWindow(aura::Window* window);
diff --git a/ash/wm/tablet_mode/tablet_mode_window_manager_unittest.cc b/ash/wm/tablet_mode/tablet_mode_window_manager_unittest.cc
index 5452f7ae..b760d446 100644
--- a/ash/wm/tablet_mode/tablet_mode_window_manager_unittest.cc
+++ b/ash/wm/tablet_mode/tablet_mode_window_manager_unittest.cc
@@ -6,7 +6,6 @@
 
 #include <string>
 
-#include "ash/public/cpp/ash_features.h"
 #include "ash/public/cpp/ash_switches.h"
 #include "ash/public/cpp/shelf_prefs.h"
 #include "ash/public/cpp/test/shell_test_api.h"
@@ -21,7 +20,6 @@
 #include "ash/test/ash_test_base.h"
 #include "ash/wm/mru_window_tracker.h"
 #include "ash/wm/overview/overview_controller.h"
-#include "ash/wm/splitview/split_view_utils.h"
 #include "ash/wm/switchable_windows.h"
 #include "ash/wm/tablet_mode/tablet_mode_controller.h"
 #include "ash/wm/tablet_mode/tablet_mode_controller_test_api.h"
@@ -35,7 +33,6 @@
 #include "base/run_loop.h"
 #include "base/strings/stringprintf.h"
 #include "base/strings/utf_string_conversions.h"
-#include "base/test/scoped_feature_list.h"
 #include "base/values.h"
 #include "ui/aura/client/aura_constants.h"
 #include "ui/aura/test/test_window_delegate.h"
@@ -1305,6 +1302,33 @@
   EXPECT_EQ(first_dragged_origin.y() + 5, window->bounds().y());
 }
 
+// Test that overview is exited before entering / exiting tablet mode so that
+// the window changes made by TabletModeWindowManager do not conflict with
+// those made in WindowOverview.
+TEST_F(TabletModeWindowManagerTest, ExitsOverview) {
+  // Bounds for windows we know can be controlled.
+  gfx::Rect rect1(10, 10, 200, 50);
+  gfx::Rect rect2(10, 60, 200, 50);
+  std::unique_ptr<aura::Window> w1(
+      CreateWindow(aura::client::WINDOW_TYPE_NORMAL, rect1));
+  std::unique_ptr<aura::Window> w2(
+      CreateWindow(aura::client::WINDOW_TYPE_NORMAL, rect2));
+
+  OverviewController* overview_controller = Shell::Get()->overview_controller();
+  ASSERT_TRUE(overview_controller->StartOverview());
+  ASSERT_TRUE(overview_controller->InOverviewSession());
+  TabletModeWindowManager* manager = CreateTabletModeWindowManager();
+  ASSERT_TRUE(manager);
+  EXPECT_FALSE(overview_controller->InOverviewSession());
+
+  ASSERT_TRUE(overview_controller->StartOverview());
+  ASSERT_TRUE(overview_controller->InOverviewSession());
+  // Destroy the manager again and check that the windows return to their
+  // previous state.
+  DestroyTabletModeWindowManager();
+  EXPECT_FALSE(overview_controller->InOverviewSession());
+}
+
 // Test that an edge swipe from the top will end full screen mode.
 TEST_F(TabletModeWindowManagerTest, ExitFullScreenWithEdgeSwipeFromTop) {
   gfx::Rect rect(10, 10, 200, 50);
@@ -1786,218 +1810,4 @@
   EXPECT_EQ(rect.size(), child->bounds().size());
 }
 
-// Test clamshell mode <-> tablet mode transition if clamshell splitscreen is
-// not enabled.
-TEST_F(TabletModeWindowManagerTest, ClamshellTabletTransitionTest) {
-  gfx::Rect rect(10, 10, 200, 50);
-  std::unique_ptr<aura::Window> window(
-      CreateWindow(aura::client::WINDOW_TYPE_NORMAL, rect));
-
-  // 1. Clamshell -> tablet. If overview is active, it should still be kept
-  // active after transition.
-  OverviewController* overview_controller = Shell::Get()->overview_controller();
-  EXPECT_TRUE(overview_controller->StartOverview());
-  EXPECT_TRUE(overview_controller->InOverviewSession());
-  TabletModeWindowManager* manager = CreateTabletModeWindowManager();
-  EXPECT_TRUE(manager);
-  EXPECT_TRUE(overview_controller->InOverviewSession());
-
-  // 2. Tablet -> Clamshell. If overview is active, it should still be kept
-  // active after transition.
-  DestroyTabletModeWindowManager();
-  EXPECT_TRUE(overview_controller->InOverviewSession());
-
-  // 3. Clamshell -> tablet. If overview is inactive, it should still be kept
-  // inactive after transition. All windows will be maximized.
-  EXPECT_TRUE(overview_controller->EndOverview());
-  EXPECT_FALSE(overview_controller->InOverviewSession());
-  CreateTabletModeWindowManager();
-  EXPECT_FALSE(overview_controller->InOverviewSession());
-  EXPECT_TRUE(wm::GetWindowState(window.get())->IsMaximized());
-
-  // 4. Tablet -> Clamshell. The window should be restored to its old state.
-  DestroyTabletModeWindowManager();
-  EXPECT_FALSE(overview_controller->InOverviewSession());
-  EXPECT_FALSE(wm::GetWindowState(window.get())->IsMaximized());
-
-  // 5. Clamshell -> Tablet. If the window is snapped, it will be carried over
-  // to splitview in tablet mode.
-  const wm::WMEvent event(wm::WM_EVENT_SNAP_LEFT);
-  wm::GetWindowState(window.get())->OnWMEvent(&event);
-  EXPECT_TRUE(wm::GetWindowState(window.get())->IsSnapped());
-  // After transition, we should be in single split screen.
-  CreateTabletModeWindowManager();
-  EXPECT_TRUE(overview_controller->InOverviewSession());
-  EXPECT_TRUE(Shell::Get()->split_view_controller()->InSplitViewMode());
-  EXPECT_TRUE(wm::GetWindowState(window.get())->IsSnapped());
-
-  // 6. Tablet -> Clamshell. Since clamshell splitscreen is not enabled, oveview
-  // and splitview will be both ended, and the window is restored to its old
-  // state.
-  DestroyTabletModeWindowManager();
-  EXPECT_FALSE(overview_controller->InOverviewSession());
-  EXPECT_FALSE(Shell::Get()->split_view_controller()->InSplitViewMode());
-  EXPECT_TRUE(wm::GetWindowState(window.get())->IsSnapped());
-
-  // Create another normal state window to test additional scenarios.
-  std::unique_ptr<aura::Window> window2(
-      CreateWindow(aura::client::WINDOW_TYPE_NORMAL, rect));
-  wm::ActivateWindow(window2.get());
-
-  // 7. Clamshell -> Tablet. Since the top active window is not a snapped
-  // window, all windows will be maximized after the transition.
-  CreateTabletModeWindowManager();
-  EXPECT_TRUE(wm::GetWindowState(window.get())->IsMaximized());
-  EXPECT_TRUE(wm::GetWindowState(window2.get())->IsMaximized());
-
-  // 8. Tablet -> Clamshell. If the two windows are in splitscreen in tablet
-  // mode, after transition they will restore to their old window states.
-  Shell::Get()->split_view_controller()->SnapWindow(window.get(),
-                                                    SplitViewController::LEFT);
-  Shell::Get()->split_view_controller()->SnapWindow(window2.get(),
-                                                    SplitViewController::RIGHT);
-  EXPECT_TRUE(Shell::Get()->split_view_controller()->InSplitViewMode());
-  DestroyTabletModeWindowManager();
-  EXPECT_FALSE(Shell::Get()->split_view_controller()->InSplitViewMode());
-  EXPECT_TRUE(wm::GetWindowState(window.get())->IsSnapped());
-  EXPECT_FALSE(wm::GetWindowState(window2.get())->IsSnapped());
-
-  // 9. Clamshell -> Tablet. If the top two windows are snapped to both sides of
-  // the screen, they will carry over to tablet split view mode.
-  const wm::WMEvent event2(wm::WM_EVENT_SNAP_RIGHT);
-  wm::GetWindowState(window2.get())->OnWMEvent(&event2);
-  CreateTabletModeWindowManager();
-  EXPECT_TRUE(Shell::Get()->split_view_controller()->InSplitViewMode());
-
-  // 10. Tablet -> Clamshell. If overview and splitview are both active, they
-  // will be both ended after the transition.
-  overview_controller->StartOverview();
-  EXPECT_TRUE(overview_controller->InOverviewSession());
-  EXPECT_TRUE(Shell::Get()->split_view_controller()->InSplitViewMode());
-  DestroyTabletModeWindowManager();
-  EXPECT_FALSE(overview_controller->InOverviewSession());
-  EXPECT_FALSE(Shell::Get()->split_view_controller()->InSplitViewMode());
-}
-
-// The class to test TabletModeWindowManagerTest related functionalities when
-// clamshell split screen feature is enabled.
-class TabletModeWindowManagerWithClamshellSplitViewTest
-    : public TabletModeWindowManagerTest {
- public:
-  TabletModeWindowManagerWithClamshellSplitViewTest() = default;
-  ~TabletModeWindowManagerWithClamshellSplitViewTest() override = default;
-
-  // AshTestBase:
-  void SetUp() override {
-    scoped_feature_list_.InitAndEnableFeature(
-        ash::features::kDragToSnapInClamshellMode);
-    TabletModeWindowManagerTest::SetUp();
-    DCHECK(ShouldAllowSplitView());
-  }
-
- private:
-  base::test::ScopedFeatureList scoped_feature_list_;
-  DISALLOW_COPY_AND_ASSIGN(TabletModeWindowManagerWithClamshellSplitViewTest);
-};
-
-// Test clamshell mode <-> tablet mode transition if clamshell splitscreen is
-// enabled.
-TEST_F(TabletModeWindowManagerWithClamshellSplitViewTest,
-       ClamshellTabletTransitionTest) {
-  gfx::Rect rect(10, 10, 200, 50);
-  std::unique_ptr<aura::Window> window(
-      CreateWindow(aura::client::WINDOW_TYPE_NORMAL, rect));
-
-  // 1. Clamshell -> tablet. If overview is active, it should still be kept
-  // active after transition.
-  OverviewController* overview_controller = Shell::Get()->overview_controller();
-  EXPECT_TRUE(overview_controller->StartOverview());
-  EXPECT_TRUE(overview_controller->InOverviewSession());
-  TabletModeWindowManager* manager = CreateTabletModeWindowManager();
-  EXPECT_TRUE(manager);
-  EXPECT_TRUE(overview_controller->InOverviewSession());
-
-  // 2. Tablet -> Clamshell. If overview is active, it should still be kept
-  // active after transition.
-  DestroyTabletModeWindowManager();
-  EXPECT_TRUE(overview_controller->InOverviewSession());
-
-  // 3. Clamshell -> tablet. If overview is inactive, it should still be kept
-  // inactive after transition. All windows will be maximized.
-  EXPECT_TRUE(overview_controller->EndOverview());
-  EXPECT_FALSE(overview_controller->InOverviewSession());
-  CreateTabletModeWindowManager();
-  EXPECT_FALSE(overview_controller->InOverviewSession());
-  EXPECT_TRUE(wm::GetWindowState(window.get())->IsMaximized());
-
-  // 4. Tablet -> Clamshell. The window should be restored to its old state.
-  DestroyTabletModeWindowManager();
-  EXPECT_FALSE(overview_controller->InOverviewSession());
-  EXPECT_FALSE(wm::GetWindowState(window.get())->IsMaximized());
-
-  // 5. Clamshell -> Tablet. If the window is snapped, it will be carried over
-  // to splitview in tablet mode.
-  const wm::WMEvent event(wm::WM_EVENT_SNAP_LEFT);
-  wm::GetWindowState(window.get())->OnWMEvent(&event);
-  EXPECT_TRUE(wm::GetWindowState(window.get())->IsSnapped());
-  // After transition, we should be in single split screen.
-  CreateTabletModeWindowManager();
-  EXPECT_TRUE(overview_controller->InOverviewSession());
-  EXPECT_TRUE(Shell::Get()->split_view_controller()->InSplitViewMode());
-  EXPECT_TRUE(wm::GetWindowState(window.get())->IsSnapped());
-
-  // 6. Tablet -> Clamshell. Since there is only 1 window, splitview and
-  // overview will be both ended. The window will be kept snapped.
-  DestroyTabletModeWindowManager();
-  EXPECT_FALSE(overview_controller->InOverviewSession());
-  EXPECT_FALSE(Shell::Get()->split_view_controller()->InSplitViewMode());
-  EXPECT_TRUE(wm::GetWindowState(window.get())->IsSnapped());
-
-  // Create another normal state window to test additional scenarios.
-  std::unique_ptr<aura::Window> window2(
-      CreateWindow(aura::client::WINDOW_TYPE_NORMAL, rect));
-  wm::ActivateWindow(window2.get());
-  // 7. Clamshell -> Tablet. Since top window is not a snapped window, all
-  // windows will be maximized.
-  CreateTabletModeWindowManager();
-  EXPECT_TRUE(wm::GetWindowState(window.get())->IsMaximized());
-  EXPECT_TRUE(wm::GetWindowState(window2.get())->IsMaximized());
-
-  // 8. Tablet -> Clamshell. If tablet splitscreen is active with two snapped
-  // windows, the two windows will remain snapped in clamshell mode.
-  Shell::Get()->split_view_controller()->SnapWindow(window.get(),
-                                                    SplitViewController::LEFT);
-  Shell::Get()->split_view_controller()->SnapWindow(window2.get(),
-                                                    SplitViewController::RIGHT);
-  EXPECT_TRUE(Shell::Get()->split_view_controller()->InSplitViewMode());
-  EXPECT_FALSE(overview_controller->InOverviewSession());
-  DestroyTabletModeWindowManager();
-  EXPECT_TRUE(wm::GetWindowState(window.get())->IsSnapped());
-  EXPECT_TRUE(wm::GetWindowState(window2.get())->IsSnapped());
-  EXPECT_FALSE(Shell::Get()->split_view_controller()->InSplitViewMode());
-  EXPECT_FALSE(overview_controller->InOverviewSession());
-
-  // 9. Clamshell -> Tablet. If two window are snapped to two sides of the
-  // screen, they will carry over to splitscreen in tablet mode.
-  CreateTabletModeWindowManager();
-  EXPECT_TRUE(Shell::Get()->split_view_controller()->InSplitViewMode());
-  EXPECT_FALSE(overview_controller->InOverviewSession());
-  EXPECT_TRUE(wm::GetWindowState(window.get())->IsSnapped());
-  EXPECT_TRUE(wm::GetWindowState(window2.get())->IsSnapped());
-
-  // 10. Tablet -> Clamshell. If overview and splitview are both active, after
-  // transition, they will remain both active.
-  overview_controller->StartOverview();
-  EXPECT_TRUE(Shell::Get()->split_view_controller()->InSplitViewMode());
-  EXPECT_TRUE(overview_controller->InOverviewSession());
-  DestroyTabletModeWindowManager();
-  EXPECT_TRUE(Shell::Get()->split_view_controller()->InSplitViewMode());
-  EXPECT_TRUE(overview_controller->InOverviewSession());
-
-  // 11. Clamshell -> Tablet. The same as 10.
-  CreateTabletModeWindowManager();
-  EXPECT_TRUE(Shell::Get()->split_view_controller()->InSplitViewMode());
-  EXPECT_TRUE(overview_controller->InOverviewSession());
-}
-
 }  // namespace ash
diff --git a/ash/wm/tablet_mode/tablet_mode_window_state.cc b/ash/wm/tablet_mode/tablet_mode_window_state.cc
index fb155d5..6cc5bcc 100644
--- a/ash/wm/tablet_mode/tablet_mode_window_state.cc
+++ b/ash/wm/tablet_mode/tablet_mode_window_state.cc
@@ -197,19 +197,18 @@
   creator_->WindowStateDestroyed(window_);
 }
 
-void TabletModeWindowState::LeaveTabletMode(wm::WindowState* window_state) {
-  // Only do bounds change animation if the window is the top window or a window
-  // showing in splitview, and the window has changed its state. Otherwise,
-  // restore its bounds immediately.
-  EnterAnimationType animation_type =
-      window_state->IsSnapped() || IsTopWindow(window_state->window())
-          ? DEFAULT
-          : IMMEDIATE;
+void TabletModeWindowState::LeaveTabletMode(wm::WindowState* window_state,
+                                            bool was_in_overview) {
+  // TODO(minch): Keep the current animation if leaving tablet mode from
+  // overview. Need more investigation for windows' transform animation and
+  // updates bounds animation when overview is active.
+  bool use_default = was_in_overview || window_state->IsSnapped() ||
+                     IsTopWindow(window_state->window());
   if (old_state_->GetType() == window_state->GetStateType() &&
       !window_state->IsNormalStateType()) {
-    animation_type = IMMEDIATE;
+    use_default = false;
   }
-  old_state_->set_enter_animation_type(animation_type);
+  old_state_->set_enter_animation_type(use_default ? DEFAULT : IMMEDIATE);
   // Note: When we return we will destroy ourselves with the |our_reference|.
   std::unique_ptr<wm::WindowState::State> our_reference =
       window_state->SetStateObject(std::move(old_state_));
diff --git a/ash/wm/tablet_mode/tablet_mode_window_state.h b/ash/wm/tablet_mode/tablet_mode_window_state.h
index d4b9494..edbe9b99 100644
--- a/ash/wm/tablet_mode/tablet_mode_window_state.h
+++ b/ash/wm/tablet_mode/tablet_mode_window_state.h
@@ -41,7 +41,7 @@
   void set_ignore_wm_events(bool ignore) { ignore_wm_events_ = ignore; }
 
   // Leaves the tablet mode by reverting to previous state object.
-  void LeaveTabletMode(wm::WindowState* window_state);
+  void LeaveTabletMode(wm::WindowState* window_state, bool was_in_overview);
 
   // WindowState::State overrides:
   void OnWMEvent(wm::WindowState* window_state,
diff --git a/base/android/jni_generator/golden/SampleForTests_jni.golden b/base/android/jni_generator/golden/SampleForTests_jni.golden
index 39eaba5..5627f2d8 100644
--- a/base/android/jni_generator/golden/SampleForTests_jni.golden
+++ b/base/android/jni_generator/golden/SampleForTests_jni.golden
@@ -330,7 +330,10 @@
 static std::atomic<jmethodID>
     g_org_chromium_example_jni_1generator_SampleForTests_javaMethodWithAnnotatedParam(nullptr);
 static void Java_SampleForTests_javaMethodWithAnnotatedParam(JNIEnv* env, const
-    base::android::JavaRef<jobject>& obj, JniIntWrapper foo) {
+    base::android::JavaRef<jobject>& obj, JniIntWrapper foo,
+    JniIntWrapper bar,
+    JniIntWrapper baz,
+    JniIntWrapper bat) {
   jclass clazz = org_chromium_example_jni_1generator_SampleForTests_clazz(env);
   CHECK_CLAZZ(env, obj.obj(),
       org_chromium_example_jni_1generator_SampleForTests_clazz(env));
@@ -341,11 +344,11 @@
           env,
           clazz,
           "javaMethodWithAnnotatedParam",
-          "(I)V",
+          "(IIII)V",
           &g_org_chromium_example_jni_1generator_SampleForTests_javaMethodWithAnnotatedParam);
 
      env->CallVoidMethod(obj.obj(),
-          call_context.base.method_id, as_jint(foo));
+          call_context.base.method_id, as_jint(foo), as_jint(bar), as_jint(baz), as_jint(bat));
 }
 
 static std::atomic<jmethodID>
diff --git a/base/android/jni_generator/java/src/org/chromium/example/jni_generator/SampleForTests.java b/base/android/jni_generator/java/src/org/chromium/example/jni_generator/SampleForTests.java
index 095bc7c..5186a80 100644
--- a/base/android/jni_generator/java/src/org/chromium/example/jni_generator/SampleForTests.java
+++ b/base/android/jni_generator/java/src/org/chromium/example/jni_generator/SampleForTests.java
@@ -118,11 +118,12 @@
     private String mArrgh = "*/*";
 
     private @interface SomeAnnotation {}
+    private @interface AnotherAnnotation {}
 
     // The generator is not confused by @Annotated parameters.
     @CalledByNative
-    void javaMethodWithAnnotatedParam(@SomeAnnotation int foo) {
-    }
+    void javaMethodWithAnnotatedParam(@SomeAnnotation int foo, final @SomeAnnotation int bar,
+            @SomeAnnotation final int baz, @SomeAnnotation final @AnotherAnnotation int bat) {}
 
     // ---------------------------------------------------------------------------------------------
     // Java fields which are accessed from C++ code only must be annotated with @AccessedByNative to
diff --git a/base/android/jni_generator/jni_generator.py b/base/android/jni_generator/jni_generator.py
index c618455b..6605e6f 100755
--- a/base/android/jni_generator/jni_generator.py
+++ b/base/android/jni_generator/jni_generator.py
@@ -494,15 +494,15 @@
     for p in params.split(','):
       items = p.split()
 
+      if 'final' in items:
+        items.remove('final')
+
       # Remove @Annotations from parameters.
       annotations = []
       while items[0].startswith('@'):
         annotations.append(items[0])
         del items[0]
 
-      if 'final' in items:
-        items.remove('final')
-
       param = Param(
           annotations=annotations,
           datatype=items[0],
diff --git a/base/android/jni_generator/sample_for_tests.cc b/base/android/jni_generator/sample_for_tests.cc
index 084f559..222a2ff 100644
--- a/base/android/jni_generator/sample_for_tests.cc
+++ b/base/android/jni_generator/sample_for_tests.cc
@@ -272,7 +272,7 @@
   base::android::Java_SampleForTests_methodThatThrowsException(env,
                                                                my_java_object);
   base::android::Java_SampleForTests_javaMethodWithAnnotatedParam(
-      env, my_java_object, 42);
+      env, my_java_object, 42, 13, -1, 99);
 
   base::android::Java_SampleForTests_getInnerInterface(env);
   base::android::Java_SampleForTests_getInnerEnum(env);
diff --git a/build/fuchsia/linux.sdk.sha1 b/build/fuchsia/linux.sdk.sha1
index 8ded134..1590e7b 100644
--- a/build/fuchsia/linux.sdk.sha1
+++ b/build/fuchsia/linux.sdk.sha1
@@ -1 +1 @@
-8909747724204477600
\ No newline at end of file
+8909692773832732224
\ No newline at end of file
diff --git a/build/fuchsia/mac.sdk.sha1 b/build/fuchsia/mac.sdk.sha1
index 53b28401..10cfb7b 100644
--- a/build/fuchsia/mac.sdk.sha1
+++ b/build/fuchsia/mac.sdk.sha1
@@ -1 +1 @@
-8909748353770386640
\ No newline at end of file
+8909691472659940368
\ No newline at end of file
diff --git a/cc/scheduler/compositor_frame_reporting_controller.cc b/cc/scheduler/compositor_frame_reporting_controller.cc
index 23b95a2..e8d8ddc 100644
--- a/cc/scheduler/compositor_frame_reporting_controller.cc
+++ b/cc/scheduler/compositor_frame_reporting_controller.cc
@@ -57,8 +57,10 @@
 
 void CompositorFrameReportingController::WillBeginMainFrame() {
   DCHECK(reporters_[PipelineStage::kBeginImplFrame]);
-  DCHECK_NE(reporters_[PipelineStage::kBeginMainFrame],
-            reporters_[PipelineStage::kBeginImplFrame]);
+  // We need to use .get() below because operator<< in std::unique_ptr is a
+  // C++20 feature.
+  DCHECK_NE(reporters_[PipelineStage::kBeginMainFrame].get(),
+            reporters_[PipelineStage::kBeginImplFrame].get());
   reporters_[PipelineStage::kBeginImplFrame]->StartStage(
       CompositorFrameReporter::StageType::kSendBeginMainFrameToCommit, Now(),
       stage_history_[static_cast<int>(CompositorFrameReporter::StageType::
diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
index fed55922..da467e8 100644
--- a/chrome/android/BUILD.gn
+++ b/chrome/android/BUILD.gn
@@ -2470,6 +2470,7 @@
     "java/src/org/chromium/chrome/browser/background_sync/BackgroundSyncBackgroundTask.java",
     "java/src/org/chromium/chrome/browser/background_sync/BackgroundSyncBackgroundTaskScheduler.java",
     "java/src/org/chromium/chrome/browser/background_sync/BackgroundSyncPwaDetector.java",
+    "java/src/org/chromium/chrome/browser/background_sync/PeriodicBackgroundSyncChromeWakeUpTask.java",
     "java/src/org/chromium/chrome/browser/banners/AppBannerManager.java",
     "java/src/org/chromium/chrome/browser/banners/AppBannerUiDelegateAndroid.java",
     "java/src/org/chromium/chrome/browser/bookmarks/BookmarkBridge.java",
@@ -2670,6 +2671,7 @@
     "java/src/org/chromium/chrome/browser/send_tab_to_self/SendTabToSelfModelObserverBridge.java",
     "java/src/org/chromium/chrome/browser/send_tab_to_self/TargetDeviceInfo.java",
     "java/src/org/chromium/chrome/browser/sessions/SessionTabHelper.java",
+    "java/src/org/chromium/chrome/browser/signin/ChromeSigninManagerDelegate.java",
     "java/src/org/chromium/chrome/browser/signin/IdentityServicesProvider.java",
     "java/src/org/chromium/chrome/browser/signin/ProfileDownloader.java",
     "java/src/org/chromium/chrome/browser/signin/SigninInvestigator.java",
diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java_sources.gni
index 4c3709a..9553d64 100644
--- a/chrome/android/chrome_java_sources.gni
+++ b/chrome/android/chrome_java_sources.gni
@@ -104,6 +104,7 @@
   "java/src/org/chromium/chrome/browser/background_sync/BackgroundSyncBackgroundTaskScheduler.java",
   "java/src/org/chromium/chrome/browser/background_sync/BackgroundSyncBackgroundTask.java",
   "java/src/org/chromium/chrome/browser/background_sync/BackgroundSyncPwaDetector.java",
+  "java/src/org/chromium/chrome/browser/background_sync/PeriodicBackgroundSyncChromeWakeUpTask.java",
   "java/src/org/chromium/chrome/browser/background_task_scheduler/NativeBackgroundTask.java",
   "java/src/org/chromium/chrome/browser/banners/AppBannerManager.java",
   "java/src/org/chromium/chrome/browser/banners/AppBannerUiDelegateAndroid.java",
@@ -1231,7 +1232,6 @@
   "java/src/org/chromium/chrome/browser/preferences/ManagedPreferenceDelegate.java",
   "java/src/org/chromium/chrome/browser/preferences/ManagedPreferenceDelegateCompat.java",
   "java/src/org/chromium/chrome/browser/preferences/ManagedPreferencesUtils.java",
-  "java/src/org/chromium/chrome/browser/preferences/ManageSyncPreferences.java",
   "java/src/org/chromium/chrome/browser/preferences/NotificationsPreferences.java",
   "java/src/org/chromium/chrome/browser/preferences/PrefChangeRegistrar.java",
   "java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java",
@@ -1244,11 +1244,12 @@
   "java/src/org/chromium/chrome/browser/preferences/SeekBarPreference.java",
   "java/src/org/chromium/chrome/browser/preferences/SignInPreference.java",
   "java/src/org/chromium/chrome/browser/preferences/SpinnerPreference.java",
-  "java/src/org/chromium/chrome/browser/preferences/SyncAndServicesPreferences.java",
-  "java/src/org/chromium/chrome/browser/preferences/SyncErrorCardPreference.java",
-  "java/src/org/chromium/chrome/browser/preferences/SyncPreference.java",
-  "java/src/org/chromium/chrome/browser/preferences/SyncPreferenceUtils.java",
-  "java/src/org/chromium/chrome/browser/preferences/SyncedAccountPreference.java",
+  "java/src/org/chromium/chrome/browser/preferences/sync/ManageSyncPreferences.java",
+  "java/src/org/chromium/chrome/browser/preferences/sync/SyncAndServicesPreferences.java",
+  "java/src/org/chromium/chrome/browser/preferences/sync/SyncErrorCardPreference.java",
+  "java/src/org/chromium/chrome/browser/preferences/sync/SyncPreference.java",
+  "java/src/org/chromium/chrome/browser/preferences/sync/SyncPreferenceUtils.java",
+  "java/src/org/chromium/chrome/browser/preferences/sync/SyncedAccountPreference.java",
   "java/src/org/chromium/chrome/browser/preferences/TextAndButtonPreference.java",
   "java/src/org/chromium/chrome/browser/preferences/TextMessagePreference.java",
   "java/src/org/chromium/chrome/browser/preferences/TextMessagePreferenceCompat.java",
diff --git a/chrome/android/chrome_junit_test_java_sources.gni b/chrome/android/chrome_junit_test_java_sources.gni
index 3402759..ea1b563 100644
--- a/chrome/android/chrome_junit_test_java_sources.gni
+++ b/chrome/android/chrome_junit_test_java_sources.gni
@@ -18,6 +18,7 @@
   "junit/src/org/chromium/chrome/browser/autofill/AutofillUiUtilsTest.java",
   "junit/src/org/chromium/chrome/browser/background_sync/BackgroundSyncBackgroundTaskSchedulerTest.java",
   "junit/src/org/chromium/chrome/browser/background_sync/BackgroundSyncBackgroundTaskTest.java",
+  "junit/src/org/chromium/chrome/browser/background_sync/PeriodicBackgroundSyncChromeWakeUpTaskTest.java",
   "junit/src/org/chromium/chrome/browser/background_task_scheduler/NativeBackgroundTaskTest.java",
   "junit/src/org/chromium/chrome/browser/browserservices/ClearDataDialogResultRecorderTest.java",
   "junit/src/org/chromium/chrome/browser/browserservices/ClientAppBroadcastReceiverTest.java",
diff --git a/chrome/android/java/res/xml/account_management_preferences.xml b/chrome/android/java/res/xml/account_management_preferences.xml
index b978d71..38c7a47 100644
--- a/chrome/android/java/res/xml/account_management_preferences.xml
+++ b/chrome/android/java/res/xml/account_management_preferences.xml
@@ -31,7 +31,7 @@
         android:key="child_content_divider"
         android:layout="@layout/divider_preference"/>
 
-    <org.chromium.chrome.browser.preferences.SyncPreference
+    <org.chromium.chrome.browser.preferences.sync.SyncPreference
         android:key="sync_settings"
         android:title="@string/sign_in_sync"/>
 
diff --git a/chrome/android/java/res/xml/main_preferences.xml b/chrome/android/java/res/xml/main_preferences.xml
index 8be6e7d..3be8d13 100644
--- a/chrome/android/java/res/xml/main_preferences.xml
+++ b/chrome/android/java/res/xml/main_preferences.xml
@@ -19,7 +19,7 @@
         android:order="2"
         android:layout="@layout/account_management_account_row"
         android:title="@string/prefs_sync_and_services"
-        android:fragment="org.chromium.chrome.browser.preferences.SyncAndServicesPreferences"/>
+        android:fragment="org.chromium.chrome.browser.preferences.sync.SyncAndServicesPreferences"/>
 
     <PreferenceCategory
         android:key="basics_section"
diff --git a/chrome/android/java/res/xml/sync_and_services_preferences.xml b/chrome/android/java/res/xml/sync_and_services_preferences.xml
index fbe47faa..fd596892 100644
--- a/chrome/android/java/res/xml/sync_and_services_preferences.xml
+++ b/chrome/android/java/res/xml/sync_and_services_preferences.xml
@@ -35,7 +35,7 @@
         <org.chromium.chrome.browser.preferences.ChromeBasePreference
             android:key="manage_sync"
             android:title="@string/manage_sync_title"
-            android:fragment="org.chromium.chrome.browser.preferences.ManageSyncPreferences"/>
+            android:fragment="org.chromium.chrome.browser.preferences.sync.ManageSyncPreferences"/>
     </PreferenceCategory>
 
     <PreferenceCategory
diff --git a/chrome/android/java/res/xml/sync_customization_preferences.xml b/chrome/android/java/res/xml/sync_customization_preferences.xml
index fb975c2..7b38bd64 100644
--- a/chrome/android/java/res/xml/sync_customization_preferences.xml
+++ b/chrome/android/java/res/xml/sync_customization_preferences.xml
@@ -6,7 +6,7 @@
 <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto">
 
-    <org.chromium.chrome.browser.preferences.SyncErrorCardPreference
+    <org.chromium.chrome.browser.preferences.sync.SyncErrorCardPreference
         android:key="sync_error_card"
         android:icon="@drawable/sync_error"
         app:iconTint="@color/default_red"
@@ -17,7 +17,7 @@
         android:title="@string/sign_in_sync"
         android:summary="@string/sync_description" />
 
-    <org.chromium.chrome.browser.preferences.SyncedAccountPreference
+    <org.chromium.chrome.browser.preferences.sync.SyncedAccountPreference
         android:key="synced_account" />
 
     <PreferenceCategory
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/background_sync/BackgroundSyncBackgroundTask.java b/chrome/android/java/src/org/chromium/chrome/browser/background_sync/BackgroundSyncBackgroundTask.java
index 86eb1ca..a457c9dc 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/background_sync/BackgroundSyncBackgroundTask.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/background_sync/BackgroundSyncBackgroundTask.java
@@ -48,7 +48,7 @@
 
         // Call into native code to fire any ready background sync events, and
         // wait for it to finish doing so.
-        BackgroundSyncBackgroundTaskJni.get().fireBackgroundSyncEvents(
+        BackgroundSyncBackgroundTaskJni.get().fireOneShotBackgroundSyncEvents(
                 () -> { callback.taskFinished(/* needsReschedule= */ false); });
     }
 
@@ -73,11 +73,13 @@
 
     @Override
     public void reschedule(Context context) {
-        BackgroundSyncBackgroundTaskScheduler.getInstance().reschedule();
+        BackgroundSyncBackgroundTaskScheduler.getInstance().reschedule(
+                BackgroundSyncBackgroundTaskScheduler.BackgroundSyncTask
+                        .ONE_SHOT_SYNC_CHROME_WAKE_UP);
     }
 
     @NativeMethods
     interface Natives {
-        void fireBackgroundSyncEvents(Runnable callback);
+        void fireOneShotBackgroundSyncEvents(Runnable callback);
     }
 }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/background_sync/BackgroundSyncBackgroundTaskScheduler.java b/chrome/android/java/src/org/chromium/chrome/browser/background_sync/BackgroundSyncBackgroundTaskScheduler.java
index 48c5137b..83206ac 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/background_sync/BackgroundSyncBackgroundTaskScheduler.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/background_sync/BackgroundSyncBackgroundTaskScheduler.java
@@ -5,11 +5,13 @@
 package org.chromium.chrome.browser.background_sync;
 
 import android.os.Bundle;
+import android.support.annotation.IntDef;
 import android.text.format.DateUtils;
 
 import org.chromium.base.ContextUtils;
 import org.chromium.base.VisibleForTesting;
 import org.chromium.base.annotations.CalledByNative;
+import org.chromium.chrome.browser.background_task_scheduler.NativeBackgroundTask;
 import org.chromium.components.background_task_scheduler.BackgroundTaskSchedulerFactory;
 import org.chromium.components.background_task_scheduler.TaskIds;
 import org.chromium.components.background_task_scheduler.TaskInfo;
@@ -22,6 +24,21 @@
  * Thread model: This class is to be run on the UI thread only.
  */
 public class BackgroundSyncBackgroundTaskScheduler {
+    /**
+     * Denotes the types of one-off Background Tasks scheduled through this
+     * class.
+     * ONE_SHOT_SYNC_CHROME_WAKE_UP is the task that processes one-shot
+     * Background Sync registrations.
+     * PERIODIC_SYNC_CHROME_WAKE_UP processes Periodic Background Sync
+     * registrations.
+     */
+    @IntDef({BackgroundSyncTask.ONE_SHOT_SYNC_CHROME_WAKE_UP,
+            BackgroundSyncTask.PERIODIC_SYNC_CHROME_WAKE_UP})
+    public @interface BackgroundSyncTask {
+        int ONE_SHOT_SYNC_CHROME_WAKE_UP = 0;
+        int PERIODIC_SYNC_CHROME_WAKE_UP = 1;
+    };
+
     // Keep in sync with the default min_sync_recovery_time of
     // BackgroundSyncParameters.
     private static final long MIN_SYNC_RECOVERY_TIME = DateUtils.MINUTE_IN_MILLIS * 6;
@@ -41,38 +58,71 @@
     }
 
     /**
-     * Cancels a task with Id BACKGROUND_SYNC_ONE_SHOT_JOB_ID, if there's one
-     * scheduled.
+     * Returns the appropriate TaskID to use based on the type of the Background
+     * Sync task we're working with.
+     *
+     * @param taskType Type of the Background Sync task to get the TaskID for.
      */
     @VisibleForTesting
-    protected void cancelOneShotTask() {
-        BackgroundTaskSchedulerFactory.getScheduler().cancel(
-                ContextUtils.getApplicationContext(), TaskIds.BACKGROUND_SYNC_ONE_SHOT_JOB_ID);
+    public static int getAppropriateTaskId(@BackgroundSyncTask int taskType) {
+        switch (taskType) {
+            case BackgroundSyncTask.ONE_SHOT_SYNC_CHROME_WAKE_UP:
+                return TaskIds.BACKGROUND_SYNC_ONE_SHOT_JOB_ID;
+            case BackgroundSyncTask.PERIODIC_SYNC_CHROME_WAKE_UP:
+                return TaskIds.PERIODIC_BACKGROUND_SYNC_CHROME_WAKEUP_TASK_JOB_ID;
+            default:
+                assert false : "Incorrect Background Sync task type";
+                return -1;
+        }
     }
 
     /**
-     * Schedules a one-off bakground task to wake the browser up on network
-     * connectivity. There is a delay of of six minutes before waking the
-     * browser.
+     * Returns the appropriate task class to use based on the type of the Background
+     * Sync task we're working with.
+     *
+     * @param taskType Type of the Background Sync task to get the task class for.
      */
-    protected boolean scheduleOneShotTask() {
-        return scheduleOneShotTask(MIN_SYNC_RECOVERY_TIME);
+    @VisibleForTesting
+    public static Class<? extends NativeBackgroundTask> getAppropriateTaskClass(
+            @BackgroundSyncTask int taskType) {
+        switch (taskType) {
+            case BackgroundSyncTask.ONE_SHOT_SYNC_CHROME_WAKE_UP:
+                return BackgroundSyncBackgroundTask.class;
+            case BackgroundSyncTask.PERIODIC_SYNC_CHROME_WAKE_UP:
+                return PeriodicBackgroundSyncChromeWakeUpTask.class;
+            default:
+                assert false : "Incorrect Background Sync task type";
+                return null;
+        }
+    }
+
+    /**
+     * Cancels a Background Sync one-off task, if there's one scheduled.
+     *
+     * @param taskType The type of BackgroundSync task to cancel.
+     */
+    @VisibleForTesting
+    protected void cancelOneOffTask(@BackgroundSyncTask int taskType) {
+        BackgroundTaskSchedulerFactory.getScheduler().cancel(
+                ContextUtils.getApplicationContext(), getAppropriateTaskId(taskType));
     }
 
     /**
      * Schedules a one-off background task to wake the browser up on network
-     * connectivity and call into native code to fire ready Background Sync
+     * connectivity and call into native code to fire ready periodic Background Sync
      * events.
+     *
      * @param minDelayMs The minimum time to wait before waking the browser.
+     * @param taskType   The type of BackgroundSync task to schedule.
      */
-    protected boolean scheduleOneShotTask(long minDelayMs) {
+    protected boolean scheduleOneOffTask(long minDelayMs, @BackgroundSyncTask int taskType) {
         // Pack SOONEST_EXPECTED_WAKETIME in extras.
         Bundle taskExtras = new Bundle();
         taskExtras.putLong(SOONEST_EXPECTED_WAKETIME, System.currentTimeMillis() + minDelayMs);
 
         TaskInfo taskInfo =
-                TaskInfo.createOneOffTask(TaskIds.BACKGROUND_SYNC_ONE_SHOT_JOB_ID,
-                                BackgroundSyncBackgroundTask.class, minDelayMs, Integer.MAX_VALUE)
+                TaskInfo.createOneOffTask(getAppropriateTaskId(taskType),
+                                getAppropriateTaskClass(taskType), minDelayMs, Integer.MAX_VALUE)
                         .setRequiredNetworkType(TaskInfo.NetworkType.ANY)
                         .setUpdateCurrent(true)
                         .setIsPersisted(true)
@@ -84,28 +134,31 @@
     }
 
     /**
-     * Based on shouldLaunch, either creates or cancels a one-off background task
-     * to wake up Chrome upon network connectivity.
+     * Based on shouldLaunch, either creates or cancels a one-off background task to
+     * wake up Chrome upon network connectivity.
+     *
      * @param shouldLaunch Whether to launch the browser in the background.
-     * @param minDelayMs The minimum time to wait before waking the browser.
+     * @param minDelayMs   The minimum time to wait before waking the browser.
      */
     @VisibleForTesting
     @CalledByNative
     protected void launchBrowserIfStopped(boolean shouldLaunch, long minDelayMs) {
         if (!shouldLaunch) {
-            cancelOneShotTask();
+            cancelOneOffTask(BackgroundSyncTask.ONE_SHOT_SYNC_CHROME_WAKE_UP);
             return;
         }
 
-        scheduleOneShotTask(minDelayMs);
+        scheduleOneOffTask(minDelayMs, BackgroundSyncTask.ONE_SHOT_SYNC_CHROME_WAKE_UP);
     }
 
     /**
      * Method for rescheduling a background task to wake up Chrome for processing
-     * one-shot Background Sync events in the event of an OS upgrade or
-     * Google Play Services upgrade.
+     * Background Sync events in the event of an OS upgrade or Google Play Services
+     * upgrade.
+     *
+     * @param taskType The type of BackgroundSync task to reschedule.
      */
-    public void reschedule() {
-        scheduleOneShotTask(MIN_SYNC_RECOVERY_TIME);
+    public void reschedule(@BackgroundSyncTask int taskType) {
+        scheduleOneOffTask(MIN_SYNC_RECOVERY_TIME, taskType);
     }
 }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/background_sync/PeriodicBackgroundSyncChromeWakeUpTask.java b/chrome/android/java/src/org/chromium/chrome/browser/background_sync/PeriodicBackgroundSyncChromeWakeUpTask.java
new file mode 100644
index 0000000..bbcdac8
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/background_sync/PeriodicBackgroundSyncChromeWakeUpTask.java
@@ -0,0 +1,87 @@
+// Copyright 2019 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.chrome.browser.background_sync;
+
+import android.content.Context;
+
+import org.chromium.base.annotations.NativeMethods;
+import org.chromium.base.metrics.RecordHistogram;
+import org.chromium.chrome.browser.DeviceConditions;
+import org.chromium.chrome.browser.background_task_scheduler.NativeBackgroundTask;
+import org.chromium.components.background_task_scheduler.BackgroundTask.TaskFinishedCallback;
+import org.chromium.components.background_task_scheduler.TaskIds;
+import org.chromium.components.background_task_scheduler.TaskParameters;
+import org.chromium.net.ConnectionType;
+
+/**
+ * Handles servicing of Periodic Background Sync tasks to wake up Chrome.
+ */
+public class PeriodicBackgroundSyncChromeWakeUpTask extends NativeBackgroundTask {
+    @Override
+    public @StartBeforeNativeResult int onStartTaskBeforeNativeLoaded(
+            Context context, TaskParameters taskParameters, TaskFinishedCallback callback) {
+        assert taskParameters.getTaskId()
+                == TaskIds.PERIODIC_BACKGROUND_SYNC_CHROME_WAKEUP_TASK_JOB_ID;
+
+        // Check that we've been called with network connectivity.
+        @ConnectionType
+        int current_network_type = DeviceConditions.getCurrentNetConnectionType(context);
+        if (current_network_type == ConnectionType.CONNECTION_NONE
+                || current_network_type == ConnectionType.CONNECTION_UNKNOWN) {
+            return StartBeforeNativeResult.RESCHEDULE;
+        }
+
+        return StartBeforeNativeResult.LOAD_NATIVE;
+    }
+
+    @Override
+    protected void onStartTaskWithNative(
+            Context context, TaskParameters taskParameters, TaskFinishedCallback callback) {
+        // Record the delay from soonest expected wakeup time.
+        long delayFromExpectedMs = System.currentTimeMillis()
+                - taskParameters.getExtras().getLong(
+                        BackgroundSyncBackgroundTaskScheduler.SOONEST_EXPECTED_WAKETIME);
+        RecordHistogram.recordLongTimesHistogram(
+                "BackgroundSync.Periodic.Wakeup.DelayTime", delayFromExpectedMs);
+
+        // Call into native code to fire any ready background sync events, and
+        // wait for it to finish doing so.
+        PeriodicBackgroundSyncChromeWakeUpTaskJni.get().firePeriodicBackgroundSyncEvents(
+                () -> { callback.taskFinished(/* needsReschedule= */ false); });
+    }
+
+    @Override
+    protected boolean onStopTaskBeforeNativeLoaded(Context context, TaskParameters taskParameters) {
+        assert taskParameters.getTaskId()
+                == TaskIds.PERIODIC_BACKGROUND_SYNC_CHROME_WAKEUP_TASK_JOB_ID;
+
+        // Native didn't complete loading, but it was supposed to.
+        // Presume we need to reschedule.
+        return true;
+    }
+
+    @Override
+    protected boolean onStopTaskWithNative(Context context, TaskParameters taskParameters) {
+        assert taskParameters.getTaskId()
+                == TaskIds.PERIODIC_BACKGROUND_SYNC_CHROME_WAKEUP_TASK_JOB_ID;
+
+        // The method is called when the task was interrupted due to some reason.
+        // It is not called when the task finishes successfully. Reschedule so
+        // we can attempt it again.
+        return true;
+    }
+
+    @Override
+    public void reschedule(Context context) {
+        BackgroundSyncBackgroundTaskScheduler.getInstance().reschedule(
+                BackgroundSyncBackgroundTaskScheduler.BackgroundSyncTask
+                        .PERIODIC_SYNC_CHROME_WAKE_UP);
+    }
+
+    @NativeMethods
+    interface Natives {
+        void firePeriodicBackgroundSyncEvents(Runnable callback);
+    }
+}
\ No newline at end of file
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunSignInProcessor.java b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunSignInProcessor.java
index 2c6362b..2f98a44 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunSignInProcessor.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunSignInProcessor.java
@@ -13,7 +13,7 @@
 import org.chromium.base.VisibleForTesting;
 import org.chromium.chrome.browser.ChromeFeatureList;
 import org.chromium.chrome.browser.preferences.PreferencesLauncher;
-import org.chromium.chrome.browser.preferences.SyncAndServicesPreferences;
+import org.chromium.chrome.browser.preferences.sync.SyncAndServicesPreferences;
 import org.chromium.chrome.browser.signin.AccountManagementFragment;
 import org.chromium.chrome.browser.signin.SigninManager;
 import org.chromium.chrome.browser.signin.SigninManager.SignInCallback;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/MainPreferences.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/MainPreferences.java
index e3096f1..e31b1e2 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/MainPreferences.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/MainPreferences.java
@@ -24,6 +24,7 @@
 import org.chromium.chrome.browser.preferences.autofill_assistant.AutofillAssistantPreferences;
 import org.chromium.chrome.browser.preferences.datareduction.DataReductionPreferenceFragment;
 import org.chromium.chrome.browser.preferences.developer.DeveloperPreferences;
+import org.chromium.chrome.browser.preferences.sync.SyncPreferenceUtils;
 import org.chromium.chrome.browser.search_engines.TemplateUrlServiceFactory;
 import org.chromium.chrome.browser.signin.SigninManager;
 import org.chromium.chrome.browser.sync.ProfileSyncService;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/SignInPreference.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/SignInPreference.java
index 6ec0fec0..6200ffe 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/SignInPreference.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/SignInPreference.java
@@ -17,6 +17,7 @@
 import org.chromium.chrome.R;
 import org.chromium.chrome.browser.ChromeFeatureList;
 import org.chromium.chrome.browser.firstrun.FirstRunSignInProcessor;
+import org.chromium.chrome.browser.preferences.sync.SyncPreferenceUtils;
 import org.chromium.chrome.browser.signin.AccountManagementFragment;
 import org.chromium.chrome.browser.signin.AccountSigninActivity;
 import org.chromium.chrome.browser.signin.DisplayableProfileData;
@@ -85,7 +86,7 @@
     /**
      * Starts listening for updates to the sign-in and sync state.
      */
-    void registerForUpdates() {
+    public void registerForUpdates() {
         AccountManagerFacade.get().addObserver(this);
         SigninManager.get().addSignInAllowedObserver(this);
         mProfileDataCache.addObserver(this);
@@ -104,7 +105,7 @@
      * Stops listening for updates to the sign-in and sync state. Every call to registerForUpdates()
      * must be matched with a call to this method.
      */
-    void unregisterForUpdates() {
+    public void unregisterForUpdates() {
         AccountManagerFacade.get().removeObserver(this);
         SigninManager.get().removeSignInAllowedObserver(this);
         mProfileDataCache.removeObserver(this);
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/PrivacyPreferences.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/PrivacyPreferences.java
index 45b329c7..a55626ef 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/PrivacyPreferences.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/PrivacyPreferences.java
@@ -26,7 +26,7 @@
 import org.chromium.chrome.browser.preferences.PrefServiceBridge;
 import org.chromium.chrome.browser.preferences.PreferenceUtils;
 import org.chromium.chrome.browser.preferences.PreferencesLauncher;
-import org.chromium.chrome.browser.preferences.SyncAndServicesPreferences;
+import org.chromium.chrome.browser.preferences.sync.SyncAndServicesPreferences;
 import org.chromium.chrome.browser.profiles.Profile;
 import org.chromium.chrome.browser.usage_stats.UsageStatsConsentDialog;
 import org.chromium.ui.text.NoUnderlineClickableSpan;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/ManageSyncPreferences.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/sync/ManageSyncPreferences.java
similarity index 98%
rename from chrome/android/java/src/org/chromium/chrome/browser/preferences/ManageSyncPreferences.java
rename to chrome/android/java/src/org/chromium/chrome/browser/preferences/sync/ManageSyncPreferences.java
index c78c629..418654bdc 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/ManageSyncPreferences.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/sync/ManageSyncPreferences.java
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-package org.chromium.chrome.browser.preferences;
+package org.chromium.chrome.browser.preferences.sync;
 
 import android.app.DialogFragment;
 import android.app.FragmentManager;
@@ -29,6 +29,8 @@
 import org.chromium.chrome.browser.autofill.PersonalDataManager;
 import org.chromium.chrome.browser.help.HelpAndFeedback;
 import org.chromium.chrome.browser.invalidation.InvalidationController;
+import org.chromium.chrome.browser.preferences.ChromeSwitchPreference;
+import org.chromium.chrome.browser.preferences.PreferenceUtils;
 import org.chromium.chrome.browser.profiles.Profile;
 import org.chromium.chrome.browser.sync.ProfileSyncService;
 import org.chromium.chrome.browser.sync.ui.PassphraseCreationDialogFragment;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/sync/OWNERS b/chrome/android/java/src/org/chromium/chrome/browser/preferences/sync/OWNERS
new file mode 100644
index 0000000..1ade9cf9
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/sync/OWNERS
@@ -0,0 +1,5 @@
+bsazonov@chromium.org
+treib@chromium.org
+
+# TEAM: chrome-signin@chromium.org
+# COMPONENT: Services>SignIn
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/SyncAndServicesPreferences.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/sync/SyncAndServicesPreferences.java
similarity index 98%
rename from chrome/android/java/src/org/chromium/chrome/browser/preferences/SyncAndServicesPreferences.java
rename to chrome/android/java/src/org/chromium/chrome/browser/preferences/sync/SyncAndServicesPreferences.java
index b8ad9fe7..ae431db 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/SyncAndServicesPreferences.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/sync/SyncAndServicesPreferences.java
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-package org.chromium.chrome.browser.preferences;
+package org.chromium.chrome.browser.preferences.sync;
 
 import android.accounts.Account;
 import android.app.Dialog;
@@ -41,6 +41,12 @@
 import org.chromium.chrome.browser.help.HelpAndFeedback;
 import org.chromium.chrome.browser.invalidation.InvalidationController;
 import org.chromium.chrome.browser.metrics.UmaSessionStats;
+import org.chromium.chrome.browser.preferences.ChromeSwitchPreference;
+import org.chromium.chrome.browser.preferences.ManagedPreferenceDelegate;
+import org.chromium.chrome.browser.preferences.PrefServiceBridge;
+import org.chromium.chrome.browser.preferences.PreferenceUtils;
+import org.chromium.chrome.browser.preferences.Preferences;
+import org.chromium.chrome.browser.preferences.SignInPreference;
 import org.chromium.chrome.browser.preferences.privacy.PrivacyPreferencesManager;
 import org.chromium.chrome.browser.profiles.Profile;
 import org.chromium.chrome.browser.signin.SigninManager;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/SyncErrorCardPreference.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/sync/SyncErrorCardPreference.java
similarity index 91%
rename from chrome/android/java/src/org/chromium/chrome/browser/preferences/SyncErrorCardPreference.java
rename to chrome/android/java/src/org/chromium/chrome/browser/preferences/sync/SyncErrorCardPreference.java
index 7b4bb3b2..18d9da2 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/SyncErrorCardPreference.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/sync/SyncErrorCardPreference.java
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-package org.chromium.chrome.browser.preferences;
+package org.chromium.chrome.browser.preferences.sync;
 
 import android.content.Context;
 import android.util.AttributeSet;
@@ -13,6 +13,7 @@
 
 import org.chromium.base.ApiCompatibilityUtils;
 import org.chromium.chrome.R;
+import org.chromium.chrome.browser.preferences.ChromeBasePreference;
 import org.chromium.ui.UiUtils;
 
 /**
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/SyncPreference.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/sync/SyncPreference.java
similarity index 95%
rename from chrome/android/java/src/org/chromium/chrome/browser/preferences/SyncPreference.java
rename to chrome/android/java/src/org/chromium/chrome/browser/preferences/sync/SyncPreference.java
index 8179fdf..adc21b1 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/SyncPreference.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/sync/SyncPreference.java
@@ -1,7 +1,7 @@
 // Copyright 2016 The Chromium Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
-package org.chromium.chrome.browser.preferences;
+package org.chromium.chrome.browser.preferences.sync;
 
 import android.content.Context;
 import android.preference.Preference;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/SyncPreferenceUtils.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/sync/SyncPreferenceUtils.java
similarity index 99%
rename from chrome/android/java/src/org/chromium/chrome/browser/preferences/SyncPreferenceUtils.java
rename to chrome/android/java/src/org/chromium/chrome/browser/preferences/sync/SyncPreferenceUtils.java
index ad3e76a..9f0c4f2 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/SyncPreferenceUtils.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/sync/SyncPreferenceUtils.java
@@ -1,7 +1,7 @@
 // Copyright 2019 The Chromium Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
-package org.chromium.chrome.browser.preferences;
+package org.chromium.chrome.browser.preferences.sync;
 
 import android.app.Activity;
 import android.content.Context;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/SyncedAccountPreference.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/sync/SyncedAccountPreference.java
similarity index 97%
rename from chrome/android/java/src/org/chromium/chrome/browser/preferences/SyncedAccountPreference.java
rename to chrome/android/java/src/org/chromium/chrome/browser/preferences/sync/SyncedAccountPreference.java
index f298dc5..6502ff3 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/SyncedAccountPreference.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/sync/SyncedAccountPreference.java
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-package org.chromium.chrome.browser.preferences;
+package org.chromium.chrome.browser.preferences.sync;
 
 import android.accounts.Account;
 import android.content.Context;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/signin/AccountManagementFragment.java b/chrome/android/java/src/org/chromium/chrome/browser/signin/AccountManagementFragment.java
index ba22be8b..b458f78 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/signin/AccountManagementFragment.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/signin/AccountManagementFragment.java
@@ -39,7 +39,7 @@
 import org.chromium.chrome.browser.preferences.PrefServiceBridge;
 import org.chromium.chrome.browser.preferences.Preferences;
 import org.chromium.chrome.browser.preferences.PreferencesLauncher;
-import org.chromium.chrome.browser.preferences.SyncPreference;
+import org.chromium.chrome.browser.preferences.sync.SyncPreference;
 import org.chromium.chrome.browser.profiles.Profile;
 import org.chromium.chrome.browser.profiles.ProfileAccountManagementMetrics;
 import org.chromium.chrome.browser.signin.SignOutDialogFragment.SignOutDialogListener;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/signin/ChromeSigninManagerDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/signin/ChromeSigninManagerDelegate.java
index 107e5fb..822d7b4 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/signin/ChromeSigninManagerDelegate.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/signin/ChromeSigninManagerDelegate.java
@@ -11,6 +11,7 @@
 import org.chromium.base.Callback;
 import org.chromium.base.VisibleForTesting;
 import org.chromium.base.annotations.JCaller;
+import org.chromium.base.annotations.NativeMethods;
 import org.chromium.chrome.browser.externalauth.ExternalAuthUtils;
 import org.chromium.chrome.browser.externalauth.UserRecoverableErrorHandler;
 import org.chromium.components.sync.AndroidSyncSettings;
@@ -21,6 +22,7 @@
  */
 public class ChromeSigninManagerDelegate implements SigninManagerDelegate {
     private final AndroidSyncSettings mAndroidSyncSettings;
+    private long mNativeChromeSigninManagerDelegate;
 
     public ChromeSigninManagerDelegate() {
         this(AndroidSyncSettings.get());
@@ -30,12 +32,21 @@
     ChromeSigninManagerDelegate(AndroidSyncSettings androidSyncSettings) {
         assert androidSyncSettings != null;
         mAndroidSyncSettings = androidSyncSettings;
+        mNativeChromeSigninManagerDelegate = ChromeSigninManagerDelegateJni.get().init(this);
     }
 
     @Override
-    public String getManagementDomain(
-            @JCaller SigninManager self, long nativeSigninManagerAndroid) {
-        return SigninManagerJni.get().getManagementDomain(self, nativeSigninManagerAndroid);
+    public void destroy() {
+        if (mNativeChromeSigninManagerDelegate != 0) {
+            ChromeSigninManagerDelegateJni.get().destroy(this, mNativeChromeSigninManagerDelegate);
+            mNativeChromeSigninManagerDelegate = 0;
+        }
+    }
+
+    @Override
+    public String getManagementDomain() {
+        return ChromeSigninManagerDelegateJni.get().getManagementDomain(
+                this, mNativeChromeSigninManagerDelegate);
     }
 
     @Override
@@ -52,23 +63,21 @@
     }
 
     @Override
-    public void isAccountManaged(@JCaller SigninManager signinManager,
-            long nativeSigninManagerAndroid, String email, final Callback<Boolean> callback) {
-        SigninManagerJni.get().isAccountManaged(
-                signinManager, nativeSigninManagerAndroid, email, callback);
+    public void isAccountManaged(String email, final Callback<Boolean> callback) {
+        ChromeSigninManagerDelegateJni.get().isAccountManaged(
+                this, mNativeChromeSigninManagerDelegate, email, callback);
     }
 
     @Override
-    public void fetchAndApplyCloudPolicy(@JCaller SigninManager signinManager,
-            long nativeSigninManagerAndroid, String username, Runnable callback) {
-        SigninManagerJni.get().fetchAndApplyCloudPolicy(
-                signinManager, nativeSigninManagerAndroid, username, callback);
+    public void fetchAndApplyCloudPolicy(String username, final Runnable callback) {
+        ChromeSigninManagerDelegateJni.get().fetchAndApplyCloudPolicy(
+                this, mNativeChromeSigninManagerDelegate, username, callback);
     }
 
     @Override
-    public void stopApplyingCloudPolicy(
-            @JCaller SigninManager signinManager, long nativeSigninManagerAndroid) {
-        SigninManagerJni.get().abortSignIn(signinManager, nativeSigninManagerAndroid);
+    public void stopApplyingCloudPolicy() {
+        ChromeSigninManagerDelegateJni.get().stopApplyingCloudPolicy(
+                this, mNativeChromeSigninManagerDelegate);
     }
 
     @Override
@@ -91,4 +100,26 @@
                     signinManager, nativeSigninManagerAndroid, wipeDataCallback);
         }
     }
+
+    // Native methods.
+    @NativeMethods
+    interface Natives {
+        long init(@JCaller ChromeSigninManagerDelegate self);
+
+        void destroy(
+                @JCaller ChromeSigninManagerDelegate self, long nativeChromeSigninManagerDelegate);
+
+        void fetchAndApplyCloudPolicy(@JCaller ChromeSigninManagerDelegate self,
+                long nativeChromeSigninManagerDelegate, String username, Runnable callback);
+
+        void stopApplyingCloudPolicy(
+                @JCaller ChromeSigninManagerDelegate self, long nativeChromeSigninManagerDelegate);
+
+        void isAccountManaged(@JCaller ChromeSigninManagerDelegate self,
+                long nativeChromeSigninManagerDelegate, String username,
+                Callback<Boolean> callback);
+
+        String getManagementDomain(
+                @JCaller ChromeSigninManagerDelegate self, long nativeChromeSigninManagerDelegate);
+    }
 }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninFragment.java b/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninFragment.java
index 48461d7f..b3e625e 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninFragment.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninFragment.java
@@ -13,7 +13,7 @@
 import org.chromium.chrome.R;
 import org.chromium.chrome.browser.preferences.PrefServiceBridge;
 import org.chromium.chrome.browser.preferences.PreferencesLauncher;
-import org.chromium.chrome.browser.preferences.SyncAndServicesPreferences;
+import org.chromium.chrome.browser.preferences.sync.SyncAndServicesPreferences;
 
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninManager.java b/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninManager.java
index 35211da6..c798d66 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninManager.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninManager.java
@@ -178,7 +178,7 @@
     private static SigninManager sSigninManager;
     private static int sSignInAccessPoint = SigninAccessPoint.UNKNOWN;
 
-    private final long mNativeSigninManagerAndroid;
+    private long mNativeSigninManagerAndroid;
     private final Context mContext;
     private final SigninManagerDelegate mDelegate;
     private final AccountTrackerService mAccountTrackerService;
@@ -248,6 +248,13 @@
     }
 
     /**
+     * Perform destruction of the object, cascading destruction to delegate.
+     */
+    public void destroy() {
+        mDelegate.destroy();
+    }
+
+    /**
     * Log the access point when the user see the view of choosing account to sign in.
     * @param accessPoint the enum value of AccessPoint defined in signin_metrics.h.
     */
@@ -441,7 +448,7 @@
         }
 
         Log.d(TAG, "Checking if account has policy management enabled");
-        mDelegate.fetchAndApplyCloudPolicy(this, mNativeSigninManagerAndroid,
+        mDelegate.fetchAndApplyCloudPolicy(
                 mSignInState.mAccount.name, this::onPolicyFetchedBeforeSignIn);
     }
 
@@ -582,7 +589,7 @@
      * Returns the management domain if the signed in account is managed, otherwise returns null.
      */
     public String getManagementDomain() {
-        return mDelegate.getManagementDomain(this, mNativeSigninManagerAndroid);
+        return mDelegate.getManagementDomain();
     }
 
     @VisibleForTesting
@@ -610,7 +617,7 @@
             signInState.mCallback.onSignInAborted();
         }
 
-        mDelegate.stopApplyingCloudPolicy(this, mNativeSigninManagerAndroid);
+        mDelegate.stopApplyingCloudPolicy();
 
         Log.d(TAG, "Signin flow aborted.");
         notifySignInAllowedChanged();
@@ -684,7 +691,7 @@
      *                 otherwise.
      */
     public void isAccountManaged(String email, final Callback<Boolean> callback) {
-        mDelegate.isAccountManaged(this, mNativeSigninManagerAndroid, email, callback);
+        mDelegate.isAccountManaged(email, callback);
     }
 
     public static String extractDomainName(String email) {
@@ -706,19 +713,12 @@
 
         boolean isForceSigninEnabled(@JCaller SigninManager self, long nativeSigninManagerAndroid);
 
-        void fetchAndApplyCloudPolicy(@JCaller SigninManager self, long nativeSigninManagerAndroid,
-                String username, Runnable callback);
-
-        void abortSignIn(@JCaller SigninManager self, long nativeSigninManagerAndroid);
-
         void onSignInCompleted(
                 @JCaller SigninManager self, long nativeSigninManagerAndroid, String username);
 
         void signOut(@JCaller SigninManager self, long nativeSigninManagerAndroid,
                 @SignoutReason int reason);
 
-        String getManagementDomain(@JCaller SigninManager self, long nativeSigninManagerAndroid);
-
         void wipeProfileData(
                 @JCaller SigninManager self, long nativeSigninManagerAndroid, Runnable callback);
 
@@ -731,9 +731,6 @@
 
         boolean isSignedInOnNative(@JCaller SigninManager self, long nativeSigninManagerAndroid);
 
-        void isAccountManaged(@JCaller SigninManager self, long nativeSigninManagerAndroid,
-                String username, Callback<Boolean> callback);
-
         String extractDomainName(String email);
     }
 }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninManagerDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninManagerDelegate.java
index 30c943e..ea6b907 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninManagerDelegate.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninManagerDelegate.java
@@ -18,6 +18,11 @@
  */
 public interface SigninManagerDelegate {
     /**
+     * Perform destruction of the object, including destructing the associated native object.
+     */
+    public void destroy();
+
+    /**
      * If there is no Google Play Services available, ask the user to fix by showing either a
      * notification or a modal dialog
      * @param activity The activity used to open the dialog, or null to use notifications
@@ -28,7 +33,7 @@
     /**
      * @return the management domain if the signed in account is managed, otherwise null.
      */
-    public String getManagementDomain(@JCaller SigninManager self, long nativeSigninManagerAndroid);
+    public String getManagementDomain();
 
     /**
      * @return Whether the device has Google Play Services.
@@ -38,37 +43,23 @@
     /**
      * Verifies if the account is managed. Callback may be called either synchronously or
      * asynchronously depending on the availability of the result.
-     * @param signinManager a reference on SigninManager used for the native calls
-     * @param nativeSigninManagerAndroid a reference on the native SigninManager used for native
-     *                                   calls
      * @param email An email of the account.
      * @param callback The callback that will receive true if the account is managed, false
      *                 otherwise.
      */
-    public void isAccountManaged(@JCaller SigninManager signinManager,
-            long nativeSigninManagerAndroid, String email, final Callback<Boolean> callback);
+    public void isAccountManaged(String email, final Callback<Boolean> callback);
 
     /**
-     * Interact with the UserPolicySigninService to retrieve the user policy if necessary.
-     * @param signinManager a reference on SigninManager used for the native calls
-     * @param nativeSigninManagerAndroid a reference on the native SigninManager used for native
-     *                                   calls
-     * @param username (email) of the account signing in.
-     * @param callback The callback called once the policy is retrieved and applied. This is always
-     *                 called, even if the user is not managed and no policy was retrieved or
-     *                 applied.
+     * Interact with the UserPolicySigninService to retrieve the user policy.
+     * @param username (email) of the user signing in.
+     * @param callback The callback called once the policy is retrieved and applied
      */
-    public void fetchAndApplyCloudPolicy(@JCaller SigninManager signinManager,
-            long nativeSigninManagerAndroid, String username, Runnable callback);
+    public void fetchAndApplyCloudPolicy(String username, Runnable callback);
 
     /**
      * Perform the required cloud policy cleanup when a signin is aborted.
-     * @param signinManager a reference on SigninManager used for the native calls
-     * @param nativeSigninManagerAndroid a reference on the native SigninManager used for native
-     *                                   calls
      */
-    public void stopApplyingCloudPolicy(
-            @JCaller SigninManager signinManager, long nativeSigninManagerAndroid);
+    public void stopApplyingCloudPolicy();
 
     /**
      * Called AFTER native sign-in is complete, enabling Sync.
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/sync/GoogleServiceAuthError.java b/chrome/android/java/src/org/chromium/chrome/browser/sync/GoogleServiceAuthError.java
index 376ea7e7..bb1b650 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/sync/GoogleServiceAuthError.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/sync/GoogleServiceAuthError.java
@@ -17,9 +17,8 @@
  */
 public class GoogleServiceAuthError {
     @IntDef({State.NONE, State.INVALID_GAIA_CREDENTIALS, State.USER_NOT_SIGNED_UP,
-            State.CONNECTION_FAILED, State.ACCOUNT_DELETED, State.ACCOUNT_DISABLED,
-            State.SERVICE_UNAVAILABLE, State.REQUEST_CANCELED, State.UNEXPECTED_SERVICE_RESPONSE,
-            State.SERVICE_ERROR})
+            State.CONNECTION_FAILED, State.SERVICE_UNAVAILABLE, State.REQUEST_CANCELED,
+            State.UNEXPECTED_SERVICE_RESPONSE, State.SERVICE_ERROR})
     @Retention(RetentionPolicy.SOURCE)
     public @interface State {
         // The user is authenticated.
@@ -44,11 +43,13 @@
         // captcha() will provide details about the associated challenge.
         // int CAPTCHA_REQUIRED = 4;
 
+        // DEPRECATED.
         // The user account has been deleted.
-        int ACCOUNT_DELETED = 5;
+        // int ACCOUNT_DELETED = 5;
 
+        // DEPRECATED.
         // The user account has been disabled.
-        int ACCOUNT_DISABLED = 6;
+        // int ACCOUNT_DISABLED = 6;
 
         // The service is not available; try again later.
         int SERVICE_UNAVAILABLE = 7;
@@ -88,15 +89,9 @@
             case State.SERVICE_UNAVAILABLE:
                 return R.string.sync_error_service_unavailable;
             // case State.NONE:
-            // case State.USER_NOT_SIGNED_UP:
-            // case State.CAPTCHA_REQUIRED:
-            // case State.ACCOUNT_DELETED:
-            // case State.ACCOUNT_DISABLED:
-            // case State.TWO_FACTOR:
             // case State.REQUEST_CANCELED:
             // case State.UNEXPECTED_SERVICE_RESPONSE:
             // case State.SERVICE_ERROR:
-            // case State.WEB_LOGIN_REQUIRED:
             default:
                 return R.string.sync_error_generic;
         }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/sync/SyncAccountSwitcher.java b/chrome/android/java/src/org/chromium/chrome/browser/sync/SyncAccountSwitcher.java
index 5baedcb8..01f5f2f2 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/sync/SyncAccountSwitcher.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/sync/SyncAccountSwitcher.java
@@ -9,7 +9,7 @@
 import android.support.v4.app.FragmentActivity;
 import android.text.TextUtils;
 
-import org.chromium.chrome.browser.preferences.SyncedAccountPreference;
+import org.chromium.chrome.browser.preferences.sync.SyncedAccountPreference;
 import org.chromium.chrome.browser.signin.AccountSigninActivity;
 import org.chromium.chrome.browser.signin.ConfirmImportSyncDataDialog;
 import org.chromium.chrome.browser.signin.ConfirmImportSyncDataDialog.ImportSyncType;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/sync/SyncNotificationController.java b/chrome/android/java/src/org/chromium/chrome/browser/sync/SyncNotificationController.java
index e9f242e6..3959e0c 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/sync/SyncNotificationController.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/sync/SyncNotificationController.java
@@ -25,7 +25,7 @@
 import org.chromium.chrome.browser.notifications.PendingIntentProvider;
 import org.chromium.chrome.browser.notifications.channels.ChannelDefinitions;
 import org.chromium.chrome.browser.preferences.PreferencesLauncher;
-import org.chromium.chrome.browser.preferences.SyncAndServicesPreferences;
+import org.chromium.chrome.browser.preferences.sync.SyncAndServicesPreferences;
 import org.chromium.chrome.browser.signin.AccountManagementFragment;
 import org.chromium.chrome.browser.sync.GoogleServiceAuthError.State;
 import org.chromium.chrome.browser.sync.ui.PassphraseActivity;
@@ -135,8 +135,6 @@
             case State.INVALID_GAIA_CREDENTIALS:
                 return false;
             case State.USER_NOT_SIGNED_UP:
-            case State.ACCOUNT_DELETED:
-            case State.ACCOUNT_DISABLED:
                 return true;
             default:
                 Log.w(TAG, "Not showing unknown Auth Error: " + mProfileSyncService.getAuthError());
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/sync/ui/SyncCustomizationFragment.java b/chrome/android/java/src/org/chromium/chrome/browser/sync/ui/SyncCustomizationFragment.java
index 1706b6d2..c11a9bd9 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/sync/ui/SyncCustomizationFragment.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/sync/ui/SyncCustomizationFragment.java
@@ -37,8 +37,8 @@
 import org.chromium.chrome.browser.autofill.PersonalDataManager;
 import org.chromium.chrome.browser.invalidation.InvalidationController;
 import org.chromium.chrome.browser.preferences.ChromeSwitchPreference;
-import org.chromium.chrome.browser.preferences.SyncPreferenceUtils;
-import org.chromium.chrome.browser.preferences.SyncedAccountPreference;
+import org.chromium.chrome.browser.preferences.sync.SyncPreferenceUtils;
+import org.chromium.chrome.browser.preferences.sync.SyncedAccountPreference;
 import org.chromium.chrome.browser.profiles.Profile;
 import org.chromium.chrome.browser.signin.SigninManager;
 import org.chromium.chrome.browser.signin.SignoutReason;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/IdentityDiscController.java b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/IdentityDiscController.java
index d4767859..03b776c 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/IdentityDiscController.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/IdentityDiscController.java
@@ -15,7 +15,7 @@
 import org.chromium.chrome.browser.lifecycle.ActivityLifecycleDispatcher;
 import org.chromium.chrome.browser.lifecycle.NativeInitObserver;
 import org.chromium.chrome.browser.preferences.PreferencesLauncher;
-import org.chromium.chrome.browser.preferences.SyncAndServicesPreferences;
+import org.chromium.chrome.browser.preferences.sync.SyncAndServicesPreferences;
 import org.chromium.chrome.browser.profiles.Profile;
 import org.chromium.chrome.browser.signin.ProfileDataCache;
 import org.chromium.chrome.browser.signin.SigninManager;
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/background_sync/BackgroundSyncBackgroundTaskSchedulerTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/background_sync/BackgroundSyncBackgroundTaskSchedulerTest.java
index 7918b07..dfeb7e6 100644
--- a/chrome/android/junit/src/org/chromium/chrome/browser/background_sync/BackgroundSyncBackgroundTaskSchedulerTest.java
+++ b/chrome/android/junit/src/org/chromium/chrome/browser/background_sync/BackgroundSyncBackgroundTaskSchedulerTest.java
@@ -27,6 +27,8 @@
 import org.chromium.base.test.BaseRobolectricTestRunner;
 import org.chromium.base.test.util.Feature;
 import org.chromium.chrome.browser.ChromeFeatureList;
+import org.chromium.chrome.browser.background_sync.BackgroundSyncBackgroundTaskScheduler.BackgroundSyncTask;
+import org.chromium.chrome.browser.background_task_scheduler.NativeBackgroundTask;
 import org.chromium.chrome.test.support.DisableHistogramsRule;
 import org.chromium.components.background_task_scheduler.BackgroundTaskScheduler;
 import org.chromium.components.background_task_scheduler.BackgroundTaskSchedulerFactory;
@@ -63,9 +65,14 @@
                 .schedule(eq(ContextUtils.getApplicationContext()), mTaskInfo.capture());
     }
 
-    private void verifyFixedTaskInfoValues(TaskInfo info) {
-        assertEquals(TaskIds.BACKGROUND_SYNC_ONE_SHOT_JOB_ID, info.getTaskId());
-        assertEquals(BackgroundSyncBackgroundTask.class, info.getBackgroundTaskClass());
+    private void verifyFixedTaskInfoValues(
+            TaskInfo info, @BackgroundSyncBackgroundTaskScheduler.BackgroundSyncTask int taskType) {
+        int taskId = BackgroundSyncBackgroundTaskScheduler.getAppropriateTaskId(taskType);
+        Class<? extends NativeBackgroundTask> taskClass =
+                BackgroundSyncBackgroundTaskScheduler.getAppropriateTaskClass(taskType);
+
+        assertEquals(taskId, info.getTaskId());
+        assertEquals(taskClass, info.getBackgroundTaskClass());
         assertTrue(info.isPersisted());
         assertFalse(info.isPeriodic());
         assertEquals(TaskInfo.NetworkType.ANY, info.getRequiredNetworkType());
@@ -85,7 +92,26 @@
                 .schedule(eq(ContextUtils.getApplicationContext()), eq(mTaskInfo.getValue()));
 
         TaskInfo taskInfo = mTaskInfo.getValue();
-        verifyFixedTaskInfoValues(taskInfo);
+        verifyFixedTaskInfoValues(taskInfo,
+                BackgroundSyncBackgroundTaskScheduler.BackgroundSyncTask
+                        .ONE_SHOT_SYNC_CHROME_WAKE_UP);
+
+        assertEquals(ONE_DAY_IN_MILLISECONDS, taskInfo.getOneOffInfo().getWindowStartTimeMs());
+    }
+
+    @Test
+    @Feature({"BackgroundSync"})
+    public void testSchedulePeriodicSyncWakeUpTask() {
+        BackgroundSyncBackgroundTaskScheduler.getInstance().scheduleOneOffTask(
+                /* minDelayMs= */ ONE_DAY_IN_MILLISECONDS,
+                BackgroundSyncTask.PERIODIC_SYNC_CHROME_WAKE_UP);
+        verify(mTaskScheduler, times(1))
+                .schedule(eq(ContextUtils.getApplicationContext()), eq(mTaskInfo.getValue()));
+
+        TaskInfo taskInfo = mTaskInfo.getValue();
+        verifyFixedTaskInfoValues(taskInfo,
+                BackgroundSyncBackgroundTaskScheduler.BackgroundSyncTask
+                        .PERIODIC_SYNC_CHROME_WAKE_UP);
 
         assertEquals(ONE_DAY_IN_MILLISECONDS, taskInfo.getOneOffInfo().getWindowStartTimeMs());
     }
@@ -104,7 +130,8 @@
                 .cancel(eq(ContextUtils.getApplicationContext()),
                         eq(TaskIds.BACKGROUND_SYNC_ONE_SHOT_JOB_ID));
 
-        BackgroundSyncBackgroundTaskScheduler.getInstance().cancelOneShotTask();
+        BackgroundSyncBackgroundTaskScheduler.getInstance().cancelOneOffTask(
+                BackgroundSyncTask.ONE_SHOT_SYNC_CHROME_WAKE_UP);
         verify(mTaskScheduler, times(1))
                 .cancel(eq(ContextUtils.getApplicationContext()),
                         eq(TaskIds.BACKGROUND_SYNC_ONE_SHOT_JOB_ID));
@@ -112,6 +139,27 @@
 
     @Test
     @Feature({"BackgroundSync"})
+    public void testCancelPeriodicSyncWakeUpTask() {
+        BackgroundSyncBackgroundTaskScheduler.getInstance().scheduleOneOffTask(
+                /* minDelayMs= */ ONE_DAY_IN_MILLISECONDS,
+                BackgroundSyncTask.PERIODIC_SYNC_CHROME_WAKE_UP);
+        verify(mTaskScheduler, times(1))
+                .schedule(eq(ContextUtils.getApplicationContext()), eq(mTaskInfo.getValue()));
+
+        doNothing()
+                .when(mTaskScheduler)
+                .cancel(eq(ContextUtils.getApplicationContext()),
+                        eq(TaskIds.PERIODIC_BACKGROUND_SYNC_CHROME_WAKEUP_TASK_JOB_ID));
+
+        BackgroundSyncBackgroundTaskScheduler.getInstance().cancelOneOffTask(
+                BackgroundSyncTask.PERIODIC_SYNC_CHROME_WAKE_UP);
+        verify(mTaskScheduler, times(1))
+                .cancel(eq(ContextUtils.getApplicationContext()),
+                        eq(TaskIds.PERIODIC_BACKGROUND_SYNC_CHROME_WAKEUP_TASK_JOB_ID));
+    }
+
+    @Test
+    @Feature({"BackgroundSync"})
     public void testLaunchBrowserCalledTwice() {
         BackgroundSyncBackgroundTaskScheduler.getInstance().launchBrowserIfStopped(
                 /* shouldLaunch= */ true,
@@ -134,6 +182,28 @@
 
     @Test
     @Feature({"BackgroundSync"})
+    public void testSchedulePeriodicSyncTaskTwice() {
+        BackgroundSyncBackgroundTaskScheduler.getInstance().scheduleOneOffTask(
+                /* minDelayMs= */ ONE_DAY_IN_MILLISECONDS,
+                BackgroundSyncTask.PERIODIC_SYNC_CHROME_WAKE_UP);
+        verify(mTaskScheduler, times(1))
+                .schedule(eq(ContextUtils.getApplicationContext()), eq(mTaskInfo.getValue()));
+
+        TaskInfo taskInfo = mTaskInfo.getValue();
+        assertEquals(ONE_DAY_IN_MILLISECONDS, taskInfo.getOneOffInfo().getWindowStartTimeMs());
+
+        BackgroundSyncBackgroundTaskScheduler.getInstance().scheduleOneOffTask(
+                /* minDelayMs= */ ONE_WEEK_IN_MILLISECONDS,
+                BackgroundSyncTask.PERIODIC_SYNC_CHROME_WAKE_UP);
+        verify(mTaskScheduler, times(1))
+                .schedule(eq(ContextUtils.getApplicationContext()), eq(mTaskInfo.getValue()));
+
+        taskInfo = mTaskInfo.getValue();
+        assertEquals(ONE_WEEK_IN_MILLISECONDS, taskInfo.getOneOffInfo().getWindowStartTimeMs());
+    }
+
+    @Test
+    @Feature({"BackgroundSync"})
     public void testLaunchBrowserThenCancel() {
         BackgroundSyncBackgroundTaskScheduler.getInstance().launchBrowserIfStopped(
                 /* shouldLaunch= */ true,
@@ -148,4 +218,19 @@
                 .cancel(eq(ContextUtils.getApplicationContext()),
                         eq(TaskIds.BACKGROUND_SYNC_ONE_SHOT_JOB_ID));
     }
+
+    @Test
+    @Feature({"BackgroundSync"})
+    public void schedulePeriodicSyncWakeUpTaskThenCancel() {
+        BackgroundSyncBackgroundTaskScheduler.getInstance().scheduleOneOffTask(
+                /* minDelayMs= */ ONE_DAY_IN_MILLISECONDS,
+                BackgroundSyncTask.PERIODIC_SYNC_CHROME_WAKE_UP);
+        BackgroundSyncBackgroundTaskScheduler.getInstance().cancelOneOffTask(
+                BackgroundSyncTask.PERIODIC_SYNC_CHROME_WAKE_UP);
+        verify(mTaskScheduler, times(1))
+                .schedule(eq(ContextUtils.getApplicationContext()), eq(mTaskInfo.getValue()));
+        verify(mTaskScheduler, times(1))
+                .cancel(eq(ContextUtils.getApplicationContext()),
+                        eq(TaskIds.PERIODIC_BACKGROUND_SYNC_CHROME_WAKEUP_TASK_JOB_ID));
+    }
 }
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/background_sync/BackgroundSyncBackgroundTaskTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/background_sync/BackgroundSyncBackgroundTaskTest.java
index 780fbc8f..2f033af 100644
--- a/chrome/android/junit/src/org/chromium/chrome/browser/background_sync/BackgroundSyncBackgroundTaskTest.java
+++ b/chrome/android/junit/src/org/chromium/chrome/browser/background_sync/BackgroundSyncBackgroundTaskTest.java
@@ -150,7 +150,7 @@
         new BackgroundSyncBackgroundTask().onStartTaskWithNative(
                 RuntimeEnvironment.application, params, mTaskFinishedCallback);
 
-        verify(mNativeMock).fireBackgroundSyncEvents(any(Runnable.class));
+        verify(mNativeMock).fireOneShotBackgroundSyncEvents(any(Runnable.class));
         verify(mTaskFinishedCallback, times(0)).taskFinished(anyBoolean());
         verify(mTaskScheduler, times(0)).schedule(any(Context.class), any(TaskInfo.class));
     }
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/background_sync/PeriodicBackgroundSyncChromeWakeUpTaskTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/background_sync/PeriodicBackgroundSyncChromeWakeUpTaskTest.java
new file mode 100644
index 0000000..c7736a0
--- /dev/null
+++ b/chrome/android/junit/src/org/chromium/chrome/browser/background_sync/PeriodicBackgroundSyncChromeWakeUpTaskTest.java
@@ -0,0 +1,154 @@
+// Copyright 2019 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.chrome.browser.background_sync;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Mockito.any;
+import static org.mockito.Mockito.anyBoolean;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.eq;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+
+import android.content.Context;
+import android.os.Bundle;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.ArgumentCaptor;
+import org.mockito.Captor;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.robolectric.RuntimeEnvironment;
+import org.robolectric.annotation.Config;
+
+import org.chromium.base.BaseSwitches;
+import org.chromium.base.Callback;
+import org.chromium.base.CommandLine;
+import org.chromium.base.SysUtils;
+import org.chromium.base.test.BaseRobolectricTestRunner;
+import org.chromium.base.test.util.Feature;
+import org.chromium.base.test.util.JniMocker;
+import org.chromium.chrome.browser.ShadowDeviceConditions;
+import org.chromium.chrome.browser.background_task_scheduler.NativeBackgroundTask;
+import org.chromium.chrome.test.support.DisableHistogramsRule;
+import org.chromium.components.background_task_scheduler.BackgroundTask;
+import org.chromium.components.background_task_scheduler.BackgroundTaskScheduler;
+import org.chromium.components.background_task_scheduler.BackgroundTaskSchedulerFactory;
+import org.chromium.components.background_task_scheduler.TaskIds;
+import org.chromium.components.background_task_scheduler.TaskInfo;
+import org.chromium.components.background_task_scheduler.TaskParameters;
+import org.chromium.net.ConnectionType;
+
+/**
+ * Unit tests for PeriodicBackgroundSyncChromeWakeUpTask.
+ */
+@RunWith(BaseRobolectricTestRunner.class)
+@Config(manifest = Config.NONE, shadows = {ShadowDeviceConditions.class})
+public class PeriodicBackgroundSyncChromeWakeUpTaskTest {
+    private static final String IS_LOW_END_DEVICE_SWITCH =
+            "--" + BaseSwitches.ENABLE_LOW_END_DEVICE_MODE;
+
+    @Rule
+    public DisableHistogramsRule mDisableHistogramsRule = new DisableHistogramsRule();
+
+    @Rule
+    public JniMocker mocker = new JniMocker();
+
+    private Bundle mTaskExtras;
+    private long mTaskTime;
+
+    @Mock
+    private PeriodicBackgroundSyncChromeWakeUpTask.Natives mNativeMock;
+    @Mock
+    private BackgroundTaskScheduler mTaskScheduler;
+    @Mock
+    private BackgroundTask.TaskFinishedCallback mTaskFinishedCallback;
+    @Mock
+    private Callback<Boolean> mInternalBooleanCallback;
+    @Captor
+    private ArgumentCaptor<TaskInfo> mTaskInfo;
+
+    @Before
+    public void setUp() throws Exception {
+        MockitoAnnotations.initMocks(this);
+        BackgroundTaskSchedulerFactory.setSchedulerForTesting(mTaskScheduler);
+
+        mTaskExtras = new Bundle();
+
+        doReturn(true)
+                .when(mTaskScheduler)
+                .schedule(eq(RuntimeEnvironment.application), mTaskInfo.capture());
+
+        ShadowDeviceConditions.setCurrentNetworkConnectionType(ConnectionType.CONNECTION_NONE);
+
+        // Run tests as a low-end device.
+        CommandLine.init(new String[] {"testcommand", IS_LOW_END_DEVICE_SWITCH});
+
+        mocker.mock(PeriodicBackgroundSyncChromeWakeUpTaskJni.TEST_HOOKS, mNativeMock);
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        // Clean up static state for subsequent Robolectric tests.
+        CommandLine.reset();
+        SysUtils.resetForTesting();
+    }
+
+    @Test
+    @Feature("BackgroundSync")
+    public void testNetworkConditions_NoNetwork() {
+        // The test has been set up with no network by default.
+        TaskParameters params =
+                TaskParameters.create(TaskIds.PERIODIC_BACKGROUND_SYNC_CHROME_WAKEUP_TASK_JOB_ID)
+                        .addExtras(mTaskExtras)
+                        .build();
+
+        int result = new PeriodicBackgroundSyncChromeWakeUpTask().onStartTaskBeforeNativeLoaded(
+                RuntimeEnvironment.application, params, mTaskFinishedCallback);
+        assertEquals(NativeBackgroundTask.StartBeforeNativeResult.RESCHEDULE, result);
+
+        // TaskFinishedCallback callback is only called once native code has
+        // finished processing pending Periodic Background Sync registrations.
+        verify(mTaskFinishedCallback, times(0)).taskFinished(anyBoolean());
+    }
+
+    @Test
+    @Feature("BackgroundSync")
+    public void testNetworkConditions_Wifi() {
+        ShadowDeviceConditions.setCurrentNetworkConnectionType(ConnectionType.CONNECTION_WIFI);
+        TaskParameters params =
+                TaskParameters.create(TaskIds.PERIODIC_BACKGROUND_SYNC_CHROME_WAKEUP_TASK_JOB_ID)
+                        .addExtras(mTaskExtras)
+                        .build();
+
+        int result = new PeriodicBackgroundSyncChromeWakeUpTask().onStartTaskBeforeNativeLoaded(
+                RuntimeEnvironment.application, params, mTaskFinishedCallback);
+        assertEquals(NativeBackgroundTask.StartBeforeNativeResult.LOAD_NATIVE, result);
+
+        // TaskFinishedCallback callback is only called once native code has
+        // finished processing pending Background Sync registrations.
+        verify(mTaskFinishedCallback, times(0)).taskFinished(anyBoolean());
+    }
+
+    @Test
+    @Feature("BackgroundSync")
+    public void testOnStartTaskWithNative() {
+        TaskParameters params =
+                TaskParameters.create(TaskIds.PERIODIC_BACKGROUND_SYNC_CHROME_WAKEUP_TASK_JOB_ID)
+                        .addExtras(mTaskExtras)
+                        .build();
+
+        new PeriodicBackgroundSyncChromeWakeUpTask().onStartTaskWithNative(
+                RuntimeEnvironment.application, params, mTaskFinishedCallback);
+
+        verify(mNativeMock).firePeriodicBackgroundSyncEvents(any(Runnable.class));
+        verify(mTaskFinishedCallback, times(0)).taskFinished(anyBoolean());
+        verify(mTaskScheduler, times(0)).schedule(any(Context.class), any(TaskInfo.class));
+    }
+}
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/signin/ChromeSigninManagerDelegateTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/signin/ChromeSigninManagerDelegateTest.java
index c3f899b..6ec64840 100644
--- a/chrome/android/junit/src/org/chromium/chrome/browser/signin/ChromeSigninManagerDelegateTest.java
+++ b/chrome/android/junit/src/org/chromium/chrome/browser/signin/ChromeSigninManagerDelegateTest.java
@@ -32,7 +32,10 @@
     public JniMocker mocker = new JniMocker();
 
     @Mock
-    SigninManager.Natives mNativeMock;
+    ChromeSigninManagerDelegate.Natives mNativeMock;
+
+    @Mock
+    SigninManager.Natives mSigninManagerNativeMock;
 
     private ChromeSigninManagerDelegate mDelegate;
 
@@ -40,7 +43,8 @@
     public void setUp() {
         initMocks(this);
 
-        mocker.mock(SigninManagerJni.TEST_HOOKS, mNativeMock);
+        mocker.mock(ChromeSigninManagerDelegateJni.TEST_HOOKS, mNativeMock);
+        mocker.mock(SigninManagerJni.TEST_HOOKS, mSigninManagerNativeMock);
 
         // SigninManager interacts with AndroidSyncSettings, but its not the focus
         // of this test. Using MockSyncContentResolver reduces burden of test setup.
@@ -52,28 +56,34 @@
     public void signOutWithManagedDomain() {
         // Stub out various native calls. Some of these are verified as never called
         // and those stubs simply allow that verification to catch any issues.
-        doNothing().when(mNativeMock).wipeProfileData(any(), anyLong(), any());
-        doNothing().when(mNativeMock).wipeGoogleServiceWorkerCaches(any(), anyLong(), any());
+        doNothing().when(mSigninManagerNativeMock).wipeProfileData(any(), anyLong(), any());
+        doNothing()
+                .when(mSigninManagerNativeMock)
+                .wipeGoogleServiceWorkerCaches(any(), anyLong(), any());
 
         // Simulate call from SigninManager
         mDelegate.disableSyncAndWipeData(null, 0L, true, null);
 
         // Sign-out should only clear the profile when the user is managed.
-        verify(mNativeMock, times(1)).wipeProfileData(any(), anyLong(), any());
-        verify(mNativeMock, never()).wipeGoogleServiceWorkerCaches(any(), anyLong(), any());
+        verify(mSigninManagerNativeMock, times(1)).wipeProfileData(any(), anyLong(), any());
+        verify(mSigninManagerNativeMock, never())
+                .wipeGoogleServiceWorkerCaches(any(), anyLong(), any());
     }
     @Test
     public void signOutWithNullDomain() {
         // Stub out various native calls. Some of these are verified as never called
         // and those stubs simply allow that verification to catch any issues.
-        doNothing().when(mNativeMock).wipeProfileData(any(), anyLong(), any());
-        doNothing().when(mNativeMock).wipeGoogleServiceWorkerCaches(any(), anyLong(), any());
+        doNothing().when(mSigninManagerNativeMock).wipeProfileData(any(), anyLong(), any());
+        doNothing()
+                .when(mSigninManagerNativeMock)
+                .wipeGoogleServiceWorkerCaches(any(), anyLong(), any());
 
         // Simulate call from SigninManager
         mDelegate.disableSyncAndWipeData(null, 0L, false, null);
 
         // Sign-out should only clear the service worker cache when the user is not managed.
-        verify(mNativeMock, never()).wipeProfileData(any(), anyLong(), any());
-        verify(mNativeMock, times(1)).wipeGoogleServiceWorkerCaches(any(), anyLong(), any());
+        verify(mSigninManagerNativeMock, never()).wipeProfileData(any(), anyLong(), any());
+        verify(mSigninManagerNativeMock, times(1))
+                .wipeGoogleServiceWorkerCaches(any(), anyLong(), any());
     }
 }
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/signin/SigninManagerTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/signin/SigninManagerTest.java
index 2fae733..b9048149 100644
--- a/chrome/android/junit/src/org/chromium/chrome/browser/signin/SigninManagerTest.java
+++ b/chrome/android/junit/src/org/chromium/chrome/browser/signin/SigninManagerTest.java
@@ -75,7 +75,7 @@
         doNothing().when(mNativeMock).signOut(any(), anyLong(), anyInt());
         doNothing().when(mDelegateMock).disableSyncAndWipeData(any(), anyLong(), eq(true), any());
         // See verification of nativeWipeProfileData below.
-        doReturn("TestDomain").when(mDelegateMock).getManagementDomain(any(), anyLong());
+        doReturn("TestDomain").when(mDelegateMock).getManagementDomain();
 
         // Trigger the sign out flow!
         mSigninManager.signOut(SignoutReason.SIGNOUT_TEST);
@@ -98,7 +98,7 @@
         doNothing().when(mNativeMock).signOut(any(), anyLong(), anyInt());
         doNothing().when(mDelegateMock).disableSyncAndWipeData(any(), anyLong(), eq(false), any());
         // See verification of nativeWipeGoogleServiceWorkerCaches below.
-        doReturn(null).when(mDelegateMock).getManagementDomain(any(), anyLong());
+        doReturn(null).when(mDelegateMock).getManagementDomain();
 
         // Trigger the sign out flow!
         mSigninManager.signOut(SignoutReason.SIGNOUT_TEST);
@@ -121,11 +121,10 @@
         doNothing().when(mNativeMock).signOut(any(), anyLong(), anyInt());
         doNothing().when(mDelegateMock).disableSyncAndWipeData(any(), anyLong(), eq(true), any());
         // See verification of nativeWipeProfileData below.
-        doReturn("TestDomain").when(mDelegateMock).getManagementDomain(any(), anyLong());
+        doReturn("TestDomain").when(mDelegateMock).getManagementDomain();
 
         // Trigger the sign out flow!
         mSigninManager.onNativeSignOut();
-
         // nativeSignOut should only be called when signOut() is triggered on
         // the Java side of the JNI boundary. This test instead initiates sign-out
         // from the native side.
@@ -141,7 +140,7 @@
         doNothing().when(mNativeMock).signOut(any(), anyLong(), anyInt());
         doNothing().when(mDelegateMock).disableSyncAndWipeData(any(), anyLong(), eq(false), any());
         // See verification of nativeWipeGoogleServiceWorkerCaches below.
-        doReturn(null).when(mDelegateMock).getManagementDomain(any(), anyLong());
+        doReturn(null).when(mDelegateMock).getManagementDomain();
 
         // Trigger the sign out flow!
         mSigninManager.onNativeSignOut();
@@ -171,7 +170,6 @@
         })
                 .when(mNativeMock)
                 .signOut(any(), anyLong(), anyInt());
-        doReturn(null).when(mNativeMock).getManagementDomain(any(), anyLong());
         doNothing().when(mNativeMock).wipeGoogleServiceWorkerCaches(any(), anyLong(), any());
 
         mSigninManager.signOut(SignoutReason.SIGNOUT_TEST);
@@ -191,7 +189,7 @@
         doReturn(true).when(mAccountTrackerService).checkAndSeedSystemAccounts();
         // Request that policy is loaded. It will pause sign-in until onPolicyCheckedBeforeSignIn is
         // invoked.
-        doNothing().when(mDelegateMock).fetchAndApplyCloudPolicy(any(), anyLong(), any(), any());
+        doNothing().when(mDelegateMock).fetchAndApplyCloudPolicy(any(), any());
 
         doReturn(true).when(mSigninManager).isSigninSupported();
         doNothing().when(mNativeMock).onSignInCompleted(any(), anyLong(), any());
diff --git a/chrome/android/profiles/newest.txt b/chrome/android/profiles/newest.txt
index 86297c3d..e95f0960 100644
--- a/chrome/android/profiles/newest.txt
+++ b/chrome/android/profiles/newest.txt
@@ -1 +1 @@
-chromeos-chrome-amd64-77.0.3833.0_rc-r1-merged.afdo.bz2
\ No newline at end of file
+chromeos-chrome-amd64-77.0.3834.0_rc-r1-merged.afdo.bz2
\ No newline at end of file
diff --git a/chrome/app/settings_strings.grdp b/chrome/app/settings_strings.grdp
index d5d55ac4..fda5c2f 100644
--- a/chrome/app/settings_strings.grdp
+++ b/chrome/app/settings_strings.grdp
@@ -664,6 +664,9 @@
     <message name="IDS_SETTINGS_APPS_LINK_TEXT" desc="The label for the button which links to the App Management page.">
       Manage your apps
     </message>
+    <message name="IDS_SETTINGS_APPS_LINK_SUBLABEL_TEXT" desc="The sublabel for the button which links to the App Management page.">
+      Open App Management
+    </message>
   </if>
 
   <!-- Appearance Page -->
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index 6f85d57..e0a915e 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -2550,6 +2550,8 @@
       "android/shortcut_helper.h",
       "android/shortcut_info.cc",
       "android/shortcut_info.h",
+      "android/signin/chrome_signin_manager_delegate.cc",
+      "android/signin/chrome_signin_manager_delegate.h",
       "android/signin/signin_investigator_android.cc",
       "android/signin/signin_investigator_android.h",
       "android/signin/signin_manager_android.cc",
diff --git a/chrome/browser/DEPS b/chrome/browser/DEPS
index a494420..4fea1be 100644
--- a/chrome/browser/DEPS
+++ b/chrome/browser/DEPS
@@ -23,11 +23,24 @@
   "+chrome/services/wifi_util_win/public",
   "+chromeos",
   "+components",
-  # Use identity_manager.h instead of the below files;
+
+# Use identity_manager.h instead of the below files;
   # see https://groups.google.com/a/chromium.org/d/msg/chromium-dev/dgFLuxqZt1o/iEqkyoQQBwAJ for help and info.
-  "!components/signin/core/browser/fake_profile_oauth2_token_service.h",
-  "!components/signin/core/browser/primary_account_manager.h",
-  "!components/signin/core/browser/primary_account_policy_manager.h",
+  "-components/signin/core/browser/account_fetcher_service.h",
+  "-components/signin/core/browser/account_info_fetcher.h",
+  "-components/signin/core/browser/account_tracker_service.h",
+  "-components/signin/core/browser/child_account_info_fetcher_android.h",
+  "-components/signin/core/browser/fake_profile_oauth2_token_service.h",
+  "-components/signin/core/browser/gaia_cookie_manager_service.h",
+  "-components/signin/core/browser/oauth2_token_service_delegate_android.h",
+  "-components/signin/core/browser/oauth2_multilogin_helper.h",
+  "-components/signin/core/browser/oauth2_multilogin_token_fetcher.h",
+  "-components/signin/core/browser/primary_account_manager.h",
+  "-components/signin/core/browser/primary_account_policy_manager.h",
+  "-components/signin/core/browser/profile_oauth2_token_service.h",
+  "-components/signin/core/browser/profile_oauth2_token_service_delegate_chromeos.h",
+  "-components/signin/core/browser/ubertoken_fetcher_impl.h",
+
   "+content/public/browser",
   "+content/public/common",
   "+courgette",
diff --git a/chrome/browser/android/background_sync_launcher_android.cc b/chrome/browser/android/background_sync_launcher_android.cc
index cc6489e..c7a05ba 100644
--- a/chrome/browser/android/background_sync_launcher_android.cc
+++ b/chrome/browser/android/background_sync_launcher_android.cc
@@ -13,6 +13,7 @@
 #include "chrome/android/chrome_jni_headers/BackgroundSyncBackgroundTaskScheduler_jni.h"
 #include "chrome/android/chrome_jni_headers/BackgroundSyncBackgroundTask_jni.h"
 #include "chrome/android/chrome_jni_headers/BackgroundSyncLauncher_jni.h"
+#include "chrome/android/chrome_jni_headers/PeriodicBackgroundSyncChromeWakeUpTask_jni.h"
 #include "chrome/browser/android/chrome_feature_list.h"
 #include "chrome/browser/profiles/profile_manager.h"
 #include "content/public/browser/background_sync_context.h"
@@ -34,7 +35,7 @@
 }  // namespace
 
 // static
-void JNI_BackgroundSyncBackgroundTask_FireBackgroundSyncEvents(
+void JNI_BackgroundSyncBackgroundTask_FireOneShotBackgroundSyncEvents(
     JNIEnv* env,
     const base::android::JavaParamRef<jobject>& j_runnable) {
   if (!base::FeatureList::IsEnabled(
@@ -42,7 +43,15 @@
     return;
   }
 
-  BackgroundSyncLauncherAndroid::Get()->FireBackgroundSyncEvents(j_runnable);
+  BackgroundSyncLauncherAndroid::Get()->FireBackgroundSyncEvents(
+      blink::mojom::BackgroundSyncType::ONE_SHOT, j_runnable);
+}
+
+void JNI_PeriodicBackgroundSyncChromeWakeUpTask_FirePeriodicBackgroundSyncEvents(
+    JNIEnv* env,
+    const base::android::JavaParamRef<jobject>& j_runnable) {
+  BackgroundSyncLauncherAndroid::Get()->FireBackgroundSyncEvents(
+      blink::mojom::BackgroundSyncType::PERIODIC, j_runnable);
 }
 
 // static
@@ -108,6 +117,7 @@
 }
 
 void BackgroundSyncLauncherAndroid::FireBackgroundSyncEvents(
+    blink::mojom::BackgroundSyncType sync_type,
     const base::android::JavaParamRef<jobject>& j_runnable) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
 
@@ -115,10 +125,9 @@
   DCHECK(profile);
 
   content::BackgroundSyncContext::FireBackgroundSyncEventsAcrossPartitions(
-      profile, j_runnable);
+      profile, sync_type, j_runnable);
 }
 
-
 BackgroundSyncLauncherAndroid::BackgroundSyncLauncherAndroid() {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
 
diff --git a/chrome/browser/android/background_sync_launcher_android.h b/chrome/browser/android/background_sync_launcher_android.h
index 25cfec2..c59d0f8 100644
--- a/chrome/browser/android/background_sync_launcher_android.h
+++ b/chrome/browser/android/background_sync_launcher_android.h
@@ -14,6 +14,7 @@
 #include "base/lazy_instance.h"
 #include "base/macros.h"
 #include "base/time/time.h"
+#include "third_party/blink/public/mojom/background_sync/background_sync.mojom.h"
 
 // The BackgroundSyncLauncherAndroid singleton owns the Java
 // BackgroundSyncLauncher object and is used to register interest in starting
@@ -38,7 +39,9 @@
 
   // Fires all pending Background Sync events across all storage partitions
   // for the last used profile.
+  // Fires one-shot Background Sync events for registration of |sync_type|.
   void FireBackgroundSyncEvents(
+      blink::mojom::BackgroundSyncType sync_type,
       const base::android::JavaParamRef<jobject>& j_runnable);
 
  private:
diff --git a/chrome/browser/android/signin/chrome_signin_manager_delegate.cc b/chrome/browser/android/signin/chrome_signin_manager_delegate.cc
new file mode 100644
index 0000000..ce35edfa
--- /dev/null
+++ b/chrome/browser/android/signin/chrome_signin_manager_delegate.cc
@@ -0,0 +1,183 @@
+// Copyright 2019 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/android/signin/chrome_signin_manager_delegate.h"
+
+#include "base/android/callback_android.h"
+#include "base/android/jni_string.h"
+#include "chrome/android/chrome_jni_headers/ChromeSigninManagerDelegate_jni.h"
+#include "chrome/browser/policy/cloud/user_policy_signin_service_factory.h"
+#include "chrome/browser/policy/cloud/user_policy_signin_service_mobile.h"
+#include "chrome/browser/profiles/profile_manager.h"
+#include "chrome/browser/signin/identity_manager_factory.h"
+#include "components/policy/core/browser/browser_policy_connector.h"
+#include "components/policy/core/common/cloud/user_cloud_policy_manager.h"
+#include "content/public/browser/storage_partition.h"
+#include "services/identity/public/cpp/identity_manager.h"
+
+using base::android::JavaParamRef;
+
+namespace {
+
+// Returns whether the user is a managed user or not.
+bool ShouldLoadPolicyForUser(const std::string& username) {
+  return !policy::BrowserPolicyConnector::IsNonEnterpriseUser(username);
+}
+
+}  // namespace
+
+ChromeSigninManagerDelegate::ChromeSigninManagerDelegate(JNIEnv* env,
+                                                         jobject obj)
+    : profile_(ProfileManager::GetActiveUserProfile()),
+      identity_manager_(IdentityManagerFactory::GetForProfile(profile_)),
+      user_cloud_policy_manager_(profile_->GetUserCloudPolicyManager()),
+      user_policy_signin_service_(
+          policy::UserPolicySigninServiceFactory::GetForProfile(profile_)),
+      java_ref_(env, obj),
+      weak_factory_(this) {
+  DCHECK(profile_);
+  DCHECK(identity_manager_);
+  DCHECK(user_cloud_policy_manager_);
+  DCHECK(user_policy_signin_service_);
+}
+
+ChromeSigninManagerDelegate::~ChromeSigninManagerDelegate() {}
+
+void ChromeSigninManagerDelegate::Destroy(JNIEnv* env,
+                                          const JavaParamRef<jobject>& obj) {
+  delete this;
+}
+
+void ChromeSigninManagerDelegate::StopApplyingCloudPolicy(
+    JNIEnv* env,
+    const JavaParamRef<jobject>& obj) {
+  user_policy_signin_service_->ShutdownUserCloudPolicyManager();
+}
+
+void ChromeSigninManagerDelegate::RegisterPolicyWithAccount(
+    const CoreAccountInfo& account,
+    RegisterPolicyWithAccountCallback callback) {
+  if (!ShouldLoadPolicyForUser(account.email)) {
+    std::move(callback).Run(base::nullopt);
+    return;
+  }
+
+  user_policy_signin_service_->RegisterForPolicyWithAccountId(
+      account.email, account.account_id,
+      base::AdaptCallbackForRepeating(base::BindOnce(
+          [](RegisterPolicyWithAccountCallback callback,
+             const std::string& dm_token, const std::string& client_id) {
+            base::Optional<ManagementCredentials> credentials;
+            if (!dm_token.empty()) {
+              credentials.emplace(dm_token, client_id);
+            }
+            std::move(callback).Run(credentials);
+          },
+          std::move(callback))));
+}
+
+void ChromeSigninManagerDelegate::FetchAndApplyCloudPolicy(
+    JNIEnv* env,
+    const JavaParamRef<jobject>& obj,
+    const JavaParamRef<jstring>& j_username,
+    const base::android::JavaParamRef<jobject>& j_callback) {
+  std::string username =
+      base::android::ConvertJavaStringToUTF8(env, j_username);
+  DCHECK(!username.empty());
+  // TODO(bsazonov): Remove after migrating the sign-in flow to CoreAccountId.
+  // ExtractDomainName Dchecks that username is a valid email, in practice
+  // this checks that @ is present and is not the last character.
+  gaia::ExtractDomainName(username);
+  CoreAccountInfo account =
+      identity_manager_
+          ->FindAccountInfoForAccountWithRefreshTokenByEmailAddress(username)
+          .value();
+
+  auto callback =
+      base::BindOnce(base::android::RunRunnableAndroid,
+                     base::android::ScopedJavaGlobalRef<jobject>(j_callback));
+
+  RegisterPolicyWithAccount(
+      account,
+      base::BindOnce(&ChromeSigninManagerDelegate::OnPolicyRegisterDone,
+                     weak_factory_.GetWeakPtr(), account, std::move(callback)));
+}
+
+void ChromeSigninManagerDelegate::OnPolicyRegisterDone(
+    const CoreAccountInfo& account,
+    base::OnceCallback<void()> policy_callback,
+    const base::Optional<ManagementCredentials>& credentials) {
+  if (credentials) {
+    FetchPolicyBeforeSignIn(account, std::move(policy_callback),
+                            credentials.value());
+  } else {
+    // User's account does not have a policy to fetch.
+    std::move(policy_callback).Run();
+  }
+}
+
+void ChromeSigninManagerDelegate::FetchPolicyBeforeSignIn(
+    const CoreAccountInfo& account,
+    base::OnceCallback<void()> policy_callback,
+    const ManagementCredentials& credentials) {
+  scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory =
+      content::BrowserContext::GetDefaultStoragePartition(profile_)
+          ->GetURLLoaderFactoryForBrowserProcess();
+  user_policy_signin_service_->FetchPolicyForSignedInUser(
+      AccountIdFromAccountInfo(account), credentials.dm_token,
+      credentials.client_id, url_loader_factory,
+      base::AdaptCallbackForRepeating(
+          base::BindOnce([](base::OnceCallback<void()> callback,
+                            bool success) { std::move(callback).Run(); },
+                         std::move(policy_callback))));
+}
+
+void ChromeSigninManagerDelegate::IsAccountManaged(
+    JNIEnv* env,
+    const JavaParamRef<jobject>& obj,
+    const JavaParamRef<jstring>& j_username,
+    const JavaParamRef<jobject>& j_callback) {
+  base::android::ScopedJavaGlobalRef<jobject> callback(env, j_callback);
+  std::string username =
+      base::android::ConvertJavaStringToUTF8(env, j_username);
+
+  base::Optional<CoreAccountInfo> account =
+      identity_manager_
+          ->FindAccountInfoForAccountWithRefreshTokenByEmailAddress(username);
+
+  RegisterPolicyWithAccount(
+      account.value_or(CoreAccountInfo{}),
+      base::BindOnce(
+          [](base::android::ScopedJavaGlobalRef<jobject> callback,
+             const base::Optional<ManagementCredentials>& credentials) {
+            base::android::RunBooleanCallbackAndroid(callback,
+                                                     credentials.has_value());
+          },
+          callback));
+}
+
+base::android::ScopedJavaLocalRef<jstring>
+ChromeSigninManagerDelegate::GetManagementDomain(
+    JNIEnv* env,
+    const JavaParamRef<jobject>& obj) {
+  base::android::ScopedJavaLocalRef<jstring> domain;
+
+  policy::CloudPolicyStore* store = user_cloud_policy_manager_->core()->store();
+
+  if (store && store->is_managed() && store->policy()->has_username()) {
+    domain.Reset(base::android::ConvertUTF8ToJavaString(
+        env, gaia::ExtractDomainName(store->policy()->username())));
+  }
+
+  return domain;
+}
+
+// instantiates ChromeSigninManagerDelegate
+static jlong JNI_ChromeSigninManagerDelegate_Init(
+    JNIEnv* env,
+    const JavaParamRef<jobject>& obj) {
+  ChromeSigninManagerDelegate* chrome_signin_manager_delegate =
+      new ChromeSigninManagerDelegate(env, obj);
+  return reinterpret_cast<intptr_t>(chrome_signin_manager_delegate);
+}
diff --git a/chrome/browser/android/signin/chrome_signin_manager_delegate.h b/chrome/browser/android/signin/chrome_signin_manager_delegate.h
new file mode 100644
index 0000000..35a77b1a
--- /dev/null
+++ b/chrome/browser/android/signin/chrome_signin_manager_delegate.h
@@ -0,0 +1,96 @@
+// Copyright 2019 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_ANDROID_SIGNIN_CHROME_SIGNIN_MANAGER_DELEGATE_H_
+#define CHROME_BROWSER_ANDROID_SIGNIN_CHROME_SIGNIN_MANAGER_DELEGATE_H_
+
+#include "base/android/scoped_java_ref.h"
+#include "base/macros.h"
+#include "base/memory/weak_ptr.h"
+#include "components/signin/core/browser/account_info.h"
+
+namespace identity {
+class IdentityManager;
+}
+
+namespace policy {
+class UserCloudPolicyManager;
+class UserPolicySigninService;
+}  // namespace policy
+
+class Profile;
+
+// This class provide ChromeSigninManagerDelegate.java access to the native
+// dependencies.
+class ChromeSigninManagerDelegate {
+ public:
+  ChromeSigninManagerDelegate(JNIEnv* env, jobject obj);
+
+  void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj);
+
+  // Registers a CloudPolicyClient for fetching policy for a user and fetches
+  // the policy if necessary.
+  void FetchAndApplyCloudPolicy(
+      JNIEnv* env,
+      const base::android::JavaParamRef<jobject>& obj,
+      const base::android::JavaParamRef<jstring>& username,
+      const base::android::JavaParamRef<jobject>& j_callback);
+
+  void StopApplyingCloudPolicy(JNIEnv* env,
+                               const base::android::JavaParamRef<jobject>& obj);
+
+  void IsAccountManaged(JNIEnv* env,
+                        const base::android::JavaParamRef<jobject>& obj,
+                        const base::android::JavaParamRef<jstring>& j_username,
+                        const base::android::JavaParamRef<jobject>& j_callback);
+
+  base::android::ScopedJavaLocalRef<jstring> GetManagementDomain(
+      JNIEnv* env,
+      const base::android::JavaParamRef<jobject>& obj);
+
+ private:
+  struct ManagementCredentials {
+    ManagementCredentials(const std::string& dm_token,
+                          const std::string& client_id)
+        : dm_token(dm_token), client_id(client_id) {}
+    const std::string dm_token;
+    const std::string client_id;
+  };
+
+  using RegisterPolicyWithAccountCallback = base::OnceCallback<void(
+      const base::Optional<ManagementCredentials>& credentials)>;
+
+  ~ChromeSigninManagerDelegate();
+
+  ChromeSigninManagerDelegate(const ChromeSigninManagerDelegate&) = delete;
+
+  ChromeSigninManagerDelegate& operator=(const ChromeSigninManagerDelegate&) =
+      delete;
+
+  // If required registers for policy with given account. callback will be
+  // called with credentials if the account is managed.
+  void RegisterPolicyWithAccount(const CoreAccountInfo& account,
+                                 RegisterPolicyWithAccountCallback callback);
+
+  void OnPolicyRegisterDone(
+      const CoreAccountInfo& account_id,
+      base::OnceCallback<void()> policy_callback,
+      const base::Optional<ManagementCredentials>& credentials);
+
+  void FetchPolicyBeforeSignIn(const CoreAccountInfo& account_id,
+                               base::OnceCallback<void()> policy_callback,
+                               const ManagementCredentials& credentials);
+
+  Profile* const profile_ = nullptr;
+
+  identity::IdentityManager* const identity_manager_ = nullptr;
+  policy::UserCloudPolicyManager* const user_cloud_policy_manager_ = nullptr;
+  policy::UserPolicySigninService* const user_policy_signin_service_ = nullptr;
+  // A reference to the Java counterpart of this object.
+  const base::android::ScopedJavaGlobalRef<jobject> java_ref_;
+
+  base::WeakPtrFactory<ChromeSigninManagerDelegate> weak_factory_;
+};
+
+#endif  // CHROME_BROWSER_ANDROID_SIGNIN_CHROME_SIGNIN_MANAGER_DELEGATE_H_
diff --git a/chrome/browser/android/signin/signin_manager_android.cc b/chrome/browser/android/signin/signin_manager_android.cc
index 55056a93..7577171 100644
--- a/chrome/browser/android/signin/signin_manager_android.cc
+++ b/chrome/browser/android/signin/signin_manager_android.cc
@@ -26,7 +26,6 @@
 #include "chrome/browser/signin/identity_manager_factory.h"
 #include "chrome/common/pref_names.h"
 #include "components/google/core/common/google_util.h"
-#include "components/policy/core/browser/browser_policy_connector.h"
 #include "components/policy/core/common/cloud/cloud_policy_core.h"
 #include "components/policy/core/common/cloud/cloud_policy_store.h"
 #include "components/policy/core/common/cloud/user_cloud_policy_manager.h"
@@ -50,11 +49,6 @@
   profile->GetPrefs()->ClearPref(prefs::kGoogleServicesLastUsername);
 }
 
-// Returns whether the user is a managed user or not.
-bool ShouldLoadPolicyForUser(const std::string& username) {
-  return !policy::BrowserPolicyConnector::IsNonEnterpriseUser(username);
-}
-
 // A BrowsingDataRemover::Observer that clears Profile data and then invokes
 // a callback and deletes itself. It can be configured to delete all data
 // (for enterprise users) or only Google's service workers (for all users).
@@ -139,13 +133,8 @@
 
 SigninManagerAndroid::~SigninManagerAndroid() {
   IdentityManagerFactory::GetForProfile(profile_)->RemoveObserver(this);
-}
-
-void SigninManagerAndroid::AbortSignIn(JNIEnv* env,
-                                       const JavaParamRef<jobject>& obj) {
-  policy::UserPolicySigninService* service =
-      policy::UserPolicySigninServiceFactory::GetForProfile(profile_);
-  service->ShutdownUserCloudPolicyManager();
+  // TODO(crbug.com/963408) Call SigninManager.java Destroy once ownership is
+  // reversed.
 }
 
 void SigninManagerAndroid::OnSignInCompleted(
@@ -178,24 +167,6 @@
       signin_metrics::SignoutDelete::IGNORE_METRIC);
 }
 
-base::android::ScopedJavaLocalRef<jstring>
-SigninManagerAndroid::GetManagementDomain(JNIEnv* env,
-                                          const JavaParamRef<jobject>& obj) {
-  base::android::ScopedJavaLocalRef<jstring> domain;
-
-  policy::UserCloudPolicyManager* manager =
-      profile_->GetUserCloudPolicyManager();
-  policy::CloudPolicyStore* store = manager->core()->store();
-
-  if (store && store->is_managed() && store->policy()->has_username()) {
-    domain.Reset(
-        base::android::ConvertUTF8ToJavaString(
-            env, gaia::ExtractDomainName(store->policy()->username())));
-  }
-
-  return domain;
-}
-
 void SigninManagerAndroid::WipeProfileData(
     JNIEnv* env,
     const JavaParamRef<jobject>& obj,
@@ -216,89 +187,6 @@
                      base::android::ScopedJavaGlobalRef<jobject>(j_callback)));
 }
 
-void SigninManagerAndroid::RegisterPolicyWithAccount(
-    const CoreAccountInfo& account,
-    RegisterPolicyWithAccountCallback callback) {
-  if (!ShouldLoadPolicyForUser(account.email)) {
-    std::move(callback).Run(base::nullopt);
-    return;
-  }
-
-  policy::UserPolicySigninService* service =
-      policy::UserPolicySigninServiceFactory::GetForProfile(profile_);
-
-  service->RegisterForPolicyWithAccountId(
-      account.email, account.account_id,
-      base::AdaptCallbackForRepeating(base::BindOnce(
-          [](RegisterPolicyWithAccountCallback callback,
-             const std::string& dm_token, const std::string& client_id) {
-            base::Optional<ManagementCredentials> credentials;
-            if (!dm_token.empty()) {
-              credentials.emplace(dm_token, client_id);
-            }
-            std::move(callback).Run(credentials);
-          },
-          std::move(callback))));
-}
-
-void SigninManagerAndroid::FetchAndApplyCloudPolicy(
-    JNIEnv* env,
-    const JavaParamRef<jobject>& obj,
-    const JavaParamRef<jstring>& j_username,
-    const base::android::JavaParamRef<jobject>& j_callback) {
-  std::string username =
-      base::android::ConvertJavaStringToUTF8(env, j_username);
-  DCHECK(!username.empty());
-  // TODO(bsazonov): Remove after migrating the sign-in flow to CoreAccountId.
-  // ExtractDomainName Dchecks that username is a valid email, in practice
-  // this checks that @ is present and is not the last character.
-  gaia::ExtractDomainName(username);
-  CoreAccountInfo account =
-      IdentityManagerFactory::GetForProfile(profile_)
-          ->FindAccountInfoForAccountWithRefreshTokenByEmailAddress(username)
-          .value();
-
-  auto callback =
-      base::BindOnce(base::android::RunRunnableAndroid,
-                     base::android::ScopedJavaGlobalRef<jobject>(j_callback));
-
-  RegisterPolicyWithAccount(
-      account,
-      base::BindOnce(&SigninManagerAndroid::OnPolicyRegisterDone,
-                     weak_factory_.GetWeakPtr(), account, std::move(callback)));
-}
-
-void SigninManagerAndroid::OnPolicyRegisterDone(
-    const CoreAccountInfo& account,
-    base::OnceClosure policy_callback,
-    const base::Optional<ManagementCredentials>& credentials) {
-  if (credentials) {
-    FetchPolicyBeforeSignIn(account, std::move(policy_callback),
-                            credentials.value());
-  } else {
-    // User's account does not have a policy to fetch.
-    std::move(policy_callback).Run();
-  }
-}
-
-void SigninManagerAndroid::FetchPolicyBeforeSignIn(
-    const CoreAccountInfo& account,
-    base::OnceClosure policy_callback,
-    const ManagementCredentials& credentials) {
-  policy::UserPolicySigninService* service =
-      policy::UserPolicySigninServiceFactory::GetForProfile(profile_);
-  scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory =
-      content::BrowserContext::GetDefaultStoragePartition(profile_)
-          ->GetURLLoaderFactoryForBrowserProcess();
-  service->FetchPolicyForSignedInUser(
-      AccountIdFromAccountInfo(account), credentials.dm_token,
-      credentials.client_id, url_loader_factory,
-      base::AdaptCallbackForRepeating(
-          base::BindOnce([](base::OnceClosure callback,
-                            bool success) { std::move(callback).Run(); },
-                         std::move(policy_callback))));
-}
-
 void SigninManagerAndroid::ClearLastSignedInUser(
     JNIEnv* env,
     const JavaParamRef<jobject>& obj) {
@@ -363,30 +251,6 @@
   return reinterpret_cast<intptr_t>(signin_manager_android);
 }
 
-void SigninManagerAndroid::IsAccountManaged(
-    JNIEnv* env,
-    const JavaParamRef<jobject>& obj,
-    const JavaParamRef<jstring>& j_username,
-    const JavaParamRef<jobject>& j_callback) {
-  base::android::ScopedJavaGlobalRef<jobject> callback(env, j_callback);
-  std::string username =
-      base::android::ConvertJavaStringToUTF8(env, j_username);
-
-  base::Optional<CoreAccountInfo> account =
-      IdentityManagerFactory::GetForProfile(profile_)
-          ->FindAccountInfoForAccountWithRefreshTokenByEmailAddress(username);
-
-  RegisterPolicyWithAccount(
-      account.value_or(CoreAccountInfo{}),
-      base::BindOnce(
-          [](base::android::ScopedJavaGlobalRef<jobject> callback,
-             const base::Optional<ManagementCredentials>& credentials) {
-            base::android::RunBooleanCallbackAndroid(callback,
-                                                     credentials.has_value());
-          },
-          callback));
-}
-
 base::android::ScopedJavaLocalRef<jstring> JNI_SigninManager_ExtractDomainName(
     JNIEnv* env,
     const JavaParamRef<jstring>& j_email) {
diff --git a/chrome/browser/android/signin/signin_manager_android.h b/chrome/browser/android/signin/signin_manager_android.h
index 5770c2b3..68c3d18 100644
--- a/chrome/browser/android/signin/signin_manager_android.h
+++ b/chrome/browser/android/signin/signin_manager_android.h
@@ -29,17 +29,6 @@
  public:
   SigninManagerAndroid(JNIEnv* env, jobject obj);
 
-  // Registers a CloudPolicyClient for fetching policy for a user and fetches
-  // the policy if necessary.
-  void FetchAndApplyCloudPolicy(
-      JNIEnv* env,
-      const base::android::JavaParamRef<jobject>& obj,
-      const base::android::JavaParamRef<jstring>& username,
-      const base::android::JavaParamRef<jobject>& j_callback);
-
-  void AbortSignIn(JNIEnv* env,
-                   const base::android::JavaParamRef<jobject>& obj);
-
   // Indicates that the user has made the choice to sign-in. |username|
   // contains the email address of the account to use as primary.
   void OnSignInCompleted(JNIEnv* env,
@@ -50,10 +39,6 @@
                const base::android::JavaParamRef<jobject>& obj,
                jint signoutReason);
 
-  base::android::ScopedJavaLocalRef<jstring> GetManagementDomain(
-      JNIEnv* env,
-      const base::android::JavaParamRef<jobject>& obj);
-
   // Delete all data for this profile.
   void WipeProfileData(JNIEnv* env,
                        const base::android::JavaParamRef<jobject>& obj,
@@ -82,47 +67,17 @@
   jboolean IsSignedInOnNative(JNIEnv* env,
                               const base::android::JavaParamRef<jobject>& obj);
 
-  void IsAccountManaged(JNIEnv* env,
-                        const base::android::JavaParamRef<jobject>& obj,
-                        const base::android::JavaParamRef<jstring>& j_username,
-                        const base::android::JavaParamRef<jobject>& j_callback);
-
   // identity::IdentityManager::Observer implementation.
   void OnPrimaryAccountCleared(
       const CoreAccountInfo& previous_primary_account_info) override;
 
  private:
-  struct ManagementCredentials {
-    ManagementCredentials(const std::string& dm_token,
-                          const std::string& client_id)
-        : dm_token(dm_token), client_id(client_id) {}
-    const std::string dm_token;
-    const std::string client_id;
-  };
-
-  using RegisterPolicyWithAccountCallback = base::OnceCallback<void(
-      const base::Optional<ManagementCredentials>& credentials)>;
-
   friend class SigninManagerAndroidTest;
   FRIEND_TEST_ALL_PREFIXES(SigninManagerAndroidTest,
                            DeleteGoogleServiceWorkerCaches);
 
   ~SigninManagerAndroid() override;
 
-  // If required registers for policy with given account. callback will be
-  // called with credentials if the account is managed.
-  void RegisterPolicyWithAccount(const CoreAccountInfo& account,
-                                 RegisterPolicyWithAccountCallback callback);
-
-  void OnPolicyRegisterDone(
-      const CoreAccountInfo& account_id,
-      base::OnceClosure policy_callback,
-      const base::Optional<ManagementCredentials>& credentials);
-
-  void FetchPolicyBeforeSignIn(const CoreAccountInfo& account_id,
-                               base::OnceClosure policy_callback,
-                               const ManagementCredentials& credentials);
-
   void OnBrowsingDataRemoverDone();
 
   void OnSigninAllowedPrefChanged();
diff --git a/chrome/browser/browser_process_platform_part_chromeos.cc b/chrome/browser/browser_process_platform_part_chromeos.cc
index 70df3b2..564992c 100644
--- a/chrome/browser/browser_process_platform_part_chromeos.cc
+++ b/chrome/browser/browser_process_platform_part_chromeos.cc
@@ -153,19 +153,16 @@
 void BrowserProcessPlatformPart::InitializePrimaryProfileServices(
     Profile* primary_profile) {
   DCHECK(primary_profile);
-  const user_manager::User* primary_user =
-      chromeos::ProfileHelper::Get()->GetUserByProfile(primary_profile);
-  DCHECK(primary_user);
 
   DCHECK(!kerberos_credentials_manager_);
   kerberos_credentials_manager_ =
       std::make_unique<chromeos::KerberosCredentialsManager>(
-          g_browser_process->local_state(), primary_user);
+          g_browser_process->local_state(), primary_profile);
 
   DCHECK(!in_session_password_change_manager_);
   in_session_password_change_manager_ =
-      chromeos::InSessionPasswordChangeManager::CreateIfEnabled(primary_profile,
-                                                                primary_user);
+      chromeos::InSessionPasswordChangeManager::CreateIfEnabled(
+          primary_profile);
 
   primary_profile_shutdown_subscription_ =
       PrimaryProfileServicesShutdownNotifierFactory::GetInstance()
diff --git a/chrome/browser/browser_resources.grd b/chrome/browser/browser_resources.grd
index 0e329859..15d6745bd 100644
--- a/chrome/browser/browser_resources.grd
+++ b/chrome/browser/browser_resources.grd
@@ -531,14 +531,7 @@
         <include name="IDR_PRODUCT_CHROMEOS_SYNC_CONSENT_SCREEN_ICONS" file="internal\resources\chromeos-sync-consent-icons.html" type="BINDATA" />
       </if>
       <if expr="_kiosk_next">
-        <if expr="_google_chrome">
-          <then>
-            <include name="IDR_KIOSK_NEXT_HOME_MANIFEST" file="resources\chromeos\kiosk_next_home\internal\manifest.json" type="BINDATA" />
-          </then>
-          <else>
-            <include name="IDR_KIOSK_NEXT_HOME_MANIFEST" file="resources\chromeos\kiosk_next_home\manifest.json" type="BINDATA" />
-          </else>
-        </if>
+        <include name="IDR_KIOSK_NEXT_HOME_MANIFEST" file="resources\chromeos\kiosk_next_home\manifest.json" type="BINDATA" />
       </if>
       <if expr="is_win">
         <include name="IDR_SET_AS_DEFAULT_BROWSER_JS" file="resources\set_as_default_browser.js" flattenhtml="true" type="BINDATA" />
diff --git a/chrome/browser/chromeos/BUILD.gn b/chrome/browser/chromeos/BUILD.gn
index 0b3320f..641b5a6 100644
--- a/chrome/browser/chromeos/BUILD.gn
+++ b/chrome/browser/chromeos/BUILD.gn
@@ -4,7 +4,6 @@
 
 import("//build/config/features.gni")
 import("//build/config/ui.gni")
-import("//chrome/browser/chromeos/kiosk_next_home/kiosk_next.gni")
 import("//extensions/buildflags/buildflags.gni")
 import("//media/media_options.gni")
 import("//printing/buildflags/buildflags.gni")
@@ -2161,13 +2160,6 @@
   if (use_cras) {
     defines += [ "USE_CRAS" ]
   }
-  if (enable_kiosk_next) {
-    defines += [ "KIOSK_NEXT" ]
-    if (is_chrome_branded) {
-      public_deps +=
-          [ "//chrome/browser/resources:kiosk_next_internal_resources" ]
-    }
-  }
 }
 
 copy("dbus_service_files") {
diff --git a/chrome/browser/chromeos/arc/fileapi/arc_file_system_bridge.cc b/chrome/browser/chromeos/arc/fileapi/arc_file_system_bridge.cc
index d81cede1..df7765ae 100644
--- a/chrome/browser/chromeos/arc/fileapi/arc_file_system_bridge.cc
+++ b/chrome/browser/chromeos/arc/fileapi/arc_file_system_bridge.cc
@@ -175,7 +175,8 @@
                                          ArcBridgeService* bridge_service)
     : profile_(Profile::FromBrowserContext(context)),
       bridge_service_(bridge_service),
-      select_files_handler_(std::make_unique<ArcSelectFilesHandler>(context)),
+      select_files_handlers_manager_(
+          std::make_unique<ArcSelectFilesHandlersManager>(context)),
       weak_ptr_factory_(this) {
   DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
   bridge_service_->file_system()->SetHost(this);
@@ -325,7 +326,8 @@
 
 void ArcFileSystemBridge::SelectFiles(mojom::SelectFilesRequestPtr request,
                                       SelectFilesCallback callback) {
-  select_files_handler_->SelectFiles(std::move(request), std::move(callback));
+  select_files_handlers_manager_->SelectFiles(std::move(request),
+                                              std::move(callback));
 }
 
 void ArcFileSystemBridge::OnFileSelectorEvent(
@@ -337,8 +339,8 @@
     std::move(callback).Run();
     return;
   }
-  select_files_handler_->OnFileSelectorEvent(std::move(event),
-                                             std::move(callback));
+  select_files_handlers_manager_->OnFileSelectorEvent(std::move(event),
+                                                      std::move(callback));
 }
 
 void ArcFileSystemBridge::GetFileSelectorElements(
@@ -350,8 +352,8 @@
     std::move(callback).Run(mojom::FileSelectorElements::New());
     return;
   }
-  select_files_handler_->GetFileSelectorElements(std::move(request),
-                                                 std::move(callback));
+  select_files_handlers_manager_->GetFileSelectorElements(std::move(request),
+                                                          std::move(callback));
 }
 
 void ArcFileSystemBridge::OpenFileToReadAfterGetFileSize(
diff --git a/chrome/browser/chromeos/arc/fileapi/arc_file_system_bridge.h b/chrome/browser/chromeos/arc/fileapi/arc_file_system_bridge.h
index a128068..47ce1e6 100644
--- a/chrome/browser/chromeos/arc/fileapi/arc_file_system_bridge.h
+++ b/chrome/browser/chromeos/arc/fileapi/arc_file_system_bridge.h
@@ -121,7 +121,7 @@
 
   std::list<FileStreamForwarderPtr> file_stream_forwarders_;
 
-  std::unique_ptr<ArcSelectFilesHandler> select_files_handler_;
+  std::unique_ptr<ArcSelectFilesHandlersManager> select_files_handlers_manager_;
 
   base::WeakPtrFactory<ArcFileSystemBridge> weak_ptr_factory_;
 
diff --git a/chrome/browser/chromeos/arc/fileapi/arc_select_files_handler.cc b/chrome/browser/chromeos/arc/fileapi/arc_select_files_handler.cc
index 474d632..4c7c1bc 100644
--- a/chrome/browser/chromeos/arc/fileapi/arc_select_files_handler.cc
+++ b/chrome/browser/chromeos/arc/fileapi/arc_select_files_handler.cc
@@ -18,9 +18,11 @@
 #include "chrome/browser/chromeos/file_manager/fileapi_util.h"
 #include "chrome/browser/chromeos/file_manager/path_util.h"
 #include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
 #include "chrome/browser/ui/chrome_select_file_policy.h"
 #include "chrome/browser/ui/views/select_file_dialog_extension.h"
 #include "chrome/common/chrome_isolated_world_ids.h"
+#include "components/arc/arc_util.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/render_frame_host.h"
 #include "content/public/browser/render_view_host.h"
@@ -29,6 +31,7 @@
 #include "net/base/mime_util.h"
 #include "storage/browser/fileapi/file_system_context.h"
 #include "storage/browser/fileapi/file_system_url.h"
+#include "ui/aura/window.h"
 #include "url/gurl.h"
 
 namespace arc {
@@ -154,6 +157,69 @@
 
 }  // namespace
 
+ArcSelectFilesHandlersManager::ArcSelectFilesHandlersManager(
+    content::BrowserContext* context)
+    : context_(context), weak_ptr_factory_(this) {}
+
+ArcSelectFilesHandlersManager::~ArcSelectFilesHandlersManager() = default;
+
+void ArcSelectFilesHandlersManager::SelectFiles(
+    const mojom::SelectFilesRequestPtr& request,
+    mojom::FileSystemHost::SelectFilesCallback callback) {
+  int task_id = request->task_id;
+  if (handlers_by_task_id_.find(task_id) != handlers_by_task_id_.end()) {
+    LOG(ERROR) << "SelectFileDialog is already shown for task ID : " << task_id;
+    std::move(callback).Run(mojom::SelectFilesResult::New());
+    return;
+  }
+
+  auto handler = std::make_unique<ArcSelectFilesHandler>(context_);
+  auto* handler_ptr = handler.get();
+  handlers_by_task_id_.emplace(task_id, std::move(handler));
+
+  // Make sure that the handler is erased when the SelectFileDialog is closed.
+  handler_ptr->SelectFiles(
+      std::move(request),
+      base::BindOnce(&ArcSelectFilesHandlersManager::EraseHandlerAndRunCallback,
+                     weak_ptr_factory_.GetWeakPtr(), task_id,
+                     std::move(callback)));
+}
+
+void ArcSelectFilesHandlersManager::OnFileSelectorEvent(
+    mojom::FileSelectorEventPtr event,
+    mojom::FileSystemHost::OnFileSelectorEventCallback callback) {
+  int task_id = event->creator_task_id;
+  auto iter = handlers_by_task_id_.find(task_id);
+  if (iter == handlers_by_task_id_.end()) {
+    LOG(ERROR) << "Can't find a SelectFileDialog for task ID : " << task_id;
+    std::move(callback).Run();
+    return;
+  }
+  iter->second->OnFileSelectorEvent(std::move(event), std::move(callback));
+}
+
+void ArcSelectFilesHandlersManager::GetFileSelectorElements(
+    mojom::GetFileSelectorElementsRequestPtr request,
+    mojom::FileSystemHost::GetFileSelectorElementsCallback callback) {
+  int task_id = request->creator_task_id;
+  auto iter = handlers_by_task_id_.find(task_id);
+  if (iter == handlers_by_task_id_.end()) {
+    LOG(ERROR) << "Can't find a SelectFileDialog for task ID : " << task_id;
+    std::move(callback).Run(mojom::FileSelectorElements::New());
+    return;
+  }
+  iter->second->GetFileSelectorElements(std::move(request),
+                                        std::move(callback));
+}
+
+void ArcSelectFilesHandlersManager::EraseHandlerAndRunCallback(
+    int task_id,
+    mojom::FileSystemHost::SelectFilesCallback callback,
+    mojom::SelectFilesResultPtr result) {
+  handlers_by_task_id_.erase(task_id);
+  std::move(callback).Run(std::move(result));
+}
+
 ArcSelectFilesHandler::ArcSelectFilesHandler(content::BrowserContext* context)
     : profile_(Profile::FromBrowserContext(context)) {
   dialog_holder_ = std::make_unique<SelectFileDialogHolder>(this);
@@ -166,13 +232,6 @@
     mojom::FileSystemHost::SelectFilesCallback callback) {
   DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
 
-  if (!callback_.is_null()) {
-    LOG(ERROR)
-        << "There is already a ui::SelectFileDialog being shown currently. "
-        << "We can't open multiple ui::SelectFileDialogs at one time.";
-    std::move(callback).Run(mojom::SelectFilesResult::New());
-    return;
-  }
   callback_ = std::move(callback);
 
   // TODO(niwa): Convert all request options.
@@ -185,8 +244,12 @@
   bool show_android_picker_apps =
       request->action_type == mojom::SelectFilesActionType::GET_CONTENT;
 
-  dialog_holder_->SelectFile(dialog_type, default_path, &file_type_info,
-                             request->task_id, show_android_picker_apps);
+  bool success =
+      dialog_holder_->SelectFile(dialog_type, default_path, &file_type_info,
+                                 request->task_id, show_android_picker_apps);
+  if (!success) {
+    std::move(callback_).Run(mojom::SelectFilesResult::New());
+  }
 }
 
 void ArcSelectFilesHandler::FileSelected(const base::FilePath& path,
@@ -301,19 +364,31 @@
     select_file_dialog_->ListenerDestroyed();
 }
 
-void SelectFileDialogHolder::SelectFile(
+bool SelectFileDialogHolder::SelectFile(
     ui::SelectFileDialog::Type type,
     const base::FilePath& default_path,
     const ui::SelectFileDialog::FileTypeInfo* file_types,
     int task_id,
     bool show_android_picker_apps) {
+  aura::Window* owner_window = nullptr;
+  for (auto* window : ChromeLauncherController::instance()->GetArcWindows()) {
+    if (arc::GetWindowTaskId(window) == task_id) {
+      owner_window = window;
+      break;
+    }
+  }
+  if (!owner_window) {
+    LOG(ERROR) << "Can't find the ARC window for task ID : " << task_id;
+    return false;
+  }
+
   select_file_dialog_->SelectFileWithFileManagerParams(
       type,
       /*title=*/base::string16(), default_path, file_types,
       /*file_type_index=*/0,
-      /*default_extension=*/base::FilePath::StringType(),
-      /*owning_window=*/nullptr,
-      /*params=*/nullptr, show_android_picker_apps);
+      /*default_extension=*/base::FilePath::StringType(), owner_window,
+      /*params=*/nullptr, task_id, show_android_picker_apps);
+  return true;
 }
 
 void SelectFileDialogHolder::ExecuteJavaScript(
diff --git a/chrome/browser/chromeos/arc/fileapi/arc_select_files_handler.h b/chrome/browser/chromeos/arc/fileapi/arc_select_files_handler.h
index 112df25..db27168 100644
--- a/chrome/browser/chromeos/arc/fileapi/arc_select_files_handler.h
+++ b/chrome/browser/chromeos/arc/fileapi/arc_select_files_handler.h
@@ -10,6 +10,7 @@
 #include "base/files/file_path.h"
 #include "base/macros.h"
 #include "base/memory/scoped_refptr.h"
+#include "base/memory/weak_ptr.h"
 #include "chrome/browser/ui/views/select_file_dialog_extension.h"
 #include "components/arc/common/file_system.mojom.h"
 #include "content/public/browser/render_frame_host.h"
@@ -23,6 +24,7 @@
 
 namespace arc {
 
+class ArcSelectFilesHandler;
 class SelectFileDialogHolder;
 
 // Exposed for testing.
@@ -32,7 +34,47 @@
 extern const char kScriptClickFile[];
 extern const char kScriptGetElements[];
 
-// Handler for FileSystemHost.SelectFiles.
+// Manages multiple ArcSelectFilesHandler instances.
+class ArcSelectFilesHandlersManager {
+ public:
+  explicit ArcSelectFilesHandlersManager(content::BrowserContext* context);
+  ~ArcSelectFilesHandlersManager();
+
+  // Handler for FileSystemHost.SelectFiles.
+  // Creates a new ArcSelectFilesHandler instance.
+  void SelectFiles(const mojom::SelectFilesRequestPtr& request,
+                   mojom::FileSystemHost::SelectFilesCallback callback);
+
+  // Handler for FileSystemHost.OnFileSelectorEvent.
+  // Routes the request to the right ArcSelectFilesHandler instance.
+  void OnFileSelectorEvent(
+      mojom::FileSelectorEventPtr event,
+      mojom::FileSystemHost::OnFileSelectorEventCallback callback);
+
+  // Handler for FileSystemHost.GetFileSelectorElements.
+  // Routes the request to the right ArcSelectFilesHandler instance.
+  void GetFileSelectorElements(
+      mojom::GetFileSelectorElementsRequestPtr request,
+      mojom::FileSystemHost::GetFileSelectorElementsCallback callback);
+
+ private:
+  // Helper function for SelectFiles.
+  void EraseHandlerAndRunCallback(
+      int task_id,
+      mojom::FileSystemHost::SelectFilesCallback callback,
+      mojom::SelectFilesResultPtr result);
+
+  content::BrowserContext* const context_;
+
+  // Map of Task ID -> ArcSelectFilesHandler.
+  std::map<int, std::unique_ptr<ArcSelectFilesHandler>> handlers_by_task_id_;
+
+  base::WeakPtrFactory<ArcSelectFilesHandlersManager> weak_ptr_factory_;
+
+  DISALLOW_COPY_AND_ASSIGN(ArcSelectFilesHandlersManager);
+};
+
+// Manages a single SelectFileDialog instance.
 class ArcSelectFilesHandler : public ui::SelectFileDialog::Listener {
  public:
   explicit ArcSelectFilesHandler(content::BrowserContext* context);
@@ -82,7 +124,9 @@
   explicit SelectFileDialogHolder(ui::SelectFileDialog::Listener* listener);
   virtual ~SelectFileDialogHolder();
 
-  virtual void SelectFile(ui::SelectFileDialog::Type type,
+  // Obtains the owner window from |task_id| and opens the select file dialog
+  // with it. Returns false if the owner window is not found.
+  virtual bool SelectFile(ui::SelectFileDialog::Type type,
                           const base::FilePath& default_path,
                           const ui::SelectFileDialog::FileTypeInfo* file_types,
                           int task_id,
diff --git a/chrome/browser/chromeos/arc/fileapi/arc_select_files_handler_unittest.cc b/chrome/browser/chromeos/arc/fileapi/arc_select_files_handler_unittest.cc
index f15dcc49..5677a154 100644
--- a/chrome/browser/chromeos/arc/fileapi/arc_select_files_handler_unittest.cc
+++ b/chrome/browser/chromeos/arc/fileapi/arc_select_files_handler_unittest.cc
@@ -27,6 +27,7 @@
 using arc::mojom::SelectFilesRequest;
 using arc::mojom::SelectFilesRequestPtr;
 using testing::_;
+using testing::Return;
 using ui::SelectFileDialog;
 
 namespace arc {
@@ -80,7 +81,7 @@
       : SelectFileDialogHolder(listener) {}
   ~MockSelectFileDialogHolder() override = default;
   MOCK_METHOD5(SelectFile,
-               void(ui::SelectFileDialog::Type type,
+               bool(ui::SelectFileDialog::Type type,
                     const base::FilePath& default_path,
                     const ui::SelectFileDialog::FileTypeInfo* file_types,
                     int task_id,
@@ -111,6 +112,8 @@
     mock_dialog_holder_ = mock_dialog_holder.get();
     arc_select_files_handler_->SetDialogHolderForTesting(
         std::move(mock_dialog_holder));
+    ON_CALL(*mock_dialog_holder_, SelectFile(_, _, _, _, _))
+        .WillByDefault(Return(true));
   }
 
   void TearDown() override {
diff --git a/chrome/browser/chromeos/certificate_provider/certificate_provider_service.cc b/chrome/browser/chromeos/certificate_provider/certificate_provider_service.cc
index 04be5f4..f88def0 100644
--- a/chrome/browser/chromeos/certificate_provider/certificate_provider_service.cc
+++ b/chrome/browser/chromeos/certificate_provider/certificate_provider_service.cc
@@ -329,6 +329,14 @@
   delegate_ = std::move(delegate);
 }
 
+void CertificateProviderService::AddObserver(Observer* observer) {
+  observers_.AddObserver(observer);
+}
+
+void CertificateProviderService::RemoveObserver(Observer* observer) {
+  observers_.RemoveObserver(observer);
+}
+
 bool CertificateProviderService::SetCertificatesProvidedByExtension(
     const std::string& extension_id,
     int cert_request_id,
@@ -358,8 +366,10 @@
     const std::vector<uint8_t>& signature) {
   DCHECK(thread_checker_.CalledOnValidThread());
 
+  scoped_refptr<net::X509Certificate> certificate;
   net::SSLPrivateKey::SignCallback callback;
-  if (!sign_requests_.RemoveRequest(extension_id, sign_request_id, &callback)) {
+  if (!sign_requests_.RemoveRequest(extension_id, sign_request_id, &certificate,
+                                    &callback)) {
     LOG(ERROR) << "request id unknown.";
     // Maybe multiple replies to the same request.
     return;
@@ -367,6 +377,11 @@
 
   const net::Error error_code = signature.empty() ? net::ERR_FAILED : net::OK;
   std::move(callback).Run(error_code, signature);
+
+  if (!signature.empty()) {
+    for (auto& observer : observers_)
+      observer.OnSignCompleted(certificate);
+  }
 }
 
 bool CertificateProviderService::LookUpCertificate(
@@ -515,10 +530,12 @@
   DCHECK(thread_checker_.CalledOnValidThread());
 
   const int sign_request_id =
-      sign_requests_.AddRequest(extension_id, std::move(callback));
+      sign_requests_.AddRequest(extension_id, certificate, std::move(callback));
   if (!delegate_->DispatchSignRequestToExtension(
           extension_id, sign_request_id, algorithm, certificate, digest)) {
-    sign_requests_.RemoveRequest(extension_id, sign_request_id, &callback);
+    scoped_refptr<net::X509Certificate> local_certificate;
+    sign_requests_.RemoveRequest(extension_id, sign_request_id,
+                                 &local_certificate, &callback);
     std::move(callback).Run(net::ERR_FAILED, std::vector<uint8_t>());
   }
 }
diff --git a/chrome/browser/chromeos/certificate_provider/certificate_provider_service.h b/chrome/browser/chromeos/certificate_provider/certificate_provider_service.h
index 6748f4b..4d310ffd 100644
--- a/chrome/browser/chromeos/certificate_provider/certificate_provider_service.h
+++ b/chrome/browser/chromeos/certificate_provider/certificate_provider_service.h
@@ -17,6 +17,7 @@
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
+#include "base/observer_list.h"
 #include "base/threading/thread_checker.h"
 #include "chrome/browser/chromeos/certificate_provider/certificate_info.h"
 #include "chrome/browser/chromeos/certificate_provider/certificate_requests.h"
@@ -95,6 +96,13 @@
     DISALLOW_COPY_AND_ASSIGN(Delegate);
   };
 
+  class Observer : public base::CheckedObserver {
+   public:
+    // Called when a sign request gets successfully completed.
+    virtual void OnSignCompleted(
+        const scoped_refptr<net::X509Certificate>& certificate) {}
+  };
+
   // |SetDelegate| must be called exactly once directly after construction.
   CertificateProviderService();
   ~CertificateProviderService() override;
@@ -105,6 +113,9 @@
   // OnExtensionUnloaded) in the delegate's destructor on behalf of the service.
   void SetDelegate(std::unique_ptr<Delegate> delegate);
 
+  void AddObserver(Observer* observer);
+  void RemoveObserver(Observer* observer);
+
   // Must be called with the reply of an extension to a previous certificate
   // request. For each request, it is expected that every registered extension
   // replies exactly once with the latest list of certificates.
@@ -215,6 +226,8 @@
 
   std::unique_ptr<Delegate> delegate_;
 
+  base::ObserverList<Observer> observers_;
+
   // The object to manage the dialog displayed when requestPin is called by the
   // extension.
   PinDialogManager pin_dialog_manager_;
diff --git a/chrome/browser/chromeos/certificate_provider/certificate_provider_service_unittest.cc b/chrome/browser/chromeos/certificate_provider/certificate_provider_service_unittest.cc
index 6833f16..f75471c 100644
--- a/chrome/browser/chromeos/certificate_provider/certificate_provider_service_unittest.cc
+++ b/chrome/browser/chromeos/certificate_provider/certificate_provider_service_unittest.cc
@@ -12,12 +12,14 @@
 #include "base/bind.h"
 #include "base/containers/span.h"
 #include "base/macros.h"
+#include "base/memory/ref_counted.h"
 #include "base/stl_util.h"
 #include "base/test/test_mock_time_task_runner.h"
 #include "base/threading/thread_task_runner_handle.h"
 #include "chrome/browser/chromeos/certificate_provider/certificate_provider.h"
 #include "net/base/net_errors.h"
 #include "net/cert/asn1_util.h"
+#include "net/cert/x509_certificate.h"
 #include "net/cert/x509_util.h"
 #include "net/test/cert_test_util.h"
 #include "net/test/test_data_directory.h"
@@ -135,6 +137,12 @@
   DISALLOW_COPY_AND_ASSIGN(TestDelegate);
 };
 
+class MockObserver : public CertificateProviderService::Observer {
+ public:
+  MOCK_METHOD1(OnSignCompleted,
+               void(const scoped_refptr<net::X509Certificate>& certificate));
+};
+
 }  // namespace
 
 class CertificateProviderServiceTest : public testing::Test {
@@ -149,6 +157,8 @@
     test_delegate_ = test_delegate.get();
     service_->SetDelegate(std::move(test_delegate));
 
+    service_->AddObserver(&observer_);
+
     certificate_provider_ = service_->CreateCertificateProvider();
     EXPECT_TRUE(certificate_provider_);
 
@@ -230,6 +240,7 @@
   scoped_refptr<base::TestMockTimeTaskRunner> task_runner_;
   base::ThreadTaskRunnerHandle task_runner_handle_;
   TestDelegate* test_delegate_ = nullptr;
+  testing::StrictMock<MockObserver> observer_;
   std::unique_ptr<CertificateProvider> certificate_provider_;
   std::unique_ptr<CertificateProviderService> service_;
   const certificate_provider::CertificateInfo cert_info1_;
@@ -494,6 +505,8 @@
   // No signature received until the extension replied to the service.
   EXPECT_TRUE(received_signature.empty());
 
+  EXPECT_CALL(observer_, OnSignCompleted(cert_info1_.certificate));
+
   std::vector<uint8_t> signature_reply;
   signature_reply.push_back(5);
   signature_reply.push_back(7);
@@ -572,6 +585,8 @@
   // No signature received until the extension replied to the service.
   EXPECT_TRUE(received_signature.empty());
 
+  EXPECT_CALL(observer_, OnSignCompleted(cert_info1_.certificate));
+
   std::vector<uint8_t> signature_reply;
   signature_reply.push_back(5);
   signature_reply.push_back(7);
diff --git a/chrome/browser/chromeos/certificate_provider/sign_requests.cc b/chrome/browser/chromeos/certificate_provider/sign_requests.cc
index e0e9fe8..fcf3fed 100644
--- a/chrome/browser/chromeos/certificate_provider/sign_requests.cc
+++ b/chrome/browser/chromeos/certificate_provider/sign_requests.cc
@@ -4,11 +4,22 @@
 
 #include "chrome/browser/chromeos/certificate_provider/sign_requests.h"
 
-#include "base/callback.h"
+#include <utility>
 
 namespace chromeos {
 namespace certificate_provider {
 
+SignRequests::Request::Request(
+    const scoped_refptr<net::X509Certificate>& certificate,
+    net::SSLPrivateKey::SignCallback callback)
+    : certificate(certificate), callback(std::move(callback)) {}
+
+SignRequests::Request::Request(Request&& other) = default;
+
+SignRequests::Request::~Request() = default;
+
+SignRequests::Request& SignRequests::Request::operator=(Request&&) = default;
+
 SignRequests::RequestsState::RequestsState() {}
 
 SignRequests::RequestsState::RequestsState(RequestsState&& other) = default;
@@ -19,25 +30,31 @@
 
 SignRequests::~SignRequests() {}
 
-int SignRequests::AddRequest(const std::string& extension_id,
-                             net::SSLPrivateKey::SignCallback callback) {
+int SignRequests::AddRequest(
+    const std::string& extension_id,
+    const scoped_refptr<net::X509Certificate>& certificate,
+    net::SSLPrivateKey::SignCallback callback) {
   RequestsState& state = extension_to_requests_[extension_id];
   const int request_id = state.next_free_id++;
-  state.pending_requests[request_id] = std::move(callback);
+  state.pending_requests.emplace(request_id,
+                                 Request(certificate, std::move(callback)));
   return request_id;
 }
 
-bool SignRequests::RemoveRequest(const std::string& extension_id,
-                                 int request_id,
-                                 net::SSLPrivateKey::SignCallback* callback) {
+bool SignRequests::RemoveRequest(
+    const std::string& extension_id,
+    int request_id,
+    scoped_refptr<net::X509Certificate>* certificate,
+    net::SSLPrivateKey::SignCallback* callback) {
   RequestsState& state = extension_to_requests_[extension_id];
-  std::map<int, net::SSLPrivateKey::SignCallback>& pending =
-      state.pending_requests;
+  std::map<int, Request>& pending = state.pending_requests;
   const auto it = pending.find(request_id);
   if (it == pending.end())
     return false;
+  Request& request = it->second;
 
-  *callback = std::move(it->second);
+  *certificate = request.certificate;
+  *callback = std::move(request.callback);
   pending.erase(it);
   return true;
 }
@@ -46,7 +63,7 @@
     const std::string& extension_id) {
   std::vector<net::SSLPrivateKey::SignCallback> callbacks;
   for (auto& entry : extension_to_requests_[extension_id].pending_requests) {
-    callbacks.push_back(std::move(entry.second));
+    callbacks.push_back(std::move(entry.second.callback));
   }
   extension_to_requests_.erase(extension_id);
   return callbacks;
diff --git a/chrome/browser/chromeos/certificate_provider/sign_requests.h b/chrome/browser/chromeos/certificate_provider/sign_requests.h
index d27884b..c01427e 100644
--- a/chrome/browser/chromeos/certificate_provider/sign_requests.h
+++ b/chrome/browser/chromeos/certificate_provider/sign_requests.h
@@ -9,7 +9,10 @@
 #include <string>
 #include <vector>
 
+#include "base/callback.h"
 #include "base/macros.h"
+#include "base/memory/ref_counted.h"
+#include "net/cert/x509_certificate.h"
 #include "net/ssl/ssl_private_key.h"
 
 namespace chromeos {
@@ -23,13 +26,15 @@
   // Returns the id of the new request. The returned request id is specific to
   // the given extension.
   int AddRequest(const std::string& extension_id,
+                 const scoped_refptr<net::X509Certificate>& certificate,
                  net::SSLPrivateKey::SignCallback callback);
 
   // Returns false if no request with the given id for |extension_id|
-  // could be found. Otherwise removes the request and sets |callback| to the
-  // callback that was provided with AddRequest().
+  // could be found. Otherwise removes the request and sets |certificate| and
+  // |callback| to the values that were provided with AddRequest().
   bool RemoveRequest(const std::string& extension_id,
                      int request_id,
+                     scoped_refptr<net::X509Certificate>* certificate,
                      net::SSLPrivateKey::SignCallback* callback);
 
   // Remove all pending requests for this extension and return their
@@ -38,15 +43,28 @@
       const std::string& extension_id);
 
  private:
+  struct Request {
+    Request(const scoped_refptr<net::X509Certificate>& certificate,
+            net::SSLPrivateKey::SignCallback callback);
+    Request(Request&& other);
+    ~Request();
+    Request& operator=(Request&&);
+
+    scoped_refptr<net::X509Certificate> certificate;
+    net::SSLPrivateKey::SignCallback callback;
+
+   private:
+    DISALLOW_COPY_AND_ASSIGN(Request);
+  };
+
   // Holds state of all sign requests to a single extension.
   struct RequestsState {
     RequestsState();
     RequestsState(RequestsState&& other);
     ~RequestsState();
 
-    // Maps from request id to the SignCallback that must be called with the
-    // signature or error.
-    std::map<int, net::SSLPrivateKey::SignCallback> pending_requests;
+    // Maps from request id to the request state.
+    std::map<int, Request> pending_requests;
 
     // The request id that will be used for the next sign request to this
     // extension.
diff --git a/chrome/browser/chromeos/kerberos/kerberos_credentials_manager.cc b/chrome/browser/chromeos/kerberos/kerberos_credentials_manager.cc
index 11d94ad9..183083e 100644
--- a/chrome/browser/chromeos/kerberos/kerberos_credentials_manager.cc
+++ b/chrome/browser/chromeos/kerberos/kerberos_credentials_manager.cc
@@ -10,6 +10,10 @@
 #include "base/strings/stringprintf.h"
 #include "base/threading/thread_task_runner_handle.h"
 #include "chrome/browser/chromeos/authpolicy/data_pipe_utils.h"
+#include "chrome/browser/chromeos/login/session/user_session_manager.h"
+#include "chrome/browser/chromeos/profiles/profile_helper.h"
+#include "chrome/browser/policy/profile_policy_connector.h"
+#include "chrome/browser/profiles/profile.h"
 #include "chrome/common/pref_names.h"
 #include "chromeos/dbus/kerberos/kerberos_client.h"
 #include "chromeos/dbus/kerberos/kerberos_service.pb.h"
@@ -37,6 +41,9 @@
 constexpr char kLoginId[] = "LOGIN_ID";
 constexpr char kLoginEmail[] = "LOGIN_EMAIL";
 
+// Password placeholder.
+constexpr char kLoginPasswordPlaceholder[] = "${PASSWORD}";
+
 // Default encryption with strong encryption.
 constexpr char kDefaultKerberosConfig[] = R"([libdefaults]
   default_tgs_enctypes = aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96
@@ -95,14 +102,18 @@
   // Kicks off the flow to add (or re-authenticate) a Kerberos account.
   // |manager| is a non-owned pointer to the owning manager.
   // |normalized_principal| is the normalized user principal name, e.g.
-  // user@REALM.COM. |is_managed| is true for accounts set by admins via policy.
-  // |password| is the password of the account. If |remember_password| is true,
-  // the password is remembered by the daemon. |krb5_conf| is set as
-  // configuration. If |allow_existing| is false and an account for
-  // |principal_name| already exists, no action is performed and the method
-  // returns with ERROR_DUPLICATE_PRINCIPAL_NAME. If true, the existing account
-  // is updated. |callback| is called by OnAddAccountRunnerDone() at the end of
-  // the flow, see class description.
+  //   user@REALM.COM.
+  // |is_managed| is true for accounts set by admins via policy.
+  // |password| is the password of the account. If it matches "${PASSWORD}" and
+  //   the account is managed, the login password is used.
+  // If |remember_password| is true, the password is remembered by the daemon.
+  //   The flag has effect when the login password is used.
+  // |krb5_conf| is set as configuration.
+  // If |allow_existing| is false and an account for |principal_name| already
+  //   exists, no action is performed and the method returns with
+  //   ERROR_DUPLICATE_PRINCIPAL_NAME. If true, the existing account is updated.
+  // |callback| is called by OnAddAccountRunnerDone() at the end of the flow,
+  //   see class description.
   KerberosAddAccountRunner(KerberosCredentialsManager* manager,
                            std::string normalized_principal,
                            bool is_managed,
@@ -171,7 +182,8 @@
   }
 
   // Authenticates |normalized_principal_| using |password_| if |password_| is
-  // set. Otherwise, continues with Done().
+  // set. Otherwise, continues with Done(). If |password_| is "${PASSWORD}" and
+  // the account is managed, the login password is used.
   void MaybeAcquireKerberosTgt() {
     if (!password_) {
       Done(kerberos::ERROR_NONE);
@@ -181,6 +193,8 @@
     kerberos::AcquireKerberosTgtRequest request;
     request.set_principal_name(normalized_principal_);
     request.set_remember_password(remember_password_);
+    request.set_use_login_password(is_managed_ &&
+                                   *password_ == kLoginPasswordPlaceholder);
     KerberosClient::Get()->AcquireKerberosTgt(
         request, data_pipe_utils::GetDataReadPipe(*password_).get(),
         base::BindOnce(&KerberosAddAccountRunner::OnAcquireKerberosTgt,
@@ -251,20 +265,24 @@
 
 KerberosCredentialsManager::Observer::~Observer() = default;
 
-KerberosCredentialsManager::KerberosCredentialsManager(
-    PrefService* local_state,
-    const user_manager::User* primary_user)
+KerberosCredentialsManager::KerberosCredentialsManager(PrefService* local_state,
+                                                       Profile* primary_profile)
     : local_state_(local_state),
+      primary_profile_(primary_profile),
       kerberos_files_handler_(
           base::BindRepeating(&KerberosCredentialsManager::GetKerberosFiles,
                               base::Unretained(this))) {
   DCHECK(!g_instance);
   g_instance = this;
 
+  DCHECK(primary_profile_);
+  const user_manager::User* primary_user =
+      chromeos::ProfileHelper::Get()->GetUserByProfile(primary_profile);
+  DCHECK(primary_user);
+
   // Set up expansions:
   //   '${LOGIN_ID}'    -> 'user'
   //   '${LOGIN_EMAIL}' -> 'user@EXAMPLE.COM'
-  DCHECK(primary_user);
   std::map<std::string, std::string> substitutions;
   substitutions[kLoginId] =
       primary_user->GetAccountName(false /* use_display_email */);
@@ -300,10 +318,28 @@
       base::BindRepeating(&KerberosCredentialsManager::UpdateAccountsFromPref,
                           weak_factory_.GetWeakPtr()));
 
-  UpdateAccountsFromPref();
+  // Update accounts if policy is already available or start observing.
+  policy_service_ =
+      primary_profile->GetProfilePolicyConnector()->policy_service();
+  const bool policy_initialized =
+      policy_service_->IsInitializationComplete(policy::POLICY_DOMAIN_CHROME);
+  VLOG(1) << "Policy service initialized at startup: " << policy_initialized;
+  if (policy_initialized)
+    UpdateAccountsFromPref();
+  else
+    policy_service_->AddObserver(policy::POLICY_DOMAIN_CHROME, this);
+
+  // Get Kerberos files if there is an active principal. This also wakes up the
+  // daemon, which is important as it starts background renewal processes.
+  if (!GetActivePrincipalName().empty()) {
+    VLOG(1) << "Waking up Kerberos (the daemon, not the 3-headed dog) and "
+               "refreshing credentials.";
+    GetKerberosFiles();
+  }
 }
 
 KerberosCredentialsManager::~KerberosCredentialsManager() {
+  policy_service_->RemoveObserver(policy::POLICY_DOMAIN_CHROME, this);
   DCHECK(g_instance);
   g_instance = nullptr;
 }
@@ -323,6 +359,12 @@
   registry->RegisterListPref(prefs::kKerberosAccounts);
 }
 
+void KerberosCredentialsManager::RegisterProfilePrefs(
+    PrefRegistrySimple* registry) {
+  registry->RegisterStringPref(prefs::kKerberosActivePrincipalName,
+                               std::string());
+}
+
 // static
 KerberosCredentialsManager::ResultCallback
 KerberosCredentialsManager::EmptyResultCallback() {
@@ -336,6 +378,24 @@
   return kDefaultKerberosConfig;
 }
 
+void KerberosCredentialsManager::OnPolicyUpdated(
+    const policy::PolicyNamespace& ns,
+    const policy::PolicyMap& previous,
+    const policy::PolicyMap& current) {
+  // Ignore this call. Policy changes are already observed by the registrar.
+}
+
+void KerberosCredentialsManager::OnPolicyServiceInitialized(
+    policy::PolicyDomain domain) {
+  DCHECK(domain == policy::POLICY_DOMAIN_CHROME);
+
+  if (policy_service_->IsInitializationComplete(policy::POLICY_DOMAIN_CHROME)) {
+    VLOG(1) << "Policy service initialized";
+    policy_service_->RemoveObserver(policy::POLICY_DOMAIN_CHROME, this);
+    UpdateAccountsFromPref();
+  }
+}
+
 void KerberosCredentialsManager::AddObserver(Observer* observer) {
   observers_.AddObserver(observer);
 }
@@ -382,13 +442,13 @@
   if (Succeeded(error)) {
     // Don't change the active account if an account is added by policy.
     if (!is_managed)
-      active_principal_name_ = updated_principal;
+      SetActivePrincipalName(updated_principal);
 
     // Set active account.
     // TODO(https://crbug.com/948121): Wait until the files have been saved.
     // This is important when this code is triggered directly through a page
     // that requires Kerberos auth.
-    if (active_principal_name_ == updated_principal)
+    if (GetActivePrincipalName() == updated_principal)
       GetKerberosFiles();
 
     // Bring the merry news to the observers, but only if there is no
@@ -420,9 +480,9 @@
   LogError("RemoveAccount", response.error());
   if (Succeeded(response.error())) {
     // Clear out active credentials.
-    if (active_principal_name_ == principal_name) {
+    if (GetActivePrincipalName() == principal_name) {
       kerberos_files_handler_.DeleteFiles();
-      active_principal_name_.clear();
+      ClearActivePrincipalName();
     }
 
     // Express our condolence to the observers.
@@ -446,7 +506,7 @@
   if (Succeeded(response.error())) {
     // Clear out active credentials.
     kerberos_files_handler_.DeleteFiles();
-    active_principal_name_.clear();
+    ClearActivePrincipalName();
 
     // Tattle on the lost accounts to the observers.
     NotifyAccountsChanged();
@@ -466,6 +526,8 @@
     ListAccountsCallback callback,
     const kerberos::ListAccountsResponse& response) {
   LogError("ListAccounts", response.error());
+  // Lazily validate principal here.
+  ValidateActivePrincipal(response);
   std::move(callback).Run(response);
 }
 
@@ -476,7 +538,7 @@
 
   // Don't early out if names are equal, this might be required to bootstrap
   // Kerberos credentials.
-  active_principal_name_ = principal_name;
+  SetActivePrincipalName(principal_name);
   GetKerberosFiles();
   NotifyAccountsChanged();
   return kerberos::ERROR_NONE;
@@ -531,11 +593,13 @@
 }
 
 void KerberosCredentialsManager::GetKerberosFiles() {
-  if (active_principal_name_.empty())
+  if (GetActivePrincipalName().empty())
     return;
 
+  VLOG(1) << "Refreshing credentials for " << GetActivePrincipalName();
+
   kerberos::GetKerberosFilesRequest request;
-  request.set_principal_name(active_principal_name_);
+  request.set_principal_name(GetActivePrincipalName());
   KerberosClient::Get()->GetKerberosFiles(
       request,
       base::BindOnce(&KerberosCredentialsManager::OnGetKerberosFiles,
@@ -550,22 +614,28 @@
     return;
 
   // Ignore if the principal changed in the meantime.
-  if (active_principal_name_ != principal_name) {
+  if (GetActivePrincipalName() != principal_name) {
     VLOG(1) << "Ignoring Kerberos files. Active principal changed from "
-            << principal_name << " to " << active_principal_name_;
+            << principal_name << " to " << GetActivePrincipalName();
     return;
   }
 
-  auto nullstr = base::Optional<std::string>();
-  kerberos_files_handler_.SetFiles(
-      response.files().has_krb5cc() ? response.files().krb5cc() : nullstr,
-      response.files().has_krb5conf() ? response.files().krb5conf() : nullstr);
+  // In case the credential cache is missing, remove the files. This could
+  // happen when switching from an account with ticket to an account without
+  // ticket. In that case, the files must go.
+  if (response.files().has_krb5cc()) {
+    DCHECK(response.files().has_krb5conf());
+    kerberos_files_handler_.SetFiles(response.files().krb5cc(),
+                                     response.files().krb5conf());
+  } else {
+    kerberos_files_handler_.DeleteFiles();
+  }
 }
 
 void KerberosCredentialsManager::OnKerberosFilesChanged(
     const std::string& principal_name) {
   // Only listen to the active account.
-  if (principal_name == active_principal_name_)
+  if (principal_name == GetActivePrincipalName())
     GetKerberosFiles();
 }
 
@@ -574,10 +644,44 @@
     observer.OnAccountsChanged();
 }
 
+const std::string& KerberosCredentialsManager::GetActivePrincipalName() const {
+  // Using Get()->GetString() instead of GetString() directly to prevent a
+  // string copy.
+  return primary_profile_->GetPrefs()
+      ->Get(prefs::kKerberosActivePrincipalName)
+      ->GetString();
+}
+
+void KerberosCredentialsManager::SetActivePrincipalName(
+    const std::string& principal_name) {
+  primary_profile_->GetPrefs()->SetString(prefs::kKerberosActivePrincipalName,
+                                          principal_name);
+}
+
+void KerberosCredentialsManager::ClearActivePrincipalName() {
+  primary_profile_->GetPrefs()->ClearPref(prefs::kKerberosActivePrincipalName);
+}
+
+void KerberosCredentialsManager::ValidateActivePrincipal(
+    const kerberos::ListAccountsResponse& response) {
+  const std::string& active_principal = GetActivePrincipalName();
+  bool found = false;
+  for (int n = 0; n < response.accounts_size() && !found; ++n)
+    found |= response.accounts(n).principal_name() == active_principal;
+  if (!found) {
+    LOG(ERROR) << "Active principal does not exist. Restoring.";
+    if (response.accounts_size() > 0)
+      SetActivePrincipalName(response.accounts(0).principal_name());
+    else
+      ClearActivePrincipalName();
+  }
+}
+
 void KerberosCredentialsManager::UpdateEnabledFromPref() {
   const bool enabled = local_state_->GetBoolean(prefs::kKerberosEnabled);
   if (!enabled) {
     // Note that ClearAccounts logs an error if the operation fails.
+    VLOG(1) << "Kerberos got disabled, clearing accounts";
     ClearAccounts(base::BindOnce([](kerberos::ErrorType) {}));
   }
 }
@@ -591,13 +695,21 @@
 }
 
 void KerberosCredentialsManager::UpdateAccountsFromPref() {
-  if (!local_state_->GetBoolean(prefs::kKerberosEnabled))
+  if (!local_state_->GetBoolean(prefs::kKerberosEnabled)) {
+    VLOG(1) << "Kerberos disabled";
+    NotifyRequiresLoginPassword(false);
     return;
+  }
 
   const base::Value* accounts = local_state_->GetList(prefs::kKerberosAccounts);
-  if (!accounts)
+  if (!accounts) {
+    VLOG(1) << "No KerberosAccounts policy";
+    NotifyRequiresLoginPassword(false);
     return;
+  }
 
+  VLOG(1) << accounts->GetList().size() << " accounts in KerberosAccounts";
+  bool requires_login_password = false;
   for (const auto& account : accounts->GetList()) {
     // Get the principal. Should always be set.
     const base::Value* principal_value = account.FindPath(kPrincipal);
@@ -613,8 +725,8 @@
     }
 
     // Kickstart active principal if it's not set yet.
-    if (active_principal_name_.empty())
-      active_principal_name_ = principal;
+    if (GetActivePrincipalName().empty())
+      SetActivePrincipalName(principal);
 
     // Get the password, default to not set.
     const std::string* password_str = account.FindStringKey(kPassword);
@@ -622,9 +734,9 @@
     if (password_str)
       password = std::move(*password_str);
 
-    // Note: Password supports expansion of '${PASSWORD}' into the login
-    // password. This is done in the daemon, however, since Chrome forgets the
-    // password ASAP for security reasons.
+    // Keep track of whether any account has the '${PASSWORD}' placeholder.
+    if (password == kLoginPasswordPlaceholder)
+      requires_login_password = true;
 
     // Get the remember password flag, default to false.
     bool remember_password =
@@ -650,6 +762,17 @@
         this, principal, true /* is_managed */, password, remember_password,
         krb5_conf, true /* allow_existing */, EmptyResultCallback()));
   }
+
+  // Let UserSessionManager know whether it should keep the login password.
+  NotifyRequiresLoginPassword(requires_login_password);
+}
+
+void KerberosCredentialsManager::NotifyRequiresLoginPassword(
+    bool requires_login_password) {
+  VLOG(1) << "Requires login password: " << requires_login_password;
+  UserSessionManager::GetInstance()->VoteForSavingLoginPassword(
+      UserSessionManager::PasswordConsumingService::kKerberos,
+      requires_login_password);
 }
 
 }  // namespace chromeos
diff --git a/chrome/browser/chromeos/kerberos/kerberos_credentials_manager.h b/chrome/browser/chromeos/kerberos/kerberos_credentials_manager.h
index 6527199..730a05b 100644
--- a/chrome/browser/chromeos/kerberos/kerberos_credentials_manager.h
+++ b/chrome/browser/chromeos/kerberos/kerberos_credentials_manager.h
@@ -15,13 +15,16 @@
 #include "base/optional.h"
 #include "chrome/browser/chromeos/authpolicy/kerberos_files_handler.h"
 #include "chromeos/dbus/kerberos/kerberos_service.pb.h"
+#include "components/policy/core/common/policy_namespace.h"
+#include "components/policy/core/common/policy_service.h"
 
 class PrefRegistrySimple;
 class PrefService;
 class PrefChangeRegistrar;
+class Profile;
 
-namespace user_manager {
-class User;
+namespace policy {
+class PolicyMap;
 }
 
 namespace chromeos {
@@ -29,7 +32,7 @@
 class KerberosAddAccountRunner;
 class VariableExpander;
 
-class KerberosCredentialsManager final {
+class KerberosCredentialsManager : public policy::PolicyService::Observer {
  public:
   using ResultCallback = base::OnceCallback<void(kerberos::ErrorType)>;
   using ListAccountsCallback =
@@ -49,8 +52,8 @@
   };
 
   KerberosCredentialsManager(PrefService* local_state,
-                             const user_manager::User* primary_user);
-  ~KerberosCredentialsManager();
+                             Profile* primary_profile);
+  ~KerberosCredentialsManager() override;
 
   // Singleton accessor. Available once the primary profile is available.
   // DCHECKs if the instance has not been created yet.
@@ -59,12 +62,23 @@
   // Registers prefs stored in local state.
   static void RegisterLocalStatePrefs(PrefRegistrySimple* registry);
 
+  // Registers prefs stored in user profiles.
+  static void RegisterProfilePrefs(PrefRegistrySimple* registry);
+
   // Helper method for ignoring the results of method calls.
   static ResultCallback EmptyResultCallback();
 
   // Returns the default Kerberos configuration (krb5.conf).
   static const char* GetDefaultKerberosConfig();
 
+  // PolicyService:
+  void OnPolicyUpdated(const policy::PolicyNamespace& ns,
+                       const policy::PolicyMap& previous,
+                       const policy::PolicyMap& current) override;
+
+  // PolicyService:
+  void OnPolicyServiceInitialized(policy::PolicyDomain domain) override;
+
   // Start observing this object. |observer| is not owned.
   void AddObserver(Observer* observer);
 
@@ -117,7 +131,9 @@
   kerberos::ErrorType SetActiveAccount(std::string principal_name);
 
   // Returns the currently active account or an empty string if there is none.
-  const std::string& GetActiveAccount() { return active_principal_name_; }
+  const std::string& GetActiveAccount() const {
+    return GetActivePrincipalName();
+  }
 
  private:
   friend class KerberosAddAccountRunner;
@@ -164,15 +180,38 @@
   // Calls OnAccountsChanged() on all observers.
   void NotifyAccountsChanged();
 
+  // Accessors for active principal (stored in user pref).
+  const std::string& GetActivePrincipalName() const;
+  void SetActivePrincipalName(const std::string& principal_name);
+  void ClearActivePrincipalName();
+
+  // Checks whether the active principal is contained in the given |response|.
+  // If not, resets it to the first principal or clears it if the list is empty.
+  // It's not expected that this ever triggers, but it provides a fail safe if
+  // the active principal should ever break for whatever reason.
+  void ValidateActivePrincipal(const kerberos::ListAccountsResponse& response);
+
   // Pref change handlers.
   void UpdateEnabledFromPref();
   void UpdateRememberPasswordEnabledFromPref();
   void UpdateAddAccountsAllowedFromPref();
   void UpdateAccountsFromPref();
 
+  // Informs session manager whether it needs to store the login password in the
+  // kernel keyring. That's the case when '${PASSWORD}' is used as password in
+  // the KerberosAccounts policy. The Kerberos daemon expands that to the login
+  // password.
+  void NotifyRequiresLoginPassword(bool requires_login_password);
+
   // Local state prefs, not owned.
   PrefService* local_state_ = nullptr;
 
+  // Primary profile, not owned.
+  Profile* primary_profile_ = nullptr;
+
+  // Policy service of the primary profile, not owned.
+  policy::PolicyService* policy_service_ = nullptr;
+
   // Called by OnSignalConnected(), puts Kerberos files where GSSAPI finds them.
   KerberosFilesHandler kerberos_files_handler_;
 
@@ -182,9 +221,6 @@
   // Keeps track of accounts currently being added.
   std::vector<std::unique_ptr<KerberosAddAccountRunner>> add_account_runners_;
 
-  // Currently active principal.
-  std::string active_principal_name_;
-
   // Variable expander for the principal name (replaces ${LOGIN_ID} etc.).
   std::unique_ptr<VariableExpander> principal_expander_;
 
diff --git a/chrome/browser/chromeos/kiosk_next_home/intent_config_helper.cc b/chrome/browser/chromeos/kiosk_next_home/intent_config_helper.cc
index 3b8b48c..674990e 100644
--- a/chrome/browser/chromeos/kiosk_next_home/intent_config_helper.cc
+++ b/chrome/browser/chromeos/kiosk_next_home/intent_config_helper.cc
@@ -18,11 +18,6 @@
 #include "services/data_decoder/public/cpp/safe_json_parser.h"
 #include "url/url_constants.h"
 
-#if defined(KIOSK_NEXT) && defined(GOOGLE_CHROME_BUILD)
-#include "chrome/grit/kiosk_next_internal_resources.h"
-#include "ui/base/resource/resource_bundle.h"
-#endif
-
 namespace chromeos {
 namespace kiosk_next_home {
 
@@ -59,13 +54,7 @@
 
   // IntentConfigHelper::Delegate:
   std::string GetJsonConfig() const override {
-#if defined(KIOSK_NEXT) && defined(GOOGLE_CHROME_BUILD)
-    return ui::ResourceBundle::GetSharedInstance()
-        .GetRawDataResource(IDR_KIOSK_NEXT_INTENT_CONFIG_JSON)
-        .as_string();
-#else
     return std::string();
-#endif
   }
 
   DISALLOW_COPY_AND_ASSIGN(ReadJsonConfigResourceDelegate);
diff --git a/chrome/browser/chromeos/login/enrollment/enterprise_enrollment_helper_impl.cc b/chrome/browser/chromeos/login/enrollment/enterprise_enrollment_helper_impl.cc
index 1472605..0244465 100644
--- a/chrome/browser/chromeos/login/enrollment/enterprise_enrollment_helper_impl.cc
+++ b/chrome/browser/chromeos/login/enrollment/enterprise_enrollment_helper_impl.cc
@@ -405,14 +405,6 @@
       UMA(policy::kMetricEnrollmentAccountNotSignedUp);
       LOG(ERROR) << "Account not signed up " << error.state();
       break;
-    case GoogleServiceAuthError::ACCOUNT_DELETED:
-      UMA(policy::kMetricEnrollmentAccountDeleted);
-      LOG(ERROR) << "Account deleted " << error.state();
-      break;
-    case GoogleServiceAuthError::ACCOUNT_DISABLED:
-      UMA(policy::kMetricEnrollmentAccountDisabled);
-      LOG(ERROR) << "Account disabled " << error.state();
-      break;
     case GoogleServiceAuthError::CONNECTION_FAILED:
     case GoogleServiceAuthError::SERVICE_UNAVAILABLE:
       UMA(policy::kMetricEnrollmentNetworkFailed);
diff --git a/chrome/browser/chromeos/login/existing_user_controller.cc b/chrome/browser/chromeos/login/existing_user_controller.cc
index d3483a8a..b5f914f2 100644
--- a/chrome/browser/chromeos/login/existing_user_controller.cc
+++ b/chrome/browser/chromeos/login/existing_user_controller.cc
@@ -1585,21 +1585,6 @@
 void ExistingUserController::ShowError(int error_id,
                                        const std::string& details) {
   VLOG(1) << details;
-  HelpAppLauncher::HelpTopic help_topic_id;
-  if (login_performer_) {
-    switch (login_performer_->error().state()) {
-      case GoogleServiceAuthError::ACCOUNT_DISABLED:
-        help_topic_id = HelpAppLauncher::HELP_ACCOUNT_DISABLED;
-        break;
-      default:
-        help_topic_id = HelpAppLauncher::HELP_CANT_ACCESS_ACCOUNT;
-        break;
-    }
-  } else {
-    // login_performer_ will be null if an error occurred during OAuth2 token
-    // fetch. In this case, show a generic error.
-    help_topic_id = HelpAppLauncher::HELP_CANT_ACCESS_ACCOUNT;
-  }
 
   if (error_id == IDS_LOGIN_ERROR_AUTHENTICATING) {
     if (num_login_attempts_ > 1) {
@@ -1611,7 +1596,8 @@
     }
   }
 
-  GetLoginDisplay()->ShowError(error_id, num_login_attempts_, help_topic_id);
+  GetLoginDisplay()->ShowError(error_id, num_login_attempts_,
+                               HelpAppLauncher::HELP_CANT_ACCESS_ACCOUNT);
 }
 
 void ExistingUserController::SendAccessibilityAlert(
diff --git a/chrome/browser/chromeos/login/help_app_launcher.h b/chrome/browser/chromeos/login/help_app_launcher.h
index 5cfb095..5c1bc2d 100644
--- a/chrome/browser/chromeos/login/help_app_launcher.h
+++ b/chrome/browser/chromeos/login/help_app_launcher.h
@@ -27,8 +27,6 @@
     HELP_STATS_USAGE = 183078,
     // Showed whenever there're troubles signing in.
     HELP_CANT_ACCESS_ACCOUNT = 188036,
-    // Showed in case when account was disabled.
-    HELP_ACCOUNT_DISABLED = 188756,
     // Showed as "Learn more" about enterprise enrolled devices.
     HELP_ENTERPRISE = 2535613,
     // Shown at reset screen as "Learn more" about powerwash/rollback options.
diff --git a/chrome/browser/chromeos/login/saml/in_session_password_change_manager.cc b/chrome/browser/chromeos/login/saml/in_session_password_change_manager.cc
index 47b3e4a..5a921057 100644
--- a/chrome/browser/chromeos/login/saml/in_session_password_change_manager.cc
+++ b/chrome/browser/chromeos/login/saml/in_session_password_change_manager.cc
@@ -6,6 +6,7 @@
 
 #include "chrome/browser/chromeos/login/auth/chrome_cryptohome_authenticator.h"
 #include "chrome/browser/chromeos/login/saml/saml_password_expiry_notification.h"
+#include "chrome/browser/chromeos/profiles/profile_helper.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/common/pref_names.h"
 #include "chromeos/login/auth/user_context.h"
@@ -16,23 +17,21 @@
 
 // static
 std::unique_ptr<InSessionPasswordChangeManager>
-InSessionPasswordChangeManager::CreateIfEnabled(
-    Profile* primary_profile,
-    const user_manager::User* primary_user) {
+InSessionPasswordChangeManager::CreateIfEnabled(Profile* primary_profile) {
   if (primary_profile->GetPrefs()->GetBoolean(
           prefs::kSamlInSessionPasswordChangeEnabled)) {
-    return std::make_unique<InSessionPasswordChangeManager>(primary_profile,
-                                                            primary_user);
+    return std::make_unique<InSessionPasswordChangeManager>(primary_profile);
   }
   return nullptr;
 }
 
 InSessionPasswordChangeManager::InSessionPasswordChangeManager(
-    Profile* primary_profile,
-    const user_manager::User* primary_user)
+    Profile* primary_profile)
     : primary_profile_(primary_profile),
-      primary_user_(primary_user),
-      authenticator_(new ChromeCryptohomeAuthenticator(this)) {}
+      primary_user_(ProfileHelper::Get()->GetUserByProfile(primary_profile)),
+      authenticator_(new ChromeCryptohomeAuthenticator(this)) {
+  DCHECK(primary_user_);
+}
 
 InSessionPasswordChangeManager::~InSessionPasswordChangeManager() {}
 
diff --git a/chrome/browser/chromeos/login/saml/in_session_password_change_manager.h b/chrome/browser/chromeos/login/saml/in_session_password_change_manager.h
index 1adfc22..7d43f9b6 100644
--- a/chrome/browser/chromeos/login/saml/in_session_password_change_manager.h
+++ b/chrome/browser/chromeos/login/saml/in_session_password_change_manager.h
@@ -27,11 +27,9 @@
  public:
   // Returns null if in-session password change is disabled.
   static std::unique_ptr<InSessionPasswordChangeManager> CreateIfEnabled(
-      Profile* primary_profile,
-      const user_manager::User* primary_user);
+      Profile* primary_profile);
 
-  InSessionPasswordChangeManager(Profile* primary_profile,
-                                 const user_manager::User* primary_user);
+  explicit InSessionPasswordChangeManager(Profile* primary_profile);
   ~InSessionPasswordChangeManager() override;
 
   // Change cryptohome password for primary user.
diff --git a/chrome/browser/chromeos/login/session/chrome_session_manager.cc b/chrome/browser/chromeos/login/session/chrome_session_manager.cc
index 5038abb..5388b124 100644
--- a/chrome/browser/chromeos/login/session/chrome_session_manager.cc
+++ b/chrome/browser/chromeos/login/session/chrome_session_manager.cc
@@ -112,6 +112,10 @@
   base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
 
   if (command_line->HasSwitch(chromeos::switches::kLoginUser)) {
+    // TODO(https://crbug.com/977489): There's a lot of code duplication with
+    // UserSessionManager::FinalizePrepareProfile, which is (only!) run for
+    // regular session starts. This needs to be refactored.
+
     // This is done in SessionManager::OnProfileCreated during normal login.
     UserSessionManager* user_session_mgr = UserSessionManager::GetInstance();
     user_manager::UserManager* user_manager = user_manager::UserManager::Get();
@@ -158,6 +162,9 @@
     if (crostini_manager)
       crostini_manager->MaybeUpgradeCrostini();
 
+    g_browser_process->platform_part()->InitializePrimaryProfileServices(
+        user_profile);
+
     if (user->GetType() == user_manager::USER_TYPE_CHILD) {
       ConsumerStatusReportingServiceFactory::GetForBrowserContext(user_profile);
       ScreenTimeControllerFactory::GetForBrowserContext(user_profile);
diff --git a/chrome/browser/chromeos/login/session/user_session_manager.cc b/chrome/browser/chromeos/login/session/user_session_manager.cc
index 0172d2b..8d2ec69 100644
--- a/chrome/browser/chromeos/login/session/user_session_manager.cc
+++ b/chrome/browser/chromeos/login/session/user_session_manager.cc
@@ -1111,6 +1111,9 @@
     bool save_password) {
   DCHECK_LT(service, PasswordConsumingService::kCount);
 
+  VLOG(1) << "Password consuming service " << static_cast<size_t>(service)
+          << " votes " << save_password;
+
   // Prevent this code from being called twice from two services or else the
   // second service would trigger the warning below (since the password has been
   // cleared).
@@ -1118,8 +1121,7 @@
     password_was_saved_ = true;
     const std::string& password = user_context_.GetPasswordKey()->GetSecret();
     if (!password.empty()) {
-      VLOG(1) << "Saving login password for service "
-              << static_cast<size_t>(service);
+      VLOG(1) << "Saving login password";
       SessionManagerClient::Get()->SaveLoginPassword(password);
     } else {
       LOG(WARNING) << "Not saving password because password is empty.";
@@ -1546,6 +1548,10 @@
       content::NotificationService::AllSources(),
       content::Details<Profile>(profile));
 
+  // Initialize various services only for primary user.
+  // TODO(https://crbug.com/977489): There's a lot of code duplication with
+  // StartUserSession in chrome_session_manager.cc, which is (only!) run for
+  // session starts after crashes. This needs to be refactored.
   const user_manager::User* user =
       ProfileHelper::Get()->GetUserByProfile(profile);
   session_manager::SessionManager::Get()->NotifyUserProfileLoaded(
@@ -1573,6 +1579,9 @@
     if (crostini_manager)
       crostini_manager->MaybeUpgradeCrostini();
 
+    g_browser_process->platform_part()->InitializePrimaryProfileServices(
+        profile);
+
     TetherService* tether_service = TetherService::Get(profile);
     if (tether_service)
       tether_service->StartTetherIfPossible();
@@ -1592,6 +1601,7 @@
     login::SaveSyncPasswordDataToProfile(user_context_, profile);
   }
 
+  VLOG(1) << "Clearing all secrets";
   user_context_.ClearSecrets();
   if (TokenHandlesEnabled()) {
     CreateTokenUtilIfMissing();
diff --git a/chrome/browser/chromeos/login/session/user_session_manager.h b/chrome/browser/chromeos/login/session/user_session_manager.h
index af9ce2c1d..4a5d0609 100644
--- a/chrome/browser/chromeos/login/session/user_session_manager.h
+++ b/chrome/browser/chromeos/login/session/user_session_manager.h
@@ -149,8 +149,12 @@
     // the OpenNetworkConfiguration policy.
     kNetwork = 0,
 
+    // The Kerberos service needs the login password if ${PASSWORD} is specified
+    // somewhere in the KerberosAccounts policy.
+    kKerberos = 1,
+
     // Should be last. All enum values must be consecutive starting from 0.
-    kCount = 1,
+    kCount = 2,
   };
 
   // Returns UserSessionManager instance.
@@ -338,15 +342,17 @@
   // Shows U2F notification if necessary.
   void MaybeShowU2FNotification();
 
+ protected:
+  // Protected for testability reasons.
+  UserSessionManager();
+  ~UserSessionManager() override;
+
  private:
   friend class test::UserSessionManagerTestApi;
   friend struct base::DefaultSingletonTraits<UserSessionManager>;
 
   typedef std::set<std::string> SigninSessionRestoreStateSet;
 
-  UserSessionManager();
-  ~UserSessionManager() override;
-
   void SetNetworkConnectionTracker(
       network::NetworkConnectionTracker* network_connection_tracker);
 
diff --git a/chrome/browser/chromeos/login/session/user_session_manager_test.cc b/chrome/browser/chromeos/login/session/user_session_manager_test.cc
index 1504e7e..e6ab480 100644
--- a/chrome/browser/chromeos/login/session/user_session_manager_test.cc
+++ b/chrome/browser/chromeos/login/session/user_session_manager_test.cc
@@ -18,17 +18,36 @@
 namespace chromeos {
 
 namespace {
+
 constexpr char kFakePassword[] = "p4zzw0r(|";
-}
+
+// Publicly exposes lifetime methods. Note that the singleton instance
+// UserSessionManager::GetInstance() can't be used since it would be reused
+// between tests.
+class TestUserSessionManager : public UserSessionManager {
+ public:
+  TestUserSessionManager() = default;
+  ~TestUserSessionManager() override = default;
+};
+
+}  // namespace
 
 class UserSessionManagerTest : public testing::Test {
  public:
   UserSessionManagerTest() {
+    static_assert(
+        static_cast<int>(
+            UserSessionManager::PasswordConsumingService::kCount) == 2,
+        "Update PasswordConsumerService_* tests");
+
     SessionManagerClient::InitializeFake();
-    user_session_manager_ = UserSessionManager::GetInstance();
+    user_session_manager_ = std::make_unique<TestUserSessionManager>();
   }
 
-  ~UserSessionManagerTest() override { SessionManagerClient::Shutdown(); }
+  ~UserSessionManagerTest() override {
+    user_session_manager_.reset();
+    SessionManagerClient::Shutdown();
+  }
 
  protected:
   void InitLoginPassword() {
@@ -41,8 +60,13 @@
     EXPECT_TRUE(FakeSessionManagerClient::Get()->login_password().empty());
   }
 
-  // Convenience pointer to the singleton, not owned.
-  UserSessionManager* user_session_manager_;
+  // Convenience shortcut to the login password stored in
+  // |user_session_manager_|'s user context.
+  const std::string& GetUserSessionManagerLoginPassword() const {
+    return user_session_manager_->user_context().GetPasswordKey()->GetSecret();
+  }
+
+  std::unique_ptr<TestUserSessionManager> user_session_manager_;
 
   // Allows UserSessionManager to request the NetworkConnectionTracker in its
   // constructor.
@@ -60,26 +84,57 @@
 // and clear it from the user context.
 TEST_F(UserSessionManagerTest, PasswordConsumerService_NoSave) {
   InitLoginPassword();
+
+  // First service votes no: Should keep password in user context.
   user_session_manager_->VoteForSavingLoginPassword(
       UserSessionManager::PasswordConsumingService::kNetwork, false);
   EXPECT_TRUE(FakeSessionManagerClient::Get()->login_password().empty());
-  EXPECT_TRUE(user_session_manager_->user_context()
-                  .GetPasswordKey()
-                  ->GetSecret()
-                  .empty());
+  EXPECT_EQ(kFakePassword, GetUserSessionManagerLoginPassword());
+
+  // Second (last) service votes no: Should remove password from user context.
+  user_session_manager_->VoteForSavingLoginPassword(
+      UserSessionManager::PasswordConsumingService::kKerberos, false);
+  EXPECT_TRUE(FakeSessionManagerClient::Get()->login_password().empty());
+  EXPECT_TRUE(GetUserSessionManagerLoginPassword().empty());
 }
 
 // Calling VoteForSavingLoginPassword() with |save_password| set to true should
-// send the password to SessionManager and clear it from the user context.
+// send the password to SessionManager and clear it from the user context once
+// all services have voted.
 TEST_F(UserSessionManagerTest, PasswordConsumerService_Save) {
   InitLoginPassword();
+
+  // First service votes yes: Should send password and remove from user context.
   user_session_manager_->VoteForSavingLoginPassword(
       UserSessionManager::PasswordConsumingService::kNetwork, true);
   EXPECT_EQ(kFakePassword, FakeSessionManagerClient::Get()->login_password());
-  EXPECT_TRUE(user_session_manager_->user_context()
-                  .GetPasswordKey()
-                  ->GetSecret()
-                  .empty());
+  EXPECT_TRUE(GetUserSessionManagerLoginPassword().empty());
+
+  // Second service votes yes: Shouldn't change anything.
+  user_session_manager_->VoteForSavingLoginPassword(
+      UserSessionManager::PasswordConsumingService::kKerberos, true);
+  EXPECT_EQ(kFakePassword, FakeSessionManagerClient::Get()->login_password());
+  EXPECT_TRUE(GetUserSessionManagerLoginPassword().empty());
+}
+
+// Calling OnPasswordConsumingServicePolicyParsed() with |save_password| set to
+// false for one service, followed by true, should send the password to
+// SessionManager on the second service and clear it from the user context.
+TEST_F(UserSessionManagerTest, PasswordConsumerService_NoSave_Save) {
+  InitLoginPassword();
+
+  // First service votes no: Should keep password in user context.
+  user_session_manager_->VoteForSavingLoginPassword(
+      UserSessionManager::PasswordConsumingService::kNetwork, false);
+  EXPECT_TRUE(FakeSessionManagerClient::Get()->login_password().empty());
+  EXPECT_EQ(kFakePassword, GetUserSessionManagerLoginPassword());
+
+  // Second service votes yes: Should save password and remove from user
+  // context.
+  user_session_manager_->VoteForSavingLoginPassword(
+      UserSessionManager::PasswordConsumingService::kKerberos, true);
+  EXPECT_EQ(kFakePassword, FakeSessionManagerClient::Get()->login_password());
+  EXPECT_TRUE(GetUserSessionManagerLoginPassword().empty());
 }
 
 }  // namespace chromeos
diff --git a/chrome/browser/chromeos/plugin_vm/plugin_vm_manager.cc b/chrome/browser/chromeos/plugin_vm/plugin_vm_manager.cc
index 91f7ff4..197d93d 100644
--- a/chrome/browser/chromeos/plugin_vm/plugin_vm_manager.cc
+++ b/chrome/browser/chromeos/plugin_vm/plugin_vm_manager.cc
@@ -107,10 +107,6 @@
   // 2) Call ListVms to get the state of the VM
   // 3) Start the VM if necessary
   // 4) Show the UI.
-  // 5) Call Concierge::GetVmInfo to get seneschal server handle.
-  //    This happens in parallel with step 4.
-  // 6) Ensure default shared path exists.
-  // 7) Share paths with PluginVm
   chromeos::DBusThreadManager::Get()
       ->GetDebugDaemonClient()
       ->StartPluginVmDispatcher(
@@ -125,9 +121,6 @@
 
   chromeos::DBusThreadManager::Get()->GetVmPluginDispatcherClient()->StopVm(
       std::move(request), base::DoNothing());
-
-  // Reset seneschal handle to indicate that it is no longer valid.
-  seneschal_server_handle_ = 0;
 }
 
 void PluginVmManager::OnVmStateChanged(
@@ -139,6 +132,25 @@
 
   if (pending_start_vm_ && !VmIsStopping(vm_state_))
     StartVm();
+
+  // When the VM_STATE_RUNNING signal is received:
+  // 1) Call Concierge::GetVmInfo to get seneschal server handle.
+  // 2) Ensure default shared path exists.
+  // 3) Share paths with PluginVm
+  if (vm_state_ == vm_tools::plugin_dispatcher::VmState::VM_STATE_RUNNING) {
+    vm_tools::concierge::GetVmInfoRequest concierge_request;
+    concierge_request.set_owner_id(owner_id_);
+    concierge_request.set_name(kPluginVmName);
+    chromeos::DBusThreadManager::Get()->GetConciergeClient()->GetVmInfo(
+        std::move(concierge_request),
+        base::BindOnce(&PluginVmManager::OnGetVmInfoForSharing,
+                       weak_ptr_factory_.GetWeakPtr()));
+  } else if (vm_state_ ==
+             vm_tools::plugin_dispatcher::VmState::VM_STATE_STOPPED) {
+    // When the VM_STATE_STOPPED signal is received, reset seneschal handle to
+    // indicate that it is no longer valid.
+    seneschal_server_handle_ = 0;
+  }
 }
 
 void PluginVmManager::OnStartPluginVmDispatcher(bool success) {
@@ -231,15 +243,6 @@
   chromeos::DBusThreadManager::Get()->GetVmPluginDispatcherClient()->ShowVm(
       std::move(request), base::BindOnce(&PluginVmManager::OnShowVm,
                                          weak_ptr_factory_.GetWeakPtr()));
-
-  vm_tools::concierge::GetVmInfoRequest concierge_request;
-  concierge_request.set_owner_id(owner_id_);
-  concierge_request.set_name(kPluginVmName);
-
-  chromeos::DBusThreadManager::Get()->GetConciergeClient()->GetVmInfo(
-      std::move(concierge_request),
-      base::BindOnce(&PluginVmManager::OnGetVmInfo,
-                     weak_ptr_factory_.GetWeakPtr()));
 }
 
 void PluginVmManager::OnShowVm(
@@ -254,7 +257,7 @@
   RecordPluginVmLaunchResultHistogram(PluginVmLaunchResult::kSuccess);
 }
 
-void PluginVmManager::OnGetVmInfo(
+void PluginVmManager::OnGetVmInfoForSharing(
     base::Optional<vm_tools::concierge::GetVmInfoResponse> reply) {
   if (!reply.has_value()) {
     LOG(ERROR) << "Failed to get concierge VM info.";
diff --git a/chrome/browser/chromeos/plugin_vm/plugin_vm_manager.h b/chrome/browser/chromeos/plugin_vm/plugin_vm_manager.h
index 5f66f93d..d98e316e 100644
--- a/chrome/browser/chromeos/plugin_vm/plugin_vm_manager.h
+++ b/chrome/browser/chromeos/plugin_vm/plugin_vm_manager.h
@@ -54,7 +54,7 @@
   void ShowVm();
   void OnShowVm(
       base::Optional<vm_tools::plugin_dispatcher::ShowVmResponse> reply);
-  void OnGetVmInfo(
+  void OnGetVmInfoForSharing(
       base::Optional<vm_tools::concierge::GetVmInfoResponse> reply);
   void OnDefaultSharedDirExists(const base::FilePath& dir, bool exists);
 
diff --git a/chrome/browser/chromeos/plugin_vm/plugin_vm_manager_unittest.cc b/chrome/browser/chromeos/plugin_vm/plugin_vm_manager_unittest.cc
index bc818742..7eaaa63e 100644
--- a/chrome/browser/chromeos/plugin_vm/plugin_vm_manager_unittest.cc
+++ b/chrome/browser/chromeos/plugin_vm/plugin_vm_manager_unittest.cc
@@ -95,11 +95,9 @@
   EXPECT_TRUE(VmPluginDispatcherClient().list_vms_called());
   EXPECT_TRUE(VmPluginDispatcherClient().start_vm_called());
   EXPECT_TRUE(VmPluginDispatcherClient().show_vm_called());
-  EXPECT_TRUE(ConciergeClient().get_vm_info_called());
-  EXPECT_TRUE(base::DirectoryExists(
-      file_manager::util::GetMyFilesFolderForProfile(testing_profile_.get())));
-  EXPECT_TRUE(SeneschalClient().share_path_called());
-  EXPECT_EQ(plugin_vm_manager_->seneschal_server_handle(), 1ul);
+  EXPECT_FALSE(ConciergeClient().get_vm_info_called());
+  EXPECT_FALSE(SeneschalClient().share_path_called());
+  EXPECT_EQ(plugin_vm_manager_->seneschal_server_handle(), 0ul);
 
   histogram_tester_->ExpectUniqueSample(kPluginVmLaunchResultHistogram,
                                         PluginVmLaunchResult::kSuccess, 1);
@@ -121,19 +119,42 @@
   EXPECT_FALSE(VmPluginDispatcherClient().start_vm_called());
   EXPECT_TRUE(VmPluginDispatcherClient().show_vm_called());
   EXPECT_FALSE(VmPluginDispatcherClient().stop_vm_called());
+  EXPECT_FALSE(ConciergeClient().get_vm_info_called());
+  EXPECT_FALSE(SeneschalClient().share_path_called());
+  EXPECT_EQ(plugin_vm_manager_->seneschal_server_handle(), 0ul);
+
+  plugin_vm_manager_->StopPluginVm();
+  thread_bundle_.RunUntilIdle();
+  EXPECT_TRUE(VmPluginDispatcherClient().stop_vm_called());
+
+  histogram_tester_->ExpectUniqueSample(kPluginVmLaunchResultHistogram,
+                                        PluginVmLaunchResult::kSuccess, 1);
+}
+
+TEST_F(PluginVmManagerTest, OnStateChangedRunningStopped) {
+  test_helper_->AllowPluginVm();
+  EXPECT_TRUE(IsPluginVmAllowedForProfile(testing_profile_.get()));
+
+  vm_tools::plugin_dispatcher::VmStateChangedSignal state_changed_signal;
+  state_changed_signal.set_owner_id(
+      chromeos::ProfileHelper::GetUserIdHashFromProfile(
+          testing_profile_.get()));
+  state_changed_signal.set_vm_name(kPluginVmName);
+  state_changed_signal.set_vm_state(
+      vm_tools::plugin_dispatcher::VmState::VM_STATE_RUNNING);
+  VmPluginDispatcherClient().NotifyVmStateChanged(state_changed_signal);
+  thread_bundle_.RunUntilIdle();
   EXPECT_TRUE(ConciergeClient().get_vm_info_called());
   EXPECT_TRUE(base::DirectoryExists(
       file_manager::util::GetMyFilesFolderForProfile(testing_profile_.get())));
   EXPECT_TRUE(SeneschalClient().share_path_called());
   EXPECT_EQ(plugin_vm_manager_->seneschal_server_handle(), 1ul);
 
-  plugin_vm_manager_->StopPluginVm();
+  state_changed_signal.set_vm_state(
+      vm_tools::plugin_dispatcher::VmState::VM_STATE_STOPPED);
+  VmPluginDispatcherClient().NotifyVmStateChanged(state_changed_signal);
   thread_bundle_.RunUntilIdle();
-  EXPECT_TRUE(VmPluginDispatcherClient().stop_vm_called());
   EXPECT_EQ(plugin_vm_manager_->seneschal_server_handle(), 0ul);
-
-  histogram_tester_->ExpectUniqueSample(kPluginVmLaunchResultHistogram,
-                                        PluginVmLaunchResult::kSuccess, 1);
 }
 
 TEST_F(PluginVmManagerTest, LaunchPluginVmSpinner) {
diff --git a/chrome/browser/chromeos/profiles/profile_helper.cc b/chrome/browser/chromeos/profiles/profile_helper.cc
index ab721f3..425210cd 100644
--- a/chrome/browser/chromeos/profiles/profile_helper.cc
+++ b/chrome/browser/chromeos/profiles/profile_helper.cc
@@ -255,11 +255,6 @@
   // GetOffTheRecordProfile() call above.
   profile->InitChromeOSPreferences();
 
-  if (IsPrimaryProfile(profile)) {
-    g_browser_process->platform_part()->InitializePrimaryProfileServices(
-        profile);
-  }
-
   // Add observer so we can see when the first profile's session restore is
   // completed. After that, we won't need the default profile anymore.
   if (!IsSigninProfile(profile) &&
diff --git a/chrome/browser/chromeos/settings/device_identity_provider.cc b/chrome/browser/chromeos/settings/device_identity_provider.cc
index 00776d9a..b37b14d 100644
--- a/chrome/browser/chromeos/settings/device_identity_provider.cc
+++ b/chrome/browser/chromeos/settings/device_identity_provider.cc
@@ -5,10 +5,84 @@
 #include "chrome/browser/chromeos/settings/device_identity_provider.h"
 
 #include "chrome/browser/chromeos/settings/device_oauth2_token_service.h"
-#include "components/invalidation/public/active_account_access_token_fetcher_impl.h"
 
 namespace chromeos {
 
+namespace {
+
+// An implementation of ActiveAccountAccessTokenFetcher that is backed by
+// DeviceOAuth2TokenService.
+class ActiveAccountAccessTokenFetcherImpl
+    : public invalidation::ActiveAccountAccessTokenFetcher,
+      OAuth2TokenService::Consumer {
+ public:
+  ActiveAccountAccessTokenFetcherImpl(
+      const std::string& active_account_id,
+      const std::string& oauth_consumer_name,
+      DeviceOAuth2TokenService* token_service,
+      const OAuth2TokenService::ScopeSet& scopes,
+      invalidation::ActiveAccountAccessTokenCallback callback);
+  ~ActiveAccountAccessTokenFetcherImpl() override;
+
+ private:
+  // OAuth2TokenService::Consumer implementation.
+  void OnGetTokenSuccess(
+      const OAuth2TokenService::Request* request,
+      const OAuth2AccessTokenConsumer::TokenResponse& token_response) override;
+  void OnGetTokenFailure(const OAuth2TokenService::Request* request,
+                         const GoogleServiceAuthError& error) override;
+
+  // Invokes |callback_| with (|access_token|, |error|).
+  void HandleTokenRequestCompletion(const OAuth2TokenService::Request* request,
+                                    const GoogleServiceAuthError& error,
+                                    const std::string& access_token);
+
+  invalidation::ActiveAccountAccessTokenCallback callback_;
+  std::unique_ptr<OAuth2TokenService::Request> access_token_request_;
+
+  DISALLOW_COPY_AND_ASSIGN(ActiveAccountAccessTokenFetcherImpl);
+};
+
+}  // namespace
+
+ActiveAccountAccessTokenFetcherImpl::ActiveAccountAccessTokenFetcherImpl(
+    const std::string& active_account_id,
+    const std::string& oauth_consumer_name,
+    DeviceOAuth2TokenService* token_service,
+    const OAuth2TokenService::ScopeSet& scopes,
+    invalidation::ActiveAccountAccessTokenCallback callback)
+    : OAuth2TokenService::Consumer(oauth_consumer_name),
+      callback_(std::move(callback)) {
+  access_token_request_ =
+      token_service->StartRequest(active_account_id, scopes, this);
+}
+
+ActiveAccountAccessTokenFetcherImpl::~ActiveAccountAccessTokenFetcherImpl() {}
+
+void ActiveAccountAccessTokenFetcherImpl::OnGetTokenSuccess(
+    const OAuth2TokenService::Request* request,
+    const OAuth2AccessTokenConsumer::TokenResponse& token_response) {
+  HandleTokenRequestCompletion(request, GoogleServiceAuthError::AuthErrorNone(),
+                               token_response.access_token);
+}
+
+void ActiveAccountAccessTokenFetcherImpl::OnGetTokenFailure(
+    const OAuth2TokenService::Request* request,
+    const GoogleServiceAuthError& error) {
+  HandleTokenRequestCompletion(request, error, std::string());
+}
+
+void ActiveAccountAccessTokenFetcherImpl::HandleTokenRequestCompletion(
+    const OAuth2TokenService::Request* request,
+    const GoogleServiceAuthError& error,
+    const std::string& access_token) {
+  DCHECK_EQ(request, access_token_request_.get());
+  std::unique_ptr<OAuth2TokenService::Request> request_deleter(
+      std::move(access_token_request_));
+
+  std::move(callback_).Run(error, access_token);
+}
+
 DeviceIdentityProvider::DeviceIdentityProvider(
     chromeos::DeviceOAuth2TokenService* token_service)
     : token_service_(token_service) {
@@ -57,7 +131,7 @@
     const std::string& oauth_consumer_name,
     const OAuth2TokenService::ScopeSet& scopes,
     invalidation::ActiveAccountAccessTokenCallback callback) {
-  return std::make_unique<invalidation::ActiveAccountAccessTokenFetcherImpl>(
+  return std::make_unique<ActiveAccountAccessTokenFetcherImpl>(
       GetActiveAccountId(), oauth_consumer_name, token_service_, scopes,
       std::move(callback));
 }
diff --git a/chrome/browser/extensions/BUILD.gn b/chrome/browser/extensions/BUILD.gn
index 9ee32ea..b6a0422 100644
--- a/chrome/browser/extensions/BUILD.gn
+++ b/chrome/browser/extensions/BUILD.gn
@@ -1006,9 +1006,6 @@
     if (enable_kiosk_next) {
       defines += [ "KIOSK_NEXT" ]
       deps += [ "//chrome/browser/chromeos/kiosk_next_home/mojom" ]
-      if (is_chrome_branded) {
-        deps += [ "//chrome/browser/resources:kiosk_next_internal_resources" ]
-      }
     }
     if (enable_nacl) {
       deps += [ "//chrome/browser/resources/chromeos/zip_archiver" ]
diff --git a/chrome/browser/extensions/api/identity/identity_get_auth_token_function.cc b/chrome/browser/extensions/api/identity/identity_get_auth_token_function.cc
index e2a13a1..afccd10 100644
--- a/chrome/browser/extensions/api/identity/identity_get_auth_token_function.cc
+++ b/chrome/browser/extensions/api/identity/identity_get_auth_token_function.cc
@@ -512,8 +512,6 @@
       }
       break;
     case GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS:
-    case GoogleServiceAuthError::ACCOUNT_DELETED:
-    case GoogleServiceAuthError::ACCOUNT_DISABLED:
       // TODO(courage): flush ticket and retry once
       if (ShouldStartSigninFlow()) {
         StartSigninFlow();
diff --git a/chrome/browser/extensions/chrome_component_extension_resource_manager.cc b/chrome/browser/extensions/chrome_component_extension_resource_manager.cc
index f24023145..c4b6229 100644
--- a/chrome/browser/extensions/chrome_component_extension_resource_manager.cc
+++ b/chrome/browser/extensions/chrome_component_extension_resource_manager.cc
@@ -26,10 +26,6 @@
 #include "ui/file_manager/grit/file_manager_resources.h"
 #endif
 
-#if defined(KIOSK_NEXT) && defined(GOOGLE_CHROME_BUILD)
-#include "chrome/grit/kiosk_next_internal_resources_map.h"
-#endif
-
 namespace extensions {
 
 ChromeComponentExtensionResourceManager::
@@ -90,11 +86,6 @@
       keyboard_resources,
       keyboard_resource_size);
 #endif
-
-#if defined(KIOSK_NEXT) && defined(GOOGLE_CHROME_BUILD)
-  AddComponentResourceEntries(kKioskNextInternalResources,
-                              kKioskNextInternalResourcesSize);
-#endif
 }
 
 ChromeComponentExtensionResourceManager::
diff --git a/chrome/browser/google/google_url_tracker_factory_unittest.cc b/chrome/browser/google/google_url_tracker_factory_unittest.cc
index 78eb70e..fc1fd5b 100644
--- a/chrome/browser/google/google_url_tracker_factory_unittest.cc
+++ b/chrome/browser/google/google_url_tracker_factory_unittest.cc
@@ -30,24 +30,24 @@
   base::test::ScopedFeatureList scoped_feature_list_;
 };
 
-TEST_F(GoogleURLTrackerFactoryTest, UsesLocalDomainByDefault) {
+TEST_F(GoogleURLTrackerFactoryTest, UsesDotComByDefault) {
   profile_.GetPrefs()->SetString(prefs::kLastKnownGoogleURL,
                                  "https://www.google.co.uk/");
   GoogleURLTracker* tracker =
       GoogleURLTrackerFactory::GetInstance()->GetForProfile(&profile_);
 
   ASSERT_NE(nullptr, tracker);
-  EXPECT_EQ(GURL("https://www.google.co.uk/"), tracker->google_url());
-}
-
-TEST_F(GoogleURLTrackerFactoryTest, UsesDotComWithNoSearchDomainCheck) {
-  profile_.GetPrefs()->SetString(prefs::kLastKnownGoogleURL,
-                                 "https://www.google.co.uk/");
-  scoped_feature_list_.InitAndEnableFeature(
-      GoogleURLTracker::kNoSearchDomainCheck);
-  GoogleURLTracker* tracker =
-      GoogleURLTrackerFactory::GetInstance()->GetForProfile(&profile_);
-
-  ASSERT_NE(nullptr, tracker);
   EXPECT_EQ(GURL("https://www.google.com/"), tracker->google_url());
 }
+
+TEST_F(GoogleURLTrackerFactoryTest, UsesLocalDomainWithSearchDomainCheck) {
+  profile_.GetPrefs()->SetString(prefs::kLastKnownGoogleURL,
+                                 "https://www.google.co.uk/");
+  scoped_feature_list_.InitAndDisableFeature(
+      GoogleURLTracker::kNoSearchDomainCheck);
+  GoogleURLTracker* tracker =
+      GoogleURLTrackerFactory::GetInstance()->GetForProfile(&profile_);
+
+  ASSERT_NE(nullptr, tracker);
+  EXPECT_EQ(GURL("https://www.google.co.uk/"), tracker->google_url());
+}
diff --git a/chrome/browser/policy/configuration_policy_handler_list_factory.cc b/chrome/browser/policy/configuration_policy_handler_list_factory.cc
index d1813f87..cf760950e 100644
--- a/chrome/browser/policy/configuration_policy_handler_list_factory.cc
+++ b/chrome/browser/policy/configuration_policy_handler_list_factory.cc
@@ -42,6 +42,7 @@
 #include "components/browsing_data/core/pref_names.h"
 #include "components/certificate_transparency/pref_names.h"
 #include "components/component_updater/pref_names.h"
+#include "components/content_settings/core/browser/cookie_settings_policy_handler.h"
 #include "components/content_settings/core/common/pref_names.h"
 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_pref_names.h"
 #include "components/history/core/common/pref_names.h"
@@ -1115,6 +1116,8 @@
   handlers->AddHandler(
       std::make_unique<autofill::AutofillCreditCardPolicyHandler>());
   handlers->AddHandler(std::make_unique<autofill::AutofillPolicyHandler>());
+  handlers->AddHandler(
+      std::make_unique<content_settings::CookieSettingsPolicyHandler>());
   handlers->AddHandler(std::make_unique<DefaultSearchPolicyHandler>());
   handlers->AddHandler(std::make_unique<ForceSafeSearchPolicyHandler>());
   handlers->AddHandler(std::make_unique<ForceYouTubeSafetyModePolicyHandler>());
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index c12e0d89..79abb0c 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -845,6 +845,7 @@
   chromeos::CupsPrintersManager::RegisterProfilePrefs(registry);
   chromeos::first_run::RegisterProfilePrefs(registry);
   chromeos::file_system_provider::RegisterProfilePrefs(registry);
+  chromeos::KerberosCredentialsManager::RegisterProfilePrefs(registry);
   chromeos::KeyPermissions::RegisterProfilePrefs(registry);
   chromeos::multidevice_setup::MultiDeviceSetupService::RegisterProfilePrefs(
       registry);
diff --git a/chrome/browser/resources/BUILD.gn b/chrome/browser/resources/BUILD.gn
index 160d9ce..29462c9 100644
--- a/chrome/browser/resources/BUILD.gn
+++ b/chrome/browser/resources/BUILD.gn
@@ -239,20 +239,6 @@
     ]
     output_dir = "$root_gen_dir/chrome"
   }
-
-  if (enable_kiosk_next && is_chrome_branded) {
-    grit("kiosk_next_internal_resources") {
-      source = "kiosk_next_internal_resources.grd"
-      defines = chrome_grit_defines
-      outputs = [
-        "grit/kiosk_next_internal_resources.h",
-        "grit/kiosk_next_internal_resources_map.cc",
-        "grit/kiosk_next_internal_resources_map.h",
-        "kiosk_next_internal_resources.pak",
-      ]
-      output_dir = "$root_gen_dir/chrome"
-    }
-  }
 }
 
 if (!is_android && !is_chromeos) {
diff --git a/chrome/browser/resources/app_management/expandable_app_list.html b/chrome/browser/resources/app_management/expandable_app_list.html
index 6fe1a79..1be669b 100644
--- a/chrome/browser/resources/app_management/expandable_app_list.html
+++ b/chrome/browser/resources/app_management/expandable_app_list.html
@@ -22,10 +22,6 @@
         margin-inline-start: 12px;
       }
 
-      #back-button {
-        margin-inline-start: 0;
-      }
-
       #collapse {
         display: block;
         min-height: var(--collapsed-height);
@@ -34,9 +30,6 @@
     </style>
     <div class="card-container">
       <div id="app-list-header">
-        <cr-icon-button class="icon-arrow-back" id="back-button"
-          on-click="onClickBack_" aria-label="$i18n{back}">
-        </cr-icon-button>
         <div id="app-list-title" class="header-text">[[listTitle]]</div>
       </div>
       <iron-collapse id="collapse">
diff --git a/chrome/browser/resources/app_management/expandable_app_list.js b/chrome/browser/resources/app_management/expandable_app_list.js
index 62bb0cc..c7a6f4b 100644
--- a/chrome/browser/resources/app_management/expandable_app_list.js
+++ b/chrome/browser/resources/app_management/expandable_app_list.js
@@ -133,11 +133,4 @@
         loadTimeData.getString('lessApps') :
         loadTimeData.getStringF('moreApps', numApps - this.collapsedSize);
   },
-
-  onClickBack_: function() {
-    this.dispatchEvent(new CustomEvent('click-back-button', {
-      bubbles: true,
-      composed: true,
-    }));
-  }
 });
diff --git a/chrome/browser/resources/app_management/main_view.js b/chrome/browser/resources/app_management/main_view.js
index 49b1fc7..de2073cb 100644
--- a/chrome/browser/resources/app_management/main_view.js
+++ b/chrome/browser/resources/app_management/main_view.js
@@ -37,10 +37,6 @@
     },
   },
 
-  listeners: {
-    'click-back-button': 'onClickBackButton',
-  },
-
   attached: function() {
     this.watch('apps_', state => state.apps);
     this.watch('notificationAppIds_', state => state.notifications.allowedIds);
@@ -59,11 +55,6 @@
   },
 
   /** @private */
-  onClickBackButton: function() {
-    window.location.href = `chrome://settings`;
-  },
-
-  /** @private */
   onClickNotificationSublabel_: function() {
     this.dispatch(app_management.actions.changePage(PageType.NOTIFICATIONS));
   },
diff --git a/chrome/browser/resources/chromeos/kiosk_next_home/bg_internal.js b/chrome/browser/resources/chromeos/kiosk_next_home/bg_internal.js
deleted file mode 100644
index ec93f75..0000000
--- a/chrome/browser/resources/chromeos/kiosk_next_home/bg_internal.js
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-chrome.app.runtime.onLaunched.addListener(() => {
-  const windowOptions = {state: 'maximized', frame: 'none'};
-  chrome.app.window.create('internal/main.html', windowOptions, (newWindow) => {
-    newWindow.maximize();
-  });
-});
diff --git a/chrome/browser/resources/chromeos/kiosk_next_home/kiosk_next_resources.grdp b/chrome/browser/resources/chromeos/kiosk_next_home/kiosk_next_resources.grdp
index 2d95a48..c6e6373 100644
--- a/chrome/browser/resources/chromeos/kiosk_next_home/kiosk_next_resources.grdp
+++ b/chrome/browser/resources/chromeos/kiosk_next_home/kiosk_next_resources.grdp
@@ -1,16 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
 
 <grit-part>
-  <if expr="_google_chrome">
-    <then>
-      <include name="IDR_KIOSK_NEXT_BG_JS" file="chromeos/kiosk_next_home/bg_internal.js" type="BINDATA" />
-      <include name="IDR_KIOSK_NEXT_MAIN_HTML" file="chromeos/kiosk_next_home/internal/main.html" type="chrome_html" />
-    </then>
-    <else>
-      <include name="IDR_KIOSK_NEXT_BG_JS" file="chromeos/kiosk_next_home/bg.js" type="BINDATA" />
-      <include name="IDR_KIOSK_NEXT_MAIN_HTML" file="chromeos/kiosk_next_home/main.html" type="chrome_html" />
-    </else>
-  </if>
+  <include name="IDR_KIOSK_NEXT_BG_JS" file="chromeos/kiosk_next_home/bg.js" type="BINDATA" />
+  <include name="IDR_KIOSK_NEXT_MAIN_HTML" file="chromeos/kiosk_next_home/main.html" type="chrome_html" />
   <include name="IDR_KIOSK_NEXT_ICON_192" file="chromeos/kiosk_next_home/static/icon192.png" type="BINDATA" />
   <include name="IDR_KIOSK_NEXT_API_JS" file="chromeos/kiosk_next_home/api.js" type="BINDATA" />
   <include name="IDR_KIOSK_NEXT_API_IMPL_JS" file="chromeos/kiosk_next_home/api_impl.js" type="BINDATA" />
diff --git a/chrome/browser/resources/chromeos/login/multidevice_setup_first_run.html b/chrome/browser/resources/chromeos/login/multidevice_setup_first_run.html
index a583b893..3c0f854 100644
--- a/chrome/browser/resources/chromeos/login/multidevice_setup_first_run.html
+++ b/chrome/browser/resources/chromeos/login/multidevice_setup_first_run.html
@@ -10,6 +10,7 @@
 <link rel="import" href="chrome://resources/cr_components/chromeos/multidevice_setup/multidevice_setup.html">
 <link rel="import" href="chrome://resources/html/i18n_behavior.html">
 <link rel="import" href="chrome://resources/html/web_ui_listener_behavior.html">
+<link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/iron-flex-layout-classes.html">
 <!--
   UI for the MultiDevice setup flow when displayed after OOBE or during the
   user's first login on this Chromebook. Note that this flow is
@@ -32,18 +33,13 @@
         width: 768px;
       }
 
-      #multidevice-help-overlay-webview {
+      #multideviceHelpOverlayWebview {
         border: 1px solid #d9d9d9;
         display: block;
         height: 450px;
         width: 100%;
       }
 
-      #multidevice-help-overlay-webview-container.overlay-loading > webview,
-      #multidevice-help-overlay-webview-container:not(.overlay-loading) > div {
-        display: none;
-      }
-
       #multidevice-help-overlay-webview-container {
         box-sizing: border-box;
         height: 482px;
@@ -52,6 +48,11 @@
         width: 100%;
       }
 
+      .multidevice-help-overlay-webview-loading {
+          height: 100%;
+          width: 100%;
+      }
+
       .multidevice-help-overlay-close-top {
         background-image: url(chrome://theme/IDR_CLOSE_DIALOG);
         background-position: center;
@@ -111,7 +112,13 @@
             title="[[getOverlayCloseTopTitle_()]]">
         </div>
         <div id="multidevice-help-overlay-webview-container">
-          <webview id="multidevice-help-overlay-webview"
+          <div class="multidevice-help-overlay-webview-loading
+                      layout horizontal center-center"
+              hidden$="[[!isWebviewLoading_]]">
+            <throbber-notice i18n-values="text:gaiaLoading"></throbber-notice>
+          </div>
+          <webview id="multideviceHelpOverlayWebview"
+              hidden$="[[isWebviewLoading_]]"
               src="[[webviewSrc_]]"></webview>
         </div>
         <div class="multidevice-help-button-strip">
diff --git a/chrome/browser/resources/chromeos/login/multidevice_setup_first_run.js b/chrome/browser/resources/chromeos/login/multidevice_setup_first_run.js
index a8696594..7e9758b 100644
--- a/chrome/browser/resources/chromeos/login/multidevice_setup_first_run.js
+++ b/chrome/browser/resources/chromeos/login/multidevice_setup_first_run.js
@@ -90,6 +90,12 @@
         value: true,
       },
 
+      /** Whether the webview is currently loading. */
+      isWebviewLoading_: {
+        type: Boolean,
+        value: false,
+      },
+
       /**
        * URL for the webview to display.
        * @private {string|undefined}
@@ -107,6 +113,10 @@
     /** @override */
     attached: function() {
       this.delegate_ = new MultiDeviceSetupFirstRunDelegate();
+      this.$.multideviceHelpOverlayWebview.addEventListener(
+          'contentload', () => {
+            this.isWebviewLoading_ = false;
+          });
     },
 
     /** @override */
@@ -137,21 +147,9 @@
       }
     },
 
-    /**
-     * @param {boolean} shouldShow
-     * @param {string=} opt_url
-     * @private
-     */
-    setWebviewOverlayVisibility_: function(shouldShow, opt_url) {
-      if (opt_url) {
-        this.webviewSrc_ = opt_url;
-      }
-      this.webviewOverlayHidden_ = !shouldShow;
-    },
-
     /** @private */
     hideWebviewOverlay_: function() {
-      this.setWebviewOverlayVisibility_(false /* shouldShow */);
+      this.webviewOverlayHidden_ = true;
     },
 
     /**
@@ -159,8 +157,9 @@
      * @private
      */
     onOpenLearnMoreWebviewRequested_: function(event) {
-      this.setWebviewOverlayVisibility_(
-          true /* shouldShow */, event.detail /* url */);
+      this.isWebviewLoading_ = true;
+      this.webviewSrc_ = event.detail;
+      this.webviewOverlayHidden_ = false;
     },
 
     /** @private */
diff --git a/chrome/browser/resources/kiosk_next_internal_resources.grd b/chrome/browser/resources/kiosk_next_internal_resources.grd
deleted file mode 100644
index 6418df00..0000000
--- a/chrome/browser/resources/kiosk_next_internal_resources.grd
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<grit latest_public_release="0" current_release="1" output_all_resource_defines="false">
-  <outputs>
-    <output filename="grit/kiosk_next_internal_resources.h" type="rc_header">
-      <emit emit_type='prepend'></emit>
-    </output>
-    <output filename="grit/kiosk_next_internal_resources_map.cc" type="resource_file_map_source" />
-    <output filename="grit/kiosk_next_internal_resources_map.h" type="resource_map_header" />
-    <output filename="kiosk_next_internal_resources.pak" type="data_package" />
-  </outputs>
-  <release seq="1">
-    <includes>
-      <part file="chromeos/kiosk_next_home/internal/kiosk_next_resources_internal.grdp" />
-    </includes>
-  </release>
-</grit>
diff --git a/chrome/browser/resources/print_preview/ui/BUILD.gn b/chrome/browser/resources/print_preview/ui/BUILD.gn
index 37865ab..488bf41 100644
--- a/chrome/browser/resources/print_preview/ui/BUILD.gn
+++ b/chrome/browser/resources/print_preview/ui/BUILD.gn
@@ -348,6 +348,7 @@
     ":input_behavior",
     "../data:coordinate2d",
     "../data:margins",
+    "../data:measurement_system",
     "../data:size",
     "//ui/webui/resources/js:i18n_behavior",
   ]
diff --git a/chrome/browser/resources/print_preview/ui/input_behavior.js b/chrome/browser/resources/print_preview/ui/input_behavior.js
index 353fa097..016e4f2 100644
--- a/chrome/browser/resources/print_preview/ui/input_behavior.js
+++ b/chrome/browser/resources/print_preview/ui/input_behavior.js
@@ -29,8 +29,9 @@
     },
 
     /**
-     * @return {!CrInputElement} The cr-input element the behavior should use.
-     *     Should be overridden by elements using this behavior.
+     * @return {(!CrInputElement|!HTMLInputElement)} The cr-input or input
+     *     element the behavior should use. Should be overridden by elements
+     *     using this behavior.
      */
     getInput: function() {},
 
diff --git a/chrome/browser/resources/print_preview/ui/margin_control.html b/chrome/browser/resources/print_preview/ui/margin_control.html
index a4c2767a..8eab03e 100644
--- a/chrome/browser/resources/print_preview/ui/margin_control.html
+++ b/chrome/browser/resources/print_preview/ui/margin_control.html
@@ -1,18 +1,19 @@
 <link rel="import" href="chrome://resources/html/polymer.html">
 
 <link rel="import" href="chrome://resources/cr_elements/shared_vars_css.html">
-<link rel="import" href="chrome://resources/cr_elements/cr_input/cr_input.html">
+<link rel="import" href="chrome://resources/cr_elements/cr_input/cr_input_style_css.html">
 <link rel="import" href="chrome://resources/html/i18n_behavior.html">
 <link rel="import" href="../print_preview_utils.html">
 <link rel="import" href="../data/coordinate2d.html">
 <link rel="import" href="../data/margins.html">
+<link rel="import" href="../data/measurement_system.html">
 <link rel="import" href="../data/size.html">
 <link rel="import" href="input_behavior.html">
 <link rel="import" href="strings.html">
 
 <dom-module id="print-preview-margin-control">
   <template>
-    <style>
+    <style include="cr-input-style">
       :host {
         display: block;
         position: absolute;
@@ -62,13 +63,13 @@
         height: 100%;
       }
 
-      #textbox {
-        --cr-input-error-display: none;
-        box-sizing: border-box;
+      #row-container {
+        border-radius: 4px;
         font-size: 0.8rem;
+        min-height: 25px;
+        overflow: hidden;
         padding: 1px;
         position: absolute;
-        text-align: center;
         width: 60px;
       }
 
@@ -77,46 +78,86 @@
       }
 
       @media (prefers-color-scheme: light) {
-        #textbox {
+        #row-container {
           --cr-input-background-color: var(--cr-primary-text-color);
           --cr-input-color: white;
+          background-color: var(--cr-primary-text-color);
           color: white;
         }
       }
 
       @media (prefers-color-scheme: dark) {
-        #textbox {
-          --cr-input-background-color: #1b1c1e;  /* GG900 + 30% black */
+        #row-container {
+          --cr-input-background-color: rgb(27, 28, 30);  /* GG900 + 30% black */
           --cr-input-color: var(--cr-primary-text-color);
+          background-color: rgb(27, 28, 30);  /* GG900 + 30% black */
+          color: var(--cr-primary-text-color);
         }
       }
 
-      :host([side=top]) #textbox {
+      :host([side=top]) #row-container {
         left: 50%;
-        top: 8px;
+        top: 9px;
       }
 
-      :host([side=right]) #textbox {
-        right: 8px;
+      :host([side=right]) #row-container {
+        right: 9px;
         top: 50%;
       }
 
-      :host([side=bottom]) #textbox {
-        bottom: 8px;
+      :host([side=bottom]) #row-container {
+        bottom: 9px;
         right: 50%;
       }
 
-      :host([side=left]) #textbox {
+      :host([side=left]) #row-container {
         bottom: 50%;
-        left: 8px;
+        left: 9px;
+      }
+
+      :host([disabled]) #row-container {
+        opacity: var(--cr-disabled-opacity);
+      }
+
+      :host([invalid]) #input {
+        caret-color: var(--cr-input-error-color);
+      }
+
+      :host([invalid]) #underline {
+        border-color: var(--cr-input-error-color);
+      }
+
+      #row-container,
+      #input-container {
+        align-items: center;
+        display: flex;
+      }
+
+      #input-container {
+        position: relative;
+      }
+
+      #input {
+        padding-inline-end: 0;
+        text-align: end;
+      }
+
+      #unit {
+        padding-inline-end: 8px;
       }
     </style>
-    <div id="line"></div>
-    <cr-input id="textbox" aria-hidden$="[[getAriaHidden_(invisible)]]"
-        aria-label$="[[i18n(side)]]" type="text" disabled="[[disabled]]"
-        invalid="[[invalid]]" on-blur="onBlur_" on-focus="onFocus_"
-        data-timeout-delay="1000">
-    </cr-input>
+      <div id="line"></div>
+      <div id="row-container">
+        <div id="input-container">
+          <input id="input" disabled="[[disabled]]" aria-label$="[[i18n(side)]]"
+              aria-hidden$="[[getAriaHidden_(invisible)]]"
+              on-focus="onFocus_" on-blur="onBlur_" on-change="onInputChange_"
+              data-timeout-delay="1000">
+          <span id="unit">[[measurementSystem.unitSymbol]]</span>
+        </div>
+        <div id="underline"></div>
+      </div>
+    </div>
   </template>
   <script src="margin_control.js"></script>
 </dom-module>
diff --git a/chrome/browser/resources/print_preview/ui/margin_control.js b/chrome/browser/resources/print_preview/ui/margin_control.js
index b4588fa..12a6b972 100644
--- a/chrome/browser/resources/print_preview/ui/margin_control.js
+++ b/chrome/browser/resources/print_preview/ui/margin_control.js
@@ -20,6 +20,7 @@
     disabled: {
       type: Boolean,
       reflectToAttribute: true,
+      observer: 'onDisabledChange_',
     },
 
     side: {
@@ -27,7 +28,10 @@
       reflectToAttribute: true,
     },
 
-    invalid: Boolean,
+    invalid: {
+      type: Boolean,
+      reflectToAttribute: true,
+    },
 
     invisible: {
       type: Boolean,
@@ -35,6 +39,16 @@
       observer: 'onClipSizeChange_',
     },
 
+    /** @type {?print_preview.MeasurementSystem} */
+    measurementSystem: Object,
+
+    /** @private {boolean} */
+    focused_: {
+      type: Boolean,
+      reflectToAttribute: true,
+      value: false,
+    },
+
     /** @private {number} */
     positionInPts_: {
       type: Number,
@@ -76,17 +90,26 @@
     'input-change': 'onInputChange_',
   },
 
-  /** @return {!CrInputElement} The cr-input element for InputBehavior. */
+  /** @return {!HTMLInputElement} The input element for InputBehavior. */
   getInput: function() {
-    return this.$.textbox;
+    return this.$.input;
   },
 
-  /** @param {string} value New value of the margin control's textbox. */
-  setTextboxValue: function(value) {
-    const textbox = this.$.textbox;
-    if (textbox.value != value) {
-      textbox.value = value;
+  /**
+   * @param {number} valueInPts New value of the margin control's textbox in
+   *     pts.
+   */
+  setTextboxValue: function(valueInPts) {
+    const textbox = this.$.input;
+    const pts = textbox.value ? this.parseValueToPts_(textbox.value) : null;
+    if (!!pts && valueInPts === Math.round(pts)) {
+      // If the textbox's value represents the same value in pts as the new one,
+      // don't reset. This allows the "undo" command to work as expected, see
+      // https://crbug.com/452844.
+      return;
     }
+
+    textbox.value = this.serializeValueFromPts_(valueInPts);
   },
 
   /** @return {number} The current position of the margin control. */
@@ -115,20 +138,20 @@
    */
   convertPixelsToPts: function(pixels) {
     let pts;
-    const orientationEnum = print_preview.ticket_items.CustomMarginsOrientation;
-    if (this.side == orientationEnum.TOP) {
+    const Orientation = print_preview.ticket_items.CustomMarginsOrientation;
+    if (this.side == Orientation.TOP) {
       pts = pixels - this.translateTransform.y + RADIUS_PX;
       pts /= this.scaleTransform;
-    } else if (this.side == orientationEnum.RIGHT) {
+    } else if (this.side == Orientation.RIGHT) {
       pts = pixels - this.translateTransform.x + RADIUS_PX;
       pts /= this.scaleTransform;
       pts = this.pageSize.width - pts;
-    } else if (this.side == orientationEnum.BOTTOM) {
+    } else if (this.side == Orientation.BOTTOM) {
       pts = pixels - this.translateTransform.y + RADIUS_PX;
       pts /= this.scaleTransform;
       pts = this.pageSize.height - pts;
     } else {
-      assert(this.side == orientationEnum.LEFT);
+      assert(this.side == Orientation.LEFT);
       pts = pixels - this.translateTransform.x + RADIUS_PX;
       pts /= this.scaleTransform;
     }
@@ -140,26 +163,85 @@
    * @return {boolean} Whether the margin should start being dragged.
    */
   shouldDrag: function(event) {
-    return !this.$.textbox.disabled && event.button == 0 &&
+    return !this.disabled && event.button == 0 &&
         (event.path[0] == this || event.path[0] == this.$.line);
   },
 
+  /** @private */
+  onDisabledChange_: function() {
+    if (this.disabled) {
+      this.focused_ = false;
+    }
+  },
+
+  /**
+   * @param {string} value Value to parse to points. E.g. '3.40' or '200'.
+   * @return {?number} Value in points represented by the input value.
+   * @private
+   */
+  parseValueToPts_: function(value) {
+    // Removing whitespace anywhere in the string.
+    value = value.replace(/\s*/g, '');
+    if (value.length == 0) {
+      return null;
+    }
+    assert(this.measurementSystem);
+    const decimal = this.measurementSystem.decimalDelimeter;
+    const thousands = this.measurementSystem.thousandsDelimeter;
+    const validationRegex = new RegExp(
+        `^(^-?)(((\\d)(\\${thousands}\\d{3})*)(\\${decimal}\\d*)?|` +
+        `((\\d)?(\\${thousands}\\d{3})*)(\\${decimal}\\d*))`);
+    if (validationRegex.test(value)) {
+      // Replacing decimal point with the dot symbol in order to use
+      // parseFloat() properly.
+      value = value.replace(new RegExp(`\\${decimal}{1}`), '.');
+      value = value.replace(new RegExp(`\\${thousands}`, 'g'), '');
+      return this.measurementSystem.convertToPoints(parseFloat(value));
+    }
+    return null;
+  },
+
+  /**
+   * @param {number} value Value in points to serialize.
+   * @return {string} String representation of the value in the system's local
+   *     units.
+   * @private
+   */
+  serializeValueFromPts_: function(value) {
+    assert(this.measurementSystem);
+    value = this.measurementSystem.convertFromPoints(value);
+    value = this.measurementSystem.roundValue(value);
+    return value.toString();
+  },
+
   /**
    * @param {!CustomEvent<string>} e Contains the new value of the input.
    * @private
    */
   onInputChange_: function(e) {
-    this.fire('text-change', e.detail);
+    if (!e.detail) {
+      return;
+    }
+
+    const value = this.parseValueToPts_(e.detail);
+    if (value === null) {
+      this.invalid = true;
+      return;
+    }
+
+    this.fire('text-change', value);
   },
 
   /** @private */
   onBlur_: function() {
+    this.focused_ = false;
     this.resetAndUpdate();
     this.fire('text-blur', this.invalid);
   },
 
   /** @private */
   onFocus_: function() {
+    this.focused_ = true;
     this.fire('text-focus');
   },
 
@@ -169,20 +251,20 @@
       return;
     }
 
-    const orientationEnum = print_preview.ticket_items.CustomMarginsOrientation;
+    const Orientation = print_preview.ticket_items.CustomMarginsOrientation;
     let x = this.translateTransform.x;
     let y = this.translateTransform.y;
     let width = null;
     let height = null;
-    if (this.side == orientationEnum.TOP) {
+    if (this.side == Orientation.TOP) {
       y = this.scaleTransform * this.positionInPts_ +
           this.translateTransform.y - RADIUS_PX;
       width = this.scaleTransform * this.pageSize.width;
-    } else if (this.side == orientationEnum.RIGHT) {
+    } else if (this.side == Orientation.RIGHT) {
       x = this.scaleTransform * (this.pageSize.width - this.positionInPts_) +
           this.translateTransform.x - RADIUS_PX;
       height = this.scaleTransform * this.pageSize.height;
-    } else if (this.side == orientationEnum.BOTTOM) {
+    } else if (this.side == Orientation.BOTTOM) {
       y = this.scaleTransform * (this.pageSize.height - this.positionInPts_) +
           this.translateTransform.y - RADIUS_PX;
       width = this.scaleTransform * this.pageSize.width;
diff --git a/chrome/browser/resources/print_preview/ui/margin_control_container.html b/chrome/browser/resources/print_preview/ui/margin_control_container.html
index f9e56ae6..fa7375b 100644
--- a/chrome/browser/resources/print_preview/ui/margin_control_container.html
+++ b/chrome/browser/resources/print_preview/ui/margin_control_container.html
@@ -28,8 +28,11 @@
       <print-preview-margin-control side="[[item]]" invisible="[[invisible_]]"
           disabled="[[controlsDisabled_(state, invisible_)]]"
           translate-transform="[[translateTransform_]]"
-          clip-size="[[clipSize_]]" scale-transform="[[scaleTransform_]]"
-          page-size="[[pageSize]]" on-pointerdown="onPointerDown_"
+          clip-size="[[clipSize_]]"
+          measurement-system="[[measurementSystem]]"
+          scale-transform="[[scaleTransform_]]"
+          page-size="[[pageSize]]"
+          on-pointerdown="onPointerDown_"
           on-text-change="onTextChange_" on-text-blur="onTextBlur_"
           on-text-focus="onTextFocus_" on-transition-end="onTransitionEnd_">
       </print-preview-margin-control>
diff --git a/chrome/browser/resources/print_preview/ui/margin_control_container.js b/chrome/browser/resources/print_preview/ui/margin_control_container.js
index 14938330..eb6adf2 100644
--- a/chrome/browser/resources/print_preview/ui/margin_control_container.js
+++ b/chrome/browser/resources/print_preview/ui/margin_control_container.js
@@ -172,7 +172,7 @@
           const key = print_preview.MARGIN_KEY_MAP.get(control.side);
           const newValue = margins[key] || 0;
           control.setPositionInPts(newValue);
-          control.setTextboxValue(this.serializeValueFromPts_(newValue));
+          control.setTextboxValue(newValue);
         });
   },
 
@@ -259,20 +259,7 @@
    */
   moveControlWithConstraints_: function(control, posInPts) {
     control.setPositionInPts(posInPts);
-    control.setTextboxValue(this.serializeValueFromPts_(posInPts));
-  },
-
-  /**
-   * @param {number} value Value in points to serialize.
-   * @return {string} String representation of the value in the system's local
-   *     units.
-   * @private
-   */
-  serializeValueFromPts_: function(value) {
-    assert(this.measurementSystem);
-    value = this.measurementSystem.convertFromPoints(value);
-    value = this.measurementSystem.roundValue(value);
-    return value + this.measurementSystem.unitSymbol;
+    control.setTextboxValue(posInPts);
   },
 
   /**
@@ -448,19 +435,14 @@
   },
 
   /**
-   * @param {!CustomEvent<string>} e Event containing the new textbox value.
+   * @param {!CustomEvent<number>} e Event containing the new textbox value.
    * @private
    */
   onTextChange_: function(e) {
-    const marginValue = this.parseValueToPts_(e.detail);
     const control =
         /** @type {!PrintPreviewMarginControlElement} */ (e.target);
-    if (marginValue == null) {
-      control.invalid = true;
-      return;
-    }
     control.invalid = false;
-    const clippedValue = this.clipAndRoundValue_(control.side, marginValue);
+    const clippedValue = this.clipAndRoundValue_(control.side, e.detail);
     control.setPositionInPts(clippedValue);
     this.setMargin_(control.side, clippedValue);
   },
@@ -475,8 +457,7 @@
     if (e.detail /* detail is true if the control is in an invalid state */) {
       const control =
           /** @type {!PrintPreviewMarginControlElement} */ (e.target);
-      control.setTextboxValue(
-          this.serializeValueFromPts_(control.getPositionInPts()));
+      control.setTextboxValue(control.getPositionInPts());
       control.invalid = false;
     }
     this.textboxFocused_ = false;
@@ -522,33 +503,6 @@
   },
 
   /**
-   * @param {string} value Value to parse to points. E.g. '3.40"' or '200mm'.
-   * @return {?number} Value in points represented by the input value.
-   * @private
-   */
-  parseValueToPts_: function(value) {
-    // Removing whitespace anywhere in the string.
-    value = value.replace(/\s*/g, '');
-    if (value.length == 0) {
-      return null;
-    }
-    assert(this.measurementSystem);
-    const validationRegex = new RegExp(
-        '^(^-?)(\\d)+(\\' + this.measurementSystem.thousandsDelimeter +
-        '\\d{3})*(\\' + this.measurementSystem.decimalDelimeter + '\\d*)?' +
-        '(' + this.measurementSystem.unitSymbol + ')?$');
-    if (validationRegex.test(value)) {
-      // Replacing decimal point with the dot symbol in order to use
-      // parseFloat() properly.
-      const replacementRegex =
-          new RegExp('\\' + this.measurementSystem.decimalDelimeter + '{1}');
-      value = value.replace(replacementRegex, '.');
-      return this.measurementSystem.convertToPoints(parseFloat(value));
-    }
-    return null;
-  },
-
-  /**
    * Updates the translation transformation that translates pixel values in
    * the space of the HTML DOM.
    * @param {print_preview.Coordinate2d} translateTransform Updated value of
diff --git a/chrome/browser/resources/settings/app_management_page/BUILD.gn b/chrome/browser/resources/settings/app_management_page/BUILD.gn
index 8bc0597..d404c63c 100644
--- a/chrome/browser/resources/settings/app_management_page/BUILD.gn
+++ b/chrome/browser/resources/settings/app_management_page/BUILD.gn
@@ -12,8 +12,7 @@
 
 js_library("app_management_page") {
   deps = [
-    "../prefs:prefs_behavior",
-    "//ui/webui/resources/js:i18n_behavior",
+    "..:open_window_proxy",
   ]
-  externs_list = [ "$externs_path/settings_private.js" ]
+  externs_list = [ "$externs_path/metrics_private.js" ]
 }
diff --git a/chrome/browser/resources/settings/app_management_page/app_management_page.html b/chrome/browser/resources/settings/app_management_page/app_management_page.html
index bdd793d8..cab1b4a 100644
--- a/chrome/browser/resources/settings/app_management_page/app_management_page.html
+++ b/chrome/browser/resources/settings/app_management_page/app_management_page.html
@@ -1,12 +1,13 @@
 <link rel="import" href="chrome://resources/html/polymer.html">
 
+<link rel="import" href="../open_window_proxy.html">
 <link rel="import" href="chrome://resources/cr_elements/cr_link_row/cr_link_row.html">
-<link rel="import" href="../settings_shared_css.html">
 
 <dom-module id="settings-app-management-page">
   <template>
-    <cr-link-row class="hr" id="app-management-trigger"
-      label="$i18n{manageYourApps}" on-click="onManageAppsClick_">
+    <cr-link-row id="appManagementButton"
+      label="$i18n{manageYourApps}" sub-label="$i18n{manageYourAppsSublabel}"
+      on-click="openAppManagement_" external>
     </cr-link-row>
   </template>
   <script src="app_management_page.js"></script>
diff --git a/chrome/browser/resources/settings/app_management_page/app_management_page.js b/chrome/browser/resources/settings/app_management_page/app_management_page.js
index 57a46ec..da525757 100644
--- a/chrome/browser/resources/settings/app_management_page/app_management_page.js
+++ b/chrome/browser/resources/settings/app_management_page/app_management_page.js
@@ -11,7 +11,9 @@
   is: 'settings-app-management-page',
 
   /** @private */
-  onManageAppsClick_: function() {
-    window.location.href = 'chrome://app-management';
+  openAppManagement_: function() {
+    chrome.metricsPrivate.recordUserAction('SettingsPage.OpenAppManagement');
+    settings.OpenWindowProxyImpl.getInstance().openURL(
+        'chrome://app-management');
   },
 });
diff --git a/chrome/browser/safe_browsing/ad_redirect_trigger_browsertest.cc b/chrome/browser/safe_browsing/ad_redirect_trigger_browsertest.cc
index aa4ea56..c0bba06 100644
--- a/chrome/browser/safe_browsing/ad_redirect_trigger_browsertest.cc
+++ b/chrome/browser/safe_browsing/ad_redirect_trigger_browsertest.cc
@@ -104,8 +104,9 @@
 };
 
 // Check that a report is sent when the source of a blocked redirect is an ad.
+// TODO(https://crbug.com/978405) Disabled due to flakiness.
 IN_PROC_BROWSER_TEST_F(AdRedirectTriggerBrowserTest,
-                       BlockRedirectNavigation_FromAd) {
+                       DISABLED_BlockRedirectNavigation_FromAd) {
   base::HistogramTester histogram_tester;
   CreateTrigger();
   ui_test_utils::NavigateToURL(browser(),
diff --git a/chrome/browser/signin/DEPS b/chrome/browser/signin/DEPS
new file mode 100644
index 0000000..2f014648
--- /dev/null
+++ b/chrome/browser/signin/DEPS
@@ -0,0 +1,20 @@
+specific_include_rules = {
+  # The below files create IdentityManager instances from internal
+  # dependencies. TODO(https://crbug.com/974198): Internalize this building and
+  # eliminate the need for these inclusions.
+
+  "identity_manager_factory.cc": [
+    "+components/signin/core/browser/account_fetcher_service.h",
+    "+components/signin/core/browser/account_tracker_service.h",
+    "+components/signin/core/browser/gaia_cookie_manager_service.h",
+    "+components/signin/core/browser/primary_account_manager.h",
+    "+components/signin/core/browser/primary_account_policy_manager.h",
+    "+components/signin/core/browser/profile_oauth2_token_service.h",
+  ],
+
+  "profile_oauth2_token_service_builder.cc": [
+    "+components/signin/core/browser/profile_oauth2_token_service.h",
+    "+components/signin/core/browser/profile_oauth2_token_service_delegate_chromeos.h",
+    "+components/signin/core/browser/oauth2_token_service_delegate_android.h",
+  ],
+}
diff --git a/chrome/browser/signin/identity_test_environment_profile_adaptor.cc b/chrome/browser/signin/identity_test_environment_profile_adaptor.cc
index 509547f6..f63fdc40 100644
--- a/chrome/browser/signin/identity_test_environment_profile_adaptor.cc
+++ b/chrome/browser/signin/identity_test_environment_profile_adaptor.cc
@@ -7,7 +7,6 @@
 #include "base/bind.h"
 #include "chrome/browser/signin/chrome_signin_client_factory.h"
 #include "chrome/browser/signin/identity_manager_factory.h"
-#include "components/signin/core/browser/fake_profile_oauth2_token_service.h"
 #include "components/signin/core/browser/identity_manager_wrapper.h"
 
 // static
diff --git a/chrome/browser/signin/signin_error_notifier_ash.cc b/chrome/browser/signin/signin_error_notifier_ash.cc
index 7c5ba38..5b140ba1 100644
--- a/chrome/browser/signin/signin_error_notifier_ash.cc
+++ b/chrome/browser/signin/signin_error_notifier_ash.cc
@@ -247,8 +247,6 @@
     // User credentials are invalid (bad acct, etc).
     case GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS:
     case GoogleServiceAuthError::SERVICE_ERROR:
-    case GoogleServiceAuthError::ACCOUNT_DELETED:
-    case GoogleServiceAuthError::ACCOUNT_DISABLED:
       return l10n_util::GetStringUTF16(
           IDS_SYNC_SIGN_IN_ERROR_BUBBLE_VIEW_MESSAGE);
       break;
diff --git a/chrome/browser/signin/signin_error_notifier_ash_unittest.cc b/chrome/browser/signin/signin_error_notifier_ash_unittest.cc
index bc87313..51d41ff 100644
--- a/chrome/browser/signin/signin_error_notifier_ash_unittest.cc
+++ b/chrome/browser/signin/signin_error_notifier_ash_unittest.cc
@@ -137,8 +137,6 @@
       {GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS, true},
       {GoogleServiceAuthError::USER_NOT_SIGNED_UP, true},
       {GoogleServiceAuthError::CONNECTION_FAILED, false},
-      {GoogleServiceAuthError::ACCOUNT_DELETED, true},
-      {GoogleServiceAuthError::ACCOUNT_DISABLED, true},
       {GoogleServiceAuthError::SERVICE_UNAVAILABLE, false},
       {GoogleServiceAuthError::REQUEST_CANCELED, false},
       {GoogleServiceAuthError::UNEXPECTED_SERVICE_RESPONSE, true},
diff --git a/chrome/browser/signin/signin_global_error.cc b/chrome/browser/signin/signin_global_error.cc
index bfee856b..ed47809 100644
--- a/chrome/browser/signin/signin_global_error.cc
+++ b/chrome/browser/signin/signin_global_error.cc
@@ -130,8 +130,6 @@
     // User credentials are invalid (bad acct, etc).
     case GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS:
     case GoogleServiceAuthError::SERVICE_ERROR:
-    case GoogleServiceAuthError::ACCOUNT_DELETED:
-    case GoogleServiceAuthError::ACCOUNT_DISABLED:
       messages.push_back(l10n_util::GetStringUTF16(
           IDS_SYNC_SIGN_IN_ERROR_BUBBLE_VIEW_MESSAGE));
       break;
diff --git a/chrome/browser/signin/signin_global_error_unittest.cc b/chrome/browser/signin/signin_global_error_unittest.cc
index 9973317..aabf797 100644
--- a/chrome/browser/signin/signin_global_error_unittest.cc
+++ b/chrome/browser/signin/signin_global_error_unittest.cc
@@ -123,8 +123,6 @@
       {GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS, true},
       {GoogleServiceAuthError::USER_NOT_SIGNED_UP, true},
       {GoogleServiceAuthError::CONNECTION_FAILED, false},
-      {GoogleServiceAuthError::ACCOUNT_DELETED, true},
-      {GoogleServiceAuthError::ACCOUNT_DISABLED, true},
       {GoogleServiceAuthError::SERVICE_UNAVAILABLE, false},
       {GoogleServiceAuthError::REQUEST_CANCELED, false},
       {GoogleServiceAuthError::UNEXPECTED_SERVICE_RESPONSE, true},
diff --git a/chrome/browser/sync/sync_ui_util.cc b/chrome/browser/sync/sync_ui_util.cc
index 5324f4b9..6ccb762 100644
--- a/chrome/browser/sync/sync_ui_util.cc
+++ b/chrome/browser/sync/sync_ui_util.cc
@@ -75,8 +75,6 @@
       break;
     case GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS:
     case GoogleServiceAuthError::SERVICE_ERROR:
-    case GoogleServiceAuthError::ACCOUNT_DELETED:
-    case GoogleServiceAuthError::ACCOUNT_DISABLED:
     default:
       if (status_label) {
         *status_label = l10n_util::GetStringUTF16(IDS_SYNC_RELOGIN_ERROR);
diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn
index 4bc8f03..b73c50b 100644
--- a/chrome/browser/ui/BUILD.gn
+++ b/chrome/browser/ui/BUILD.gn
@@ -2929,8 +2929,6 @@
       "views/relaunch_notification/relaunch_notification_controller.h",
       "views/relaunch_notification/relaunch_notification_metrics.cc",
       "views/relaunch_notification/relaunch_notification_metrics.h",
-      "views/relaunch_notification/relaunch_recommended_timer.cc",
-      "views/relaunch_notification/relaunch_recommended_timer.h",
       "views/relaunch_notification/relaunch_required_timer.cc",
       "views/relaunch_notification/relaunch_required_timer.h",
       "views/relaunch_notification/relaunch_required_timer_internal.cc",
@@ -3208,6 +3206,8 @@
         "views/relaunch_notification/relaunch_notification_controller_platform_impl_desktop.h",
         "views/relaunch_notification/relaunch_recommended_bubble_view.cc",
         "views/relaunch_notification/relaunch_recommended_bubble_view.h",
+        "views/relaunch_notification/relaunch_recommended_timer.cc",
+        "views/relaunch_notification/relaunch_recommended_timer.h",
         "views/relaunch_notification/relaunch_required_dialog_view.cc",
         "views/relaunch_notification/relaunch_required_dialog_view.h",
         "views/screen_capture_notification_ui_views.cc",
diff --git a/chrome/browser/ui/app_list/search/search_result_ranker/frecency_store.h b/chrome/browser/ui/app_list/search/search_result_ranker/frecency_store.h
index c4918b6..43e28073 100644
--- a/chrome/browser/ui/app_list/search/search_result_ranker/frecency_store.h
+++ b/chrome/browser/ui/app_list/search/search_result_ranker/frecency_store.h
@@ -52,6 +52,13 @@
   // updated, and none of the scores are below the |min_score_| threshold.
   const base::flat_map<std::string, FrecencyStore::ValueData>& GetAll();
 
+  // Returns the underlying storage data structure. This does not ensure scores
+  // are correct, and should not be used for scoring items. However it is
+  // useful, for example, for implementing custom cleanup logic.
+  base::flat_map<std::string, FrecencyStore::ValueData>* get_mutable_values() {
+    return &values_;
+  }
+
   void ToProto(FrecencyStoreProto* proto) const;
   void FromProto(const FrecencyStoreProto& proto);
 
diff --git a/chrome/browser/ui/app_list/search/search_result_ranker/recurrence_predictor.cc b/chrome/browser/ui/app_list/search/search_result_ranker/recurrence_predictor.cc
index e344dd86..587b3d2 100644
--- a/chrome/browser/ui/app_list/search/search_result_ranker/recurrence_predictor.cc
+++ b/chrome/browser/ui/app_list/search/search_result_ranker/recurrence_predictor.cc
@@ -140,7 +140,10 @@
 }
 
 HourBinPredictor::HourBinPredictor(const HourBinPredictorConfig& config)
-    : config_(config) {
+    : weekly_decay_coeff_(config.weekly_decay_coeff()) {
+  for (const auto& pair : config.bin_weights())
+    bin_weights_[pair.bin()] = pair.weight();
+
   if (!proto_.has_last_decay_timestamp())
     SetLastDecayTimestamp(
         base::Time::Now().ToDeltaSinceWindowsEpoch().InDays());
@@ -187,7 +190,7 @@
     unsigned int condition) {
   base::flat_map<unsigned int, float> ranks;
   const auto& frequency_table_map = proto_.binned_frequency_table();
-  for (const auto& hour_and_weight : config_.bin_weights_map()) {
+  for (const auto& hour_and_weight : bin_weights_) {
     // Find adjacent bin and weight.
     const int adj_bin = GetBinFromHourDifference(hour_and_weight.first);
     const float weight = hour_and_weight.second;
@@ -236,7 +239,7 @@
     auto& frequency_table = *it_table->second.mutable_frequency();
     for (auto it_freq = frequency_table.begin();
          it_freq != frequency_table.end();) {
-      const int new_frequency = it_freq->second * config_.weekly_decay_coeff();
+      const int new_frequency = it_freq->second * weekly_decay_coeff_;
       it_table->second.set_total_counts(it_table->second.total_counts() -
                                         it_freq->second + new_frequency);
       it_freq->second = new_frequency;
diff --git a/chrome/browser/ui/app_list/search/search_result_ranker/recurrence_predictor.h b/chrome/browser/ui/app_list/search/search_result_ranker/recurrence_predictor.h
index 382adaa..cd0a1f4 100644
--- a/chrome/browser/ui/app_list/search/search_result_ranker/recurrence_predictor.h
+++ b/chrome/browser/ui/app_list/search/search_result_ranker/recurrence_predictor.h
@@ -164,6 +164,7 @@
   FRIEND_TEST_ALL_PREFIXES(HourBinPredictorTest, TrainAndRankMultipleBin);
   FRIEND_TEST_ALL_PREFIXES(HourBinPredictorTest, ToProto);
   FRIEND_TEST_ALL_PREFIXES(HourBinPredictorTest, FromProtoDecays);
+
   // Return the bin index that is |hour_difference| away from the current bin
   // index.
   int GetBinFromHourDifference(int hour_difference) const;
@@ -176,8 +177,16 @@
   void SetLastDecayTimestamp(float value) {
     proto_.set_last_decay_timestamp(value);
   }
+
   HourBinPredictorProto proto_;
-  HourBinPredictorConfig config_;
+
+  // Weightings for how much an update in bin should affect the bins around it.
+  // Keys in the map are relative indices from the updated bin.
+  base::flat_map<int, float> bin_weights_;
+
+  // How much to decay frequencies each week.
+  float weekly_decay_coeff_;
+
   DISALLOW_COPY_AND_ASSIGN(HourBinPredictor);
 };
 
diff --git a/chrome/browser/ui/app_list/search/search_result_ranker/recurrence_predictor_unittest.cc b/chrome/browser/ui/app_list/search/search_result_ranker/recurrence_predictor_unittest.cc
index a6d44fa..fad8ce95 100644
--- a/chrome/browser/ui/app_list/search/search_result_ranker/recurrence_predictor_unittest.cc
+++ b/chrome/browser/ui/app_list/search/search_result_ranker/recurrence_predictor_unittest.cc
@@ -27,26 +27,6 @@
 
 namespace app_list {
 
-RecurrencePredictorProto MakeTestingProto() {
-  RecurrencePredictorProto proto;
-  auto* hour_bin_proto = proto.mutable_hour_bin_predictor();
-  hour_bin_proto->set_last_decay_timestamp(365);
-
-  HourBinPredictorProto::FrequencyTable frequency_table;
-  (*frequency_table.mutable_frequency())[1u] = 3;
-  (*frequency_table.mutable_frequency())[2u] = 1;
-  frequency_table.set_total_counts(4);
-  (*hour_bin_proto->mutable_binned_frequency_table())[10] = frequency_table;
-
-  frequency_table = HourBinPredictorProto::FrequencyTable();
-  (*frequency_table.mutable_frequency())[1u] = 1;
-  (*frequency_table.mutable_frequency())[3u] = 1;
-  frequency_table.set_total_counts(2);
-  (*hour_bin_proto->mutable_binned_frequency_table())[11] = frequency_table;
-
-  return proto;
-}
-
 class FrecencyPredictorTest : public testing::Test {
  protected:
   void SetUp() override {
@@ -60,50 +40,6 @@
   std::unique_ptr<FrecencyPredictor> predictor_;
 };
 
-class HourBinPredictorTest : public testing::Test {
- protected:
-  void SetUp() override {
-    Test::SetUp();
-
-    config_.set_weekly_decay_coeff(0.5f);
-    (*config_.mutable_bin_weights_map())[0] = 0.6;
-    (*config_.mutable_bin_weights_map())[1] = 0.15;
-    (*config_.mutable_bin_weights_map())[2] = 0.05;
-    (*config_.mutable_bin_weights_map())[-1] = 0.15;
-    (*config_.mutable_bin_weights_map())[-2] = 0.05;
-    predictor_ = std::make_unique<HourBinPredictor>(config_);
-  }
-
-  // Sets local time according to |day_of_week| and |hour_of_day|.
-  void SetLocalTime(const int day_of_week, const int hour_of_day) {
-    AdvanceToNextLocalSunday();
-    const auto advance = base::TimeDelta::FromDays(day_of_week) +
-                         base::TimeDelta::FromHours(hour_of_day);
-    if (advance > base::TimeDelta()) {
-      time_.Advance(advance);
-    }
-  }
-
-  base::ScopedMockClockOverride time_;
-  HourBinPredictorConfig config_;
-  std::unique_ptr<HourBinPredictor> predictor_;
-
- private:
-  // Advances time to be 0am next Sunday.
-  void AdvanceToNextLocalSunday() {
-    base::Time::Exploded now;
-    base::Time::Now().LocalExplode(&now);
-    const auto advance = base::TimeDelta::FromDays(6 - now.day_of_week) +
-                         base::TimeDelta::FromHours(24 - now.hour);
-    if (advance > base::TimeDelta()) {
-      time_.Advance(advance);
-    }
-    base::Time::Now().LocalExplode(&now);
-    CHECK_EQ(now.day_of_week, 0);
-    CHECK_EQ(now.hour, 0);
-  }
-};
-
 TEST_F(FrecencyPredictorTest, RankWithNoTargets) {
   EXPECT_TRUE(predictor_->Rank(0u).empty());
 }
@@ -151,6 +87,74 @@
   EXPECT_EQ(predictor_->Rank(0u), new_predictor.Rank(0u));
 }
 
+class HourBinPredictorTest : public testing::Test {
+ protected:
+  void SetUp() override {
+    Test::SetUp();
+
+    config_.set_weekly_decay_coeff(0.5f);
+
+    const base::flat_map<int, float> bin_weights = {
+        {-2, 0.05}, {-1, 0.15}, {0, 0.6}, {1, 0.15}, {2, 0.05}};
+    for (const auto& pair : bin_weights) {
+      auto* config_pair = config_.add_bin_weights();
+      config_pair->set_bin(pair.first);
+      config_pair->set_weight(pair.second);
+    }
+
+    predictor_ = std::make_unique<HourBinPredictor>(config_);
+  }
+
+  // Sets local time according to |day_of_week| and |hour_of_day|.
+  void SetLocalTime(const int day_of_week, const int hour_of_day) {
+    AdvanceToNextLocalSunday();
+    const auto advance = base::TimeDelta::FromDays(day_of_week) +
+                         base::TimeDelta::FromHours(hour_of_day);
+    if (advance > base::TimeDelta()) {
+      time_.Advance(advance);
+    }
+  }
+
+  RecurrencePredictorProto MakeTestingHourBinnedProto() {
+    RecurrencePredictorProto proto;
+    auto* hour_bin_proto = proto.mutable_hour_bin_predictor();
+    hour_bin_proto->set_last_decay_timestamp(365);
+
+    HourBinPredictorProto::FrequencyTable frequency_table;
+    (*frequency_table.mutable_frequency())[1u] = 3;
+    (*frequency_table.mutable_frequency())[2u] = 1;
+    frequency_table.set_total_counts(4);
+    (*hour_bin_proto->mutable_binned_frequency_table())[10] = frequency_table;
+
+    frequency_table = HourBinPredictorProto::FrequencyTable();
+    (*frequency_table.mutable_frequency())[1u] = 1;
+    (*frequency_table.mutable_frequency())[3u] = 1;
+    frequency_table.set_total_counts(2);
+    (*hour_bin_proto->mutable_binned_frequency_table())[11] = frequency_table;
+
+    return proto;
+  }
+
+  base::ScopedMockClockOverride time_;
+  HourBinPredictorConfig config_;
+  std::unique_ptr<HourBinPredictor> predictor_;
+
+ private:
+  // Advances time to be 0am next Sunday.
+  void AdvanceToNextLocalSunday() {
+    base::Time::Exploded now;
+    base::Time::Now().LocalExplode(&now);
+    const auto advance = base::TimeDelta::FromDays(6 - now.day_of_week) +
+                         base::TimeDelta::FromHours(24 - now.hour);
+    if (advance > base::TimeDelta()) {
+      time_.Advance(advance);
+    }
+    base::Time::Now().LocalExplode(&now);
+    CHECK_EQ(now.day_of_week, 0);
+    CHECK_EQ(now.hour, 0);
+  }
+};
+
 TEST_F(HourBinPredictorTest, RankWithNoTargets) {
   EXPECT_TRUE(predictor_->Rank(0u).empty());
 }
@@ -198,9 +202,9 @@
 }
 
 TEST_F(HourBinPredictorTest, TrainAndRankSingleBin) {
-  base::flat_map<int, float> weights(
-      predictor_->config_.bin_weights_map().begin(),
-      predictor_->config_.bin_weights_map().end());
+  base::flat_map<int, float> weights;
+  for (const auto& pair : config_.bin_weights())
+    weights[pair.bin()] = pair.weight();
 
   SetLocalTime(1, 10);
   predictor_->Train(1u, 0u);
@@ -222,13 +226,14 @@
   SetLocalTime(1, 10);
   EXPECT_THAT(predictor_->Rank(0u),
               UnorderedElementsAre(Pair(1u, FloatEq(weights[0] * 0.6)),
-                                   Pair(2u, FloatEq((weights)[0] * 0.4))));
+                                   Pair(2u, FloatEq(weights[0] * 0.4))));
 }
 
 TEST_F(HourBinPredictorTest, TrainAndRankMultipleBin) {
-  base::flat_map<int, float> weights(
-      predictor_->config_.bin_weights_map().begin(),
-      predictor_->config_.bin_weights_map().end());
+  base::flat_map<int, float> weights;
+  for (const auto& pair : config_.bin_weights())
+    weights[pair.bin()] = pair.weight();
+
   // For bin 10
   SetLocalTime(1, 10);
   predictor_->Train(1u, 0u);
@@ -269,7 +274,7 @@
 }
 
 TEST_F(HourBinPredictorTest, FromProto) {
-  RecurrencePredictorProto proto = MakeTestingProto();
+  RecurrencePredictorProto proto = MakeTestingHourBinnedProto();
   predictor_->FromProto(proto);
   SetLocalTime(1, 11);
   EXPECT_THAT(
@@ -279,7 +284,7 @@
 }
 
 TEST_F(HourBinPredictorTest, FromProtoDecays) {
-  RecurrencePredictorProto proto = MakeTestingProto();
+  RecurrencePredictorProto proto = MakeTestingHourBinnedProto();
   proto.mutable_hour_bin_predictor()->set_last_decay_timestamp(350);
   predictor_->FromProto(proto);
   SetLocalTime(1, 11);
@@ -310,7 +315,7 @@
   predictor_->SetLastDecayTimestamp(365);
 
   predictor_->ToProto(&proto);
-  RecurrencePredictorProto target_proto = MakeTestingProto();
+  RecurrencePredictorProto target_proto = MakeTestingHourBinnedProto();
 
   EXPECT_TRUE(proto.has_hour_bin_predictor());
 
diff --git a/chrome/browser/ui/app_list/search/search_result_ranker/recurrence_ranker.cc b/chrome/browser/ui/app_list/search/search_result_ranker/recurrence_ranker.cc
index 8dfcdaa..0d384b4 100644
--- a/chrome/browser/ui/app_list/search/search_result_ranker/recurrence_ranker.cc
+++ b/chrome/browser/ui/app_list/search/search_result_ranker/recurrence_ranker.cc
@@ -18,7 +18,6 @@
 #include "base/task_runner_util.h"
 #include "base/threading/scoped_blocking_call.h"
 #include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/ui/app_list/search/search_result_ranker/frecency_store.h"
 #include "chrome/browser/ui/app_list/search/search_result_ranker/frecency_store.pb.h"
 #include "chrome/browser/ui/app_list/search/search_result_ranker/histogram_util.h"
 #include "chrome/browser/ui/app_list/search/search_result_ranker/recurrence_predictor.h"
@@ -284,6 +283,16 @@
   return SortAndTruncateRanks(n, Rank(condition));
 }
 
+base::flat_map<std::string, FrecencyStore::ValueData>*
+RecurrenceRanker::GetTargetData() {
+  return targets_->get_mutable_values();
+}
+
+base::flat_map<std::string, FrecencyStore::ValueData>*
+RecurrenceRanker::GetConditionData() {
+  return conditions_->get_mutable_values();
+}
+
 void RecurrenceRanker::SaveToDisk() {
   if (is_ephemeral_user_)
     return;
diff --git a/chrome/browser/ui/app_list/search/search_result_ranker/recurrence_ranker.h b/chrome/browser/ui/app_list/search/search_result_ranker/recurrence_ranker.h
index e6c6f91..eb1bf37 100644
--- a/chrome/browser/ui/app_list/search/search_result_ranker/recurrence_ranker.h
+++ b/chrome/browser/ui/app_list/search/search_result_ranker/recurrence_ranker.h
@@ -17,6 +17,7 @@
 #include "base/memory/weak_ptr.h"
 #include "base/sequenced_task_runner.h"
 #include "base/time/time.h"
+#include "chrome/browser/ui/app_list/search/search_result_ranker/frecency_store.h"
 #include "chrome/browser/ui/app_list/search/search_result_ranker/recurrence_ranker_config.pb.h"
 
 namespace app_list {
@@ -78,6 +79,12 @@
   // after a target or condition is deleted.
   void SaveToDisk();
 
+  // Return a pointer to the underlying storage of the FrecencyStore for targets
+  // or conditions. These should not be used under normal use or ranking.
+  // However, they are useful for custom cleanup logic.
+  base::flat_map<std::string, FrecencyStore::ValueData>* GetTargetData();
+  base::flat_map<std::string, FrecencyStore::ValueData>* GetConditionData();
+
   const char* GetPredictorNameForTesting() const;
 
  private:
diff --git a/chrome/browser/ui/app_list/search/search_result_ranker/recurrence_ranker_config.proto b/chrome/browser/ui/app_list/search/search_result_ranker/recurrence_ranker_config.proto
index 69ed406e..e91d571 100644
--- a/chrome/browser/ui/app_list/search/search_result_ranker/recurrence_ranker_config.proto
+++ b/chrome/browser/ui/app_list/search/search_result_ranker/recurrence_ranker_config.proto
@@ -39,7 +39,14 @@
     // The decay coeffficient number that control the decay rate. The decay is
     // once a week.
     required float weekly_decay_coeff = 1;
-    map<int32, float> bin_weights_map = 2;
+
+    // Controls how much a change in one bin affects the bins around it. |bin|
+    // is a relative index, and |weight| controls the magnitude of the update.
+    message BinWeight {
+      required int32 bin = 1;
+      required float weight = 2;
+    }
+    repeated BinWeight bin_weights = 2;
   }
 
   // The choice of which kind of predictor to use, and its configuration.
diff --git a/chrome/browser/ui/browser_navigator_browsertest.cc b/chrome/browser/ui/browser_navigator_browsertest.cc
index 488e069..d603265 100644
--- a/chrome/browser/ui/browser_navigator_browsertest.cc
+++ b/chrome/browser/ui/browser_navigator_browsertest.cc
@@ -1435,9 +1435,8 @@
   EXPECT_FALSE(web_contents->IsCrashed());
 }
 
-// Flaky crbug.com/977510
 IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
-                       DISABLED_NavigateFromDefaultToOptionsInSameTab) {
+                       NavigateFromDefaultToOptionsInSameTab) {
   {
     content::WindowedNotificationObserver observer(
         content::NOTIFICATION_LOAD_STOP,
diff --git a/chrome/browser/ui/chrome_pages.cc b/chrome/browser/ui/chrome_pages.cc
index ea85962..56aef52b1 100644
--- a/chrome/browser/ui/chrome_pages.cc
+++ b/chrome/browser/ui/chrome_pages.cc
@@ -66,11 +66,6 @@
 
 const char kHashMark[] = "#";
 
-#if defined(OS_CHROMEOS)
-const char kAppManagementPagePrefix[] =
-    "chrome://app-management/detail?ref=settings&id=";
-#endif
-
 void FocusWebContents(Browser* browser) {
   auto* const contents = browser->tab_strip_model()->GetActiveWebContents();
   if (contents)
@@ -410,19 +405,11 @@
 
 void ShowAppManagementPage(Profile* profile, const std::string& app_id) {
   DCHECK(base::FeatureList::IsEnabled(features::kAppManagement));
-  base::RecordAction(base::UserMetricsAction("ShowAppManagementPage"));
+  constexpr char kAppManagementPagePrefix[] =
+      "chrome://app-management/detail?id=";
+  base::RecordAction(base::UserMetricsAction("ShowAppManagementDetailPage"));
   GURL url(kAppManagementPagePrefix + app_id);
 
-#if defined(OS_CHROMEOS)
-  SettingsWindowManager* settings = SettingsWindowManager::GetInstance();
-  if (!base::FeatureList::IsEnabled(chromeos::features::kSplitSettings)) {
-    base::RecordAction(base::UserMetricsAction("ShowOptions"));
-    settings->ShowChromePageForProfile(profile, url);
-    return;
-  }
-  // Fall through and open browser settings in a tab.
-#endif
-
   Browser* browser = chrome::FindTabbedBrowser(profile, false);
   if (!browser)
     browser = new Browser(Browser::CreateParams(profile, true));
diff --git a/chrome/browser/ui/extensions/hosted_app_browsertest.cc b/chrome/browser/ui/extensions/hosted_app_browsertest.cc
index fdf0aca..5748cd8 100644
--- a/chrome/browser/ui/extensions/hosted_app_browsertest.cc
+++ b/chrome/browser/ui/extensions/hosted_app_browsertest.cc
@@ -900,17 +900,9 @@
       OpenApplicationWindow(params, web_app_info.file_handler->action);
   navigation_observer.Wait();
 
-  base::Value expected(base::Value::Type::DICTIONARY);
-  expected.SetStringKey("cause", "default");
-  expected.SetIntKey("length", 0);
-
-  EXPECT_EQ(expected,
-            content::EvalJsWithManualReply(
-                web_contents,
-                "getLaunchParams().then(params => {"
-                "domAutomationController.send({ cause: params.cause, length: "
-                "params.files.length });"
-                "});"));
+  EXPECT_EQ(0, content::EvalJs(
+                   web_contents,
+                   "getLaunchParams().then(params => params.files.length)"));
 }
 
 #if !defined(OS_ANDROID)
diff --git a/chrome/browser/ui/views/page_info/page_info_bubble_view_browsertest.cc b/chrome/browser/ui/views/page_info/page_info_bubble_view_browsertest.cc
index d49f50c3..9cf4b06b21 100644
--- a/chrome/browser/ui/views/page_info/page_info_bubble_view_browsertest.cc
+++ b/chrome/browser/ui/views/page_info/page_info_bubble_view_browsertest.cc
@@ -7,6 +7,7 @@
 #include "base/run_loop.h"
 #include "base/scoped_observer.h"
 #include "base/test/metrics/histogram_tester.h"
+#include "build/build_config.h"
 #include "chrome/browser/safe_browsing/chrome_password_protection_service.h"
 #include "chrome/browser/ssl/security_state_tab_helper.h"
 #include "chrome/browser/ui/browser_commands.h"
@@ -352,7 +353,14 @@
             PageInfoBubbleView::GetShownBubbleType());
 }
 
-IN_PROC_BROWSER_TEST_F(PageInfoBubbleViewBrowserTest, ChromeURL) {
+// Flaky on Windows (https://crbug.com/976791)
+#if defined(OS_WIN)
+#define MAYBE_ChromeURL DISABLED_ChromeURL
+#else
+#define MAYBE_ChromeURL ChromeURL
+#endif
+
+IN_PROC_BROWSER_TEST_F(PageInfoBubbleViewBrowserTest, MAYBE_ChromeURL) {
   ui_test_utils::NavigateToURL(browser(), GURL("chrome://settings"));
   OpenPageInfoBubble(browser());
   EXPECT_EQ(PageInfoBubbleView::BUBBLE_INTERNAL_PAGE,
@@ -575,8 +583,15 @@
   ShowAndVerifyUi();
 }
 
+// Flaky on Windows (https://crbug.com/976927)
+#if defined(OS_WIN)
+#define MAYBE_InvokeUi_Internal DISABLED_InvokeUi_Internal
+#else
+#define MAYBE_InvokeUi_Internal InvokeUi_Internal
+#endif
+
 // Shows the Page Info bubble for an internal page, e.g. chrome://settings.
-IN_PROC_BROWSER_TEST_F(PageInfoBubbleViewBrowserTest, InvokeUi_Internal) {
+IN_PROC_BROWSER_TEST_F(PageInfoBubbleViewBrowserTest, MAYBE_InvokeUi_Internal) {
   ShowAndVerifyUi();
 }
 
diff --git a/chrome/browser/ui/views/relaunch_notification/relaunch_recommended_timer.h b/chrome/browser/ui/views/relaunch_notification/relaunch_recommended_timer.h
index 376e9de2..cb52b268 100644
--- a/chrome/browser/ui/views/relaunch_notification/relaunch_recommended_timer.h
+++ b/chrome/browser/ui/views/relaunch_notification/relaunch_recommended_timer.h
@@ -11,8 +11,7 @@
 #include "chrome/browser/ui/views/relaunch_notification/wall_clock_timer.h"
 
 // Timer that handles notification title refresh for relaunch recommended
-// notification. Created either by RelaunchRecommendedBubbleView for Chrome
-// desktop or directly by the controller in the Chrome OS implementation.
+// notification. Created by RelaunchRecommendedBubbleView for Chrome desktop.
 // Title refresh is invoked with the |callback| provided at creation.
 class RelaunchRecommendedTimer {
  public:
@@ -44,8 +43,7 @@
   // A timer with which title refreshes are scheduled.
   WallClockTimer refresh_timer_;
 
-  // Callback which triggers the actual title update, which differs on Chrome
-  // for desktop vs for Chrome OS.
+  // Callback which triggers the actual title update on Chrome desktop.
   base::RepeatingClosure callback_;
 
   DISALLOW_COPY_AND_ASSIGN(RelaunchRecommendedTimer);
diff --git a/chrome/browser/ui/views/select_file_dialog_extension.cc b/chrome/browser/ui/views/select_file_dialog_extension.cc
index 9a63051..bd2818f 100644
--- a/chrome/browser/ui/views/select_file_dialog_extension.cc
+++ b/chrome/browser/ui/views/select_file_dialog_extension.cc
@@ -161,18 +161,23 @@
 #endif
 }
 
+SelectFileDialogExtension::RoutingID GetRoutingID(
+    content::WebContents* web_contents,
+    int android_task_id) {
+  if (android_task_id != SelectFileDialogExtension::kAndroidTaskIdNone) {
+    return base::StringPrintf("android.%d", android_task_id);
+  } else if (web_contents) {
+    return base::StringPrintf(
+        "web.%d", web_contents->GetMainFrame()->GetFrameTreeNodeId());
+  }
+  LOG(ERROR) << "Unable to generate a RoutingID";
+  return "";
+}
+
 }  // namespace
 
 /////////////////////////////////////////////////////////////////////////////
 
-// static
-SelectFileDialogExtension::RoutingID
-SelectFileDialogExtension::GetRoutingIDFromWebContents(
-    content::WebContents* web_contents) {
-  return base::StringPrintf("web.%d",
-                            web_contents->GetMainFrame()->GetFrameTreeNodeId());
-}
-
 // TODO(jamescook): Move this into a new file shell_dialogs_chromeos.cc
 // static
 SelectFileDialogExtension* SelectFileDialogExtension::Create(
@@ -302,6 +307,7 @@
     const base::FilePath::StringType& default_extension,
     gfx::NativeWindow owner_window,
     void* params,
+    int owner_android_task_id,
     bool show_android_picker_apps) {
   if (owner_window_) {
     LOG(ERROR) << "File dialog already in use!";
@@ -313,7 +319,11 @@
 
   // The web contents to associate the dialog with.
   content::WebContents* web_contents = NULL;
-  FindRuntimeContext(owner_window, &base_window, &web_contents);
+
+  // Obtain BaseWindow and WebContents if the owner window is browser.
+  if (owner_android_task_id == kAndroidTaskIdNone)
+    FindRuntimeContext(owner_window, &base_window, &web_contents);
+
   if (web_contents)
     profile_ = Profile::FromBrowserContext(web_contents->GetBrowserContext());
 
@@ -328,7 +338,7 @@
 
   // Check if we have another dialog opened for the contents. It's unlikely, but
   // possible. In such situation, discard this request.
-  RoutingID routing_id = GetRoutingIDFromWebContents(web_contents);
+  RoutingID routing_id = GetRoutingID(web_contents, owner_android_task_id);
   if (PendingExists(routing_id))
     return;
 
@@ -421,9 +431,10 @@
     const base::FilePath::StringType& default_extension,
     gfx::NativeWindow owner_window,
     void* params) {
-  SelectFileWithFileManagerParams(
-      type, title, default_path, file_types, file_type_index, default_extension,
-      owner_window, params, false /* show_android_picker_apps */);
+  SelectFileWithFileManagerParams(type, title, default_path, file_types,
+                                  file_type_index, default_extension,
+                                  owner_window, params, kAndroidTaskIdNone,
+                                  false /* show_android_picker_apps */);
 }
 
 bool SelectFileDialogExtension::IsResizeable() const {
diff --git a/chrome/browser/ui/views/select_file_dialog_extension.h b/chrome/browser/ui/views/select_file_dialog_extension.h
index 6c2e095..50fc903 100644
--- a/chrome/browser/ui/views/select_file_dialog_extension.h
+++ b/chrome/browser/ui/views/select_file_dialog_extension.h
@@ -34,10 +34,10 @@
       public ExtensionDialogObserver {
  public:
   // Opaque ID type for identifying the tab spawned each dialog, unique for
-  // every WebContents.
+  // every WebContents or every Android task ID.
   typedef std::string RoutingID;
-  static RoutingID GetRoutingIDFromWebContents(
-      content::WebContents* web_contents);
+
+  static const int kAndroidTaskIdNone = -1;
 
   static SelectFileDialogExtension* Create(
       ui::SelectFileDialog::Listener* listener,
@@ -65,6 +65,10 @@
   content::RenderViewHost* GetRenderViewHost();
 
   // Call SelectFile with params specific to Chrome OS file manager.
+  // |owner_android_task_id| is the Android task ID of the owner window if the
+  //     owner is Android, or kAndroidTaskIdNone if the owner is browser.
+  // |show_android_picker_apps| determines whether to show Android picker apps
+  //     in the select file dialog.
   void SelectFileWithFileManagerParams(
       Type type,
       const base::string16& title,
@@ -74,6 +78,7 @@
       const base::FilePath::StringType& default_extension,
       gfx::NativeWindow owning_window,
       void* params,
+      int owner_android_task_id,
       bool show_android_picker_apps);
 
  protected:
diff --git a/chrome/browser/ui/webui/chromeos/login/enrollment_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/enrollment_screen_handler.cc
index 1e1ef952..5c9688e 100644
--- a/chrome/browser/ui/webui/chromeos/login/enrollment_screen_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/enrollment_screen_handler.cc
@@ -372,8 +372,6 @@
       ShowError(IDS_ENTERPRISE_ENROLLMENT_AUTH_FATAL_ERROR, false);
       return;
     case GoogleServiceAuthError::USER_NOT_SIGNED_UP:
-    case GoogleServiceAuthError::ACCOUNT_DELETED:
-    case GoogleServiceAuthError::ACCOUNT_DISABLED:
       ShowError(IDS_ENTERPRISE_ENROLLMENT_AUTH_ACCOUNT_ERROR, true);
       return;
     case GoogleServiceAuthError::CONNECTION_FAILED:
diff --git a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
index 71211bd..98cdd7b5 100644
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
@@ -561,6 +561,7 @@
   LocalizedString localized_strings[] = {
       {"appsPageTitle", IDS_SETTINGS_APPS_TITLE},
       {"manageYourApps", IDS_SETTINGS_APPS_LINK_TEXT},
+      {"manageYourAppsSublabel", IDS_SETTINGS_APPS_LINK_SUBLABEL_TEXT},
   };
 
   AddLocalizedStringsBulk(html_source, localized_strings,
diff --git a/chrome/chrome_paks.gni b/chrome/chrome_paks.gni
index 8ff44c72..d944436 100644
--- a/chrome/chrome_paks.gni
+++ b/chrome/chrome_paks.gni
@@ -8,10 +8,6 @@
 import("//ui/base/ui_features.gni")
 import("chrome_repack_locales.gni")
 
-if (is_chromeos) {
-  import("//chrome/browser/chromeos/kiosk_next_home/kiosk_next.gni")
-}
-
 # Generates a rule to repack a set of resources, substituting a given string
 # in for the percentage (e.g. "100", "200"). It generates the repacked files in
 # the "gen" directory, and then introduces a copy rule to copy it to the root
@@ -172,10 +168,6 @@
         "//third_party/ink:ink_resources",
         "//ui/file_manager:resources",
       ]
-      if (enable_kiosk_next && is_chrome_branded) {
-        sources += [ "$root_gen_dir/chrome/kiosk_next_internal_resources.pak" ]
-        deps += [ "//chrome/browser/resources:kiosk_next_internal_resources" ]
-      }
     }
     if (!is_android && !is_chromeos) {
       sources += [ "$root_gen_dir/chrome/onboarding_welcome_resources.pak" ]
diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc
index 41bf78e..317e6b52 100644
--- a/chrome/common/pref_names.cc
+++ b/chrome/common/pref_names.cc
@@ -936,12 +936,19 @@
     "policy.device_wallpaper_image_file_path";
 
 // Boolean whether Kerberos daemon supports remembering passwords.
+// Tied to KerberosRememberPasswordEnabled policy.
 const char kKerberosRememberPasswordEnabled[] =
     "kerberos.remember_password_enabled";
 // Boolean whether users may add new Kerberos accounts.
+// Tied to KerberosAddAccountsAllowed policy.
 const char kKerberosAddAccountsAllowed[] = "kerberos.add_accounts_allowed";
 // Dictionary specifying a pre-set list of Kerberos accounts.
+// Tied to KerberosAccounts policy.
 const char kKerberosAccounts[] = "kerberos.accounts";
+// Used by KerberosCredentialsManager to remember which account is currently
+// active (empty if none) and to determine whether to wake up the Kerberos
+// daemon on session startup.
+const char kKerberosActivePrincipalName[] = "kerberos.active_principal_name";
 
 // A boolean pref for enabling/disabling App reinstall recommendations in Zero
 // State Launcher by policy.
diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h
index 44707b9..1d6b2f22 100644
--- a/chrome/common/pref_names.h
+++ b/chrome/common/pref_names.h
@@ -305,6 +305,7 @@
 extern const char kKerberosRememberPasswordEnabled[];
 extern const char kKerberosAddAccountsAllowed[];
 extern const char kKerberosAccounts[];
+extern const char kKerberosActivePrincipalName[];
 extern const char kAppReinstallRecommendationEnabled[];
 extern const char kStartupBrowserWindowLaunchSuppressed[];
 extern const char kDeviceWebUsbAllowDevicesForUrls[];
diff --git a/chrome/renderer/autofill/password_autofill_agent_browsertest.cc b/chrome/renderer/autofill/password_autofill_agent_browsertest.cc
index 5a84966..6ec9ad2 100644
--- a/chrome/renderer/autofill/password_autofill_agent_browsertest.cc
+++ b/chrome/renderer/autofill/password_autofill_agent_browsertest.cc
@@ -51,6 +51,7 @@
 using autofill::PasswordForm;
 using autofill::mojom::FillingStatus;
 using autofill::mojom::FocusedFieldType;
+using autofill::mojom::PasswordFormFieldPredictionType;
 using autofill::mojom::SubmissionIndicatorEvent;
 using base::ASCIIToUTF16;
 using base::UTF16ToUTF8;
@@ -2538,9 +2539,11 @@
       form_util::EXTRACT_NONE, &form_data, nullptr));
   // Simulate Autofill predictions: the first field is username, the third
   // one is password.
-  std::map<autofill::FormData, PasswordFormFieldPredictionMap> predictions;
-  predictions[form_data][form_data.fields[0]] = PREDICTION_USERNAME;
-  predictions[form_data][form_data.fields[2]] = PREDICTION_NEW_PASSWORD;
+  autofill::FormsPredictionsMap predictions;
+  predictions[form_data][form_data.fields[0]] =
+      PasswordFormFieldPredictionType::kUsername;
+  predictions[form_data][form_data.fields[2]] =
+      PasswordFormFieldPredictionType::kNewPassword;
   password_autofill_agent_->AutofillUsernameAndPasswordDataReceived(
       predictions);
 
@@ -2778,8 +2781,9 @@
       form_element, blink::WebFormControlElement(), nullptr,
       form_util::EXTRACT_NONE, &form_data, nullptr));
   // Simulate Autofill predictions: the third field is not a password.
-  std::map<autofill::FormData, PasswordFormFieldPredictionMap> predictions;
-  predictions[form_data][form_data.fields[2]] = PREDICTION_NOT_PASSWORD;
+  autofill::FormsPredictionsMap predictions;
+  predictions[form_data][form_data.fields[2]] =
+      PasswordFormFieldPredictionType::kNotPassword;
   password_autofill_agent_->AutofillUsernameAndPasswordDataReceived(
       predictions);
 
diff --git a/chrome/test/data/webui/print_preview/custom_margins_test.js b/chrome/test/data/webui/print_preview/custom_margins_test.js
index fb311f95..7d8fc75 100644
--- a/chrome/test/data/webui/print_preview/custom_margins_test.js
+++ b/chrome/test/data/webui/print_preview/custom_margins_test.js
@@ -163,24 +163,34 @@
      * @param {number} currentValue The current margin value in points.
      * @param {string} input The new textbox input for the margin.
      * @param {boolean} invalid Whether the new value is invalid.
+     * @param {number=} newValuePts the new margin value in pts. If not
+     *     specified, computes the value assuming it is in bounds.
      * @return {!Promise} Promise that resolves when the test is complete.
      */
-    function testControlTextbox(control, key, currentValuePts, input, invalid) {
-      const newValuePts = invalid ?
-          currentValuePts :
-          Math.round(parseFloat(input) * pointsPerInch);
+    function testControlTextbox(
+        control, key, currentValuePts, input, invalid, newValuePts) {
+      if (newValuePts === undefined) {
+        newValuePts = invalid ? currentValuePts :
+                                Math.round(parseFloat(input) * pointsPerInch);
+      }
       assertEquals(
           currentValuePts, container.getSettingValue('customMargins')[key]);
-      controlTextbox = control.$.textbox.inputElement;
+      controlTextbox = control.$.input;
       controlTextbox.value = input;
       controlTextbox.dispatchEvent(
           new CustomEvent('input', {composed: true, bubbles: true}));
 
-      return test_util.eventToPromise('text-change', control).then(() => {
-        assertEquals(
-            newValuePts, container.getSettingValue('customMargins')[key]);
-        assertEquals(invalid, control.invalid);
-      });
+      if (!invalid) {
+        return test_util.eventToPromise('text-change', control).then(() => {
+          assertEquals(
+              newValuePts, container.getSettingValue('customMargins')[key]);
+          assertFalse(control.invalid);
+        });
+      } else {
+        return test_util.eventToPromise('input-change', control).then(() => {
+          assertTrue(control.invalid);
+        });
+      }
     }
 
     /*
@@ -392,42 +402,57 @@
     // Test that setting the margin controls with their textbox inputs updates
     // the custom margins setting.
     test(assert(TestNames.SetControlsWithTextbox), function() {
+      /**
+       * @param {!Array<!MarginControlElement>} controls
+       * @param {number} currentValue Current margin value in pts
+       * @param {string} input String to set in margin textboxes
+       * @param {boolean} invalid Whether the string is invalid
+       * @return {!Promise} Promise that resolves when all controls have been
+       *     tested.
+       */
+      const testAllTextboxes = function(
+          controls, currentValue, input, invalid) {
+        return testControlTextbox(
+                   controls[0], keys[0], currentValue, input, invalid)
+            .then(
+                () => testControlTextbox(
+                    controls[1], keys[1], currentValue, input, invalid))
+            .then(
+                () => testControlTextbox(
+                    controls[2], keys[2], currentValue, input, invalid))
+            .then(
+                () => testControlTextbox(
+                    controls[3], keys[3], currentValue, input, invalid));
+      };
+
       return finishSetup().then(() => {
         const controls = getControls();
+        // Set a shorter delay for testing so the test doesn't take too
+        // long.
+        controls.forEach(c => {
+          c.getInput().setAttribute('data-timeout-delay', 10);
+        });
         model.set(
             'settings.margins.value',
             print_preview.ticket_items.MarginsTypeValue.CUSTOM);
         Polymer.dom.flush();
 
         // Verify entering a new value updates the settings.
-        // Then verify entering an invalid value invalidates the control and
-        // does not update the settings.
-        const newValue = '1.75';  // 1.75 inches
-        const invalidValue = 'abc';
-        const newMarginPts = Math.round(parseFloat(newValue) * pointsPerInch);
-        return testControlTextbox(
-                   controls[0], keys[0], defaultMarginPts, newValue, false)
+        // Then verify entering an invalid value invalidates the control
+        // and does not update the settings.
+        const value1 = '1.75';  // 1.75 inches
+        const newMargin1 = Math.round(parseFloat(value1) * pointsPerInch);
+        const value2 = '.6';
+        const newMargin2 = Math.round(parseFloat(value2) * pointsPerInch);
+        const maximumTopMargin = container.pageSize.height - newMargin2 - 72;
+        return testAllTextboxes(controls, defaultMarginPts, value1, false)
+            .then(() => testAllTextboxes(controls, newMargin1, 'abc', true))
+            .then(() => testAllTextboxes(controls, newMargin1, value2, false))
             .then(
                 () => testControlTextbox(
-                    controls[1], keys[1], defaultMarginPts, newValue, false))
-            .then(
-                () => testControlTextbox(
-                    controls[2], keys[2], defaultMarginPts, newValue, false))
-            .then(
-                () => testControlTextbox(
-                    controls[3], keys[3], defaultMarginPts, newValue, false))
-            .then(
-                () => testControlTextbox(
-                    controls[0], keys[0], newMarginPts, invalidValue, true))
-            .then(
-                () => testControlTextbox(
-                    controls[1], keys[1], newMarginPts, invalidValue, true))
-            .then(
-                () => testControlTextbox(
-                    controls[2], keys[2], newMarginPts, invalidValue, true))
-            .then(
-                () => testControlTextbox(
-                    controls[3], keys[3], newMarginPts, invalidValue, true));
+                    controls[0], keys[0], newMargin2, '1,000', false,
+                    container.pageSize.height - newMargin2 -
+                        72 /* MINIMUM_DISTANCE, see margin_control.js */));
       });
     });
 
@@ -561,7 +586,7 @@
             const bottomControl = controls[2];
             const whenEventFired =
                 test_util.eventToPromise('text-focus-position', container);
-            bottomControl.$.textbox.focus();
+            bottomControl.$.input.focus();
             // Workaround for mac so that this does not need to be an
             // interactive test: manually fire the focus event from the control.
             bottomControl.fire('text-focus');
diff --git a/chrome/test/data/webui/settings/app_management_page_test.js b/chrome/test/data/webui/settings/app_management_page_test.js
new file mode 100644
index 0000000..319ae8e
--- /dev/null
+++ b/chrome/test/data/webui/settings/app_management_page_test.js
@@ -0,0 +1,42 @@
+// Copyright 2019 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+cr.define('settings_app_management_page', function() {
+  suite('AppManagementUITest', function() {
+    /** @type {SettingsAppManagementPageElement} */
+    let appManagementPage = null;
+    /** @type {settings.OpenWindowProxy} */
+    let openWindowProxy = null;
+
+    setup(function() {
+      openWindowProxy = new TestOpenWindowProxy();
+      settings.OpenWindowProxyImpl.instance_ = openWindowProxy;
+
+      PolymerTest.clearBody();
+      appManagementPage =
+          document.createElement('settings-app-management-page');
+      document.body.appendChild(appManagementPage);
+
+      Polymer.dom.flush();
+    });
+
+    teardown(function() {
+      appManagementPage.remove();
+    });
+
+    test('Open App Management', function() {
+      // Hardcode this value so that the test is independent of the production
+      // implementation that might include additional query parameters.
+      const appManagementPageUrl = 'chrome://app-management';
+
+      assertTrue(!!appManagementPage.$$('#appManagementButton'));
+      appManagementPage.$$('#appManagementButton').click();
+      Polymer.dom.flush();
+
+      return openWindowProxy.whenCalled('openURL').then(url => {
+        assertEquals(appManagementPageUrl, url);
+      });
+    });
+  });
+});
diff --git a/chrome/test/data/webui/settings/autofill_page_test.js b/chrome/test/data/webui/settings/autofill_page_test.js
index 8a8953f..dfd77e0 100644
--- a/chrome/test/data/webui/settings/autofill_page_test.js
+++ b/chrome/test/data/webui/settings/autofill_page_test.js
@@ -3,20 +3,6 @@
 // found in the LICENSE file.
 
 cr.define('settings_autofill_page', function() {
-  /** @implements {settings.OpenWindowProxy} */
-  class TestOpenWindowProxy extends TestBrowserProxy {
-    constructor() {
-      super([
-        'openURL',
-      ]);
-    }
-
-    /** @override */
-    openURL(url) {
-      this.methodCalled('openURL', url);
-    }
-  }
-
   suite('PasswordsAndForms', function() {
     /**
      * Creates a new passwords and forms element.
diff --git a/chrome/test/data/webui/settings/cr_settings_browsertest.js b/chrome/test/data/webui/settings/cr_settings_browsertest.js
index 51a3e14..14cf5ccd 100644
--- a/chrome/test/data/webui/settings/cr_settings_browsertest.js
+++ b/chrome/test/data/webui/settings/cr_settings_browsertest.js
@@ -226,6 +226,34 @@
 });
 GEN('#endif');
 
+GEN('#if defined(OS_CHROMEOS)');
+/**
+ * Test fixture for
+ * chrome/browser/resources/settings/app_management/app_management_page.html
+ * @constructor
+ * @extends {CrSettingsBrowserTest}
+ */
+function CrSettingsAppManagementPageTest() {}
+
+CrSettingsAppManagementPageTest.prototype = {
+  __proto__: CrSettingsBrowserTest.prototype,
+
+  /** @override */
+  browsePreload: 'chrome://settings',
+
+  /** @override */
+  extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([
+    '../test_browser_proxy.js',
+    'app_management_page_test.js',
+    'test_open_window_proxy.js',
+  ]),
+};
+
+TEST_F('CrSettingsAppManagementPageTest', 'All', function() {
+  mocha.run();
+});
+GEN('#endif  // defined(OS_CHROMEOS)');
+
 /**
  * Test fixture for
  * chrome/browser/resources/settings/autofill_page/autofill_page.html.
@@ -248,6 +276,7 @@
     'ensure_lazy_loaded.js',
     'fake_settings_private.js',
     'passwords_and_autofill_fake_data.js',
+    'test_open_window_proxy.js',
     'test_password_manager_proxy.js',
   ]),
 };
diff --git a/chrome/test/data/webui/settings/test_open_window_proxy.js b/chrome/test/data/webui/settings/test_open_window_proxy.js
new file mode 100644
index 0000000..2468c1b
--- /dev/null
+++ b/chrome/test/data/webui/settings/test_open_window_proxy.js
@@ -0,0 +1,17 @@
+// Copyright 2019 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+/** @implements {settings.OpenWindowProxy} */
+class TestOpenWindowProxy extends TestBrowserProxy {
+  constructor() {
+    super([
+      'openURL',
+    ]);
+  }
+
+  /** @override */
+  openURL(url) {
+    this.methodCalled('openURL', url);
+  }
+}
diff --git a/chromeos/CHROMEOS_LKGM b/chromeos/CHROMEOS_LKGM
index 51b61a1..03cc720 100644
--- a/chromeos/CHROMEOS_LKGM
+++ b/chromeos/CHROMEOS_LKGM
@@ -1 +1 @@
-12292.0.0
\ No newline at end of file
+12296.0.0
\ No newline at end of file
diff --git a/chromeos/components/drivefs/drivefs_auth_unittest.cc b/chromeos/components/drivefs/drivefs_auth_unittest.cc
index a0af470..f5f11ce 100644
--- a/chromeos/components/drivefs/drivefs_auth_unittest.cc
+++ b/chromeos/components/drivefs/drivefs_auth_unittest.cc
@@ -193,7 +193,7 @@
   EXPECT_CALL(mock_identity_accessor_,
               GetAccessToken("test@example.com", _, "drivefs"))
       .WillOnce(testing::Return(std::make_pair(
-          base::nullopt, GoogleServiceAuthError::ACCOUNT_DISABLED)));
+          base::nullopt, GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS)));
   ExpectAccessToken(false, mojom::AccessTokenStatus::kAuthError, "");
 }
 
@@ -235,7 +235,7 @@
     EXPECT_CALL(mock_identity_accessor_,
                 GetAccessToken("test@example.com", _, "drivefs"))
         .WillOnce(testing::Return(std::make_pair(
-            base::nullopt, GoogleServiceAuthError::ACCOUNT_DISABLED)));
+            base::nullopt, GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS)));
     ExpectAccessToken(false, mojom::AccessTokenStatus::kAuthError, "");
   }
 }
diff --git a/chromeos/components/drivefs/drivefs_host_unittest.cc b/chromeos/components/drivefs/drivefs_host_unittest.cc
index f04c7d6e..0cb6c56 100644
--- a/chromeos/components/drivefs/drivefs_host_unittest.cc
+++ b/chromeos/components/drivefs/drivefs_host_unittest.cc
@@ -551,7 +551,8 @@
       .WillOnce(testing::DoAll(
           testing::InvokeWithoutArgs([&]() { host_->Unmount(); }),
           testing::Return(std::make_pair(
-              base::nullopt, GoogleServiceAuthError::ACCOUNT_DISABLED))));
+              base::nullopt,
+              GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS))));
 
   base::RunLoop run_loop;
   delegate_ptr_.set_connection_error_handler(run_loop.QuitClosure());
diff --git a/chromeos/constants/chromeos_features.cc b/chromeos/constants/chromeos_features.cc
index 1c7dcac..0e04189d 100644
--- a/chromeos/constants/chromeos_features.cc
+++ b/chromeos/constants/chromeos_features.cc
@@ -118,17 +118,6 @@
 const base::Feature kSplitSettings{"SplitSettings",
                                    base::FEATURE_DISABLED_BY_DEFAULT};
 
-// If enabled, a new screen will be shown at the end of the OOBE/Login for
-// supervised users. It will display a loading page while we fetch
-// eligibility data.
-const base::Feature kSupervisionOnboardingEligibility{
-    "SupervisionOnboardingEligibility", base::FEATURE_ENABLED_BY_DEFAULT};
-
-// If enabled, we will display the full onboarding flow for eligible supervised
-// users.
-const base::Feature kSupervisionOnboardingScreens{
-    "SupervisionOnboardingScreens", base::FEATURE_DISABLED_BY_DEFAULT};
-
 // Enables the updated cellular activation UI; see go/cros-cellular-design.
 const base::Feature kUpdatedCellularActivationUi{
     "UpdatedCellularActivationUi", base::FEATURE_DISABLED_BY_DEFAULT};
diff --git a/chromeos/constants/chromeos_features.h b/chromeos/constants/chromeos_features.h
index 5bbd097..9d85ab24 100644
--- a/chromeos/constants/chromeos_features.h
+++ b/chromeos/constants/chromeos_features.h
@@ -60,10 +60,6 @@
 COMPONENT_EXPORT(CHROMEOS_CONSTANTS)
 extern const base::Feature kSplitSettings;
 COMPONENT_EXPORT(CHROMEOS_CONSTANTS)
-extern const base::Feature kSupervisionOnboardingEligibility;
-COMPONENT_EXPORT(CHROMEOS_CONSTANTS)
-extern const base::Feature kSupervisionOnboardingScreens;
-COMPONENT_EXPORT(CHROMEOS_CONSTANTS)
 extern const base::Feature kUpdatedCellularActivationUi;
 COMPONENT_EXPORT(CHROMEOS_CONSTANTS)
 extern const base::Feature kUseMessagesGoogleComDomain;
diff --git a/chromeos/constants/chromeos_switches.cc b/chromeos/constants/chromeos_switches.cc
index e22a651..0a2f687 100644
--- a/chromeos/constants/chromeos_switches.cc
+++ b/chromeos/constants/chromeos_switches.cc
@@ -499,11 +499,6 @@
 // This makes it easier to test layout logic.
 const char kShowLoginDevOverlay[] = "show-login-dev-overlay";
 
-// Url prefix for the Supervision Onboarding remote web pages.
-// This makes it easier to test with fake HTTP servers or local dev versions.
-const char kSupervisionOnboardingUrlPrefix[] =
-    "supervision-onboarding-url-prefix";
-
 // Enables testing for encryption migration UI.
 const char kTestEncryptionMigrationUI[] = "test-encryption-migration-ui";
 
diff --git a/chromeos/constants/chromeos_switches.h b/chromeos/constants/chromeos_switches.h
index 731a3ba..73529fd 100644
--- a/chromeos/constants/chromeos_switches.h
+++ b/chromeos/constants/chromeos_switches.h
@@ -182,8 +182,6 @@
 COMPONENT_EXPORT(CHROMEOS_CONSTANTS) extern const char kShelfScrollable[];
 COMPONENT_EXPORT(CHROMEOS_CONSTANTS)
 extern const char kShowAndroidFilesInFilesApp[];
-COMPONENT_EXPORT(CHROMEOS_CONSTANTS)
-extern const char kSupervisionOnboardingUrlPrefix[];
 COMPONENT_EXPORT(CHROMEOS_CONSTANTS) extern const char kShowLoginDevOverlay[];
 COMPONENT_EXPORT(CHROMEOS_CONSTANTS)
 extern const char kTestEncryptionMigrationUI[];
diff --git a/chromeos/dbus/kerberos/fake_kerberos_client.cc b/chromeos/dbus/kerberos/fake_kerberos_client.cc
index 04e681c..4dd066e 100644
--- a/chromeos/dbus/kerberos/fake_kerberos_client.cc
+++ b/chromeos/dbus/kerberos/fake_kerberos_client.cc
@@ -135,18 +135,27 @@
     return;
   }
 
-  // Remember password.
-  std::string password = ReadPassword(password_fd);
-  if (!password.empty() && request.remember_password())
-    data->password = password;
+  std::string password;
+  if (request.use_login_password()) {
+    // "Retrieve" login password.
+    password = "fake_login_password";
 
-  // Use remembered password.
-  if (password.empty())
-    password = data->password;
-
-  // Erase a previously remembered password.
-  if (!request.remember_password())
+    // Erase a previously remembered password.
     data->password.clear();
+  } else {
+    // Remember password.
+    password = ReadPassword(password_fd);
+    if (!password.empty() && request.remember_password())
+      data->password = password;
+
+    // Use remembered password.
+    if (password.empty())
+      password = data->password;
+
+    // Erase a previously remembered password.
+    if (!request.remember_password())
+      data->password.clear();
+  }
 
   // Reject empty passwords.
   if (password.empty()) {
diff --git a/chromeos/login/auth/user_context.h b/chromeos/login/auth/user_context.h
index 8e3d5302..61a3d2fb 100644
--- a/chromeos/login/auth/user_context.h
+++ b/chromeos/login/auth/user_context.h
@@ -60,8 +60,7 @@
   // its hashed/transformed representation.
   const Key* GetKey() const;
   Key* GetKey();
-  // The plain-text user password. Initialized only on enterprise enrolled
-  // devices. See https://crbug.com/386606.
+  // The plain-text user password. See https://crbug.com/386606.
   const Key* GetPasswordKey() const;
   Key* GetMutablePasswordKey();
   // The challenge-response keys for user authentication. Currently, such keys
diff --git a/chromeos/services/device_sync/DEPS b/chromeos/services/device_sync/DEPS
index 822926a..1c91687 100644
--- a/chromeos/services/device_sync/DEPS
+++ b/chromeos/services/device_sync/DEPS
@@ -5,10 +5,21 @@
   "+components/signin/core/browser",
   # Use identity_manager.h instead of the below files;
   # see https://groups.google.com/a/chromium.org/d/msg/chromium-dev/dgFLuxqZt1o/iEqkyoQQBwAJ for help and info.
+  "-components/signin/core/browser/account_fetcher_service.h",
+  "-components/signin/core/browser/account_info_fetcher.h",
+  "-components/signin/core/browser/account_tracker_service.h",
+  "-components/signin/core/browser/child_account_info_fetcher_android.h",
   "-components/signin/core/browser/fake_profile_oauth2_token_service.h",
-  "-components/signin/core/browser/profile_oauth2_token_service.h",
+  "-components/signin/core/browser/gaia_cookie_manager_service.h",
+  "-components/signin/core/browser/oauth2_token_service_delegate_android.h",
+  "-components/signin/core/browser/oauth2_multilogin_helper.h",
+  "-components/signin/core/browser/oauth2_multilogin_token_fetcher.h",
   "-components/signin/core/browser/primary_account_manager.h",
   "-components/signin/core/browser/primary_account_policy_manager.h",
+  "-components/signin/core/browser/profile_oauth2_token_service.h",
+  "-components/signin/core/browser/profile_oauth2_token_service_delegate_chromeos.h",
+  "-components/signin/core/browser/ubertoken_fetcher_impl.h",
+
   "+components/version_info",
   "+google_apis/gaia",
   "+mojo/public/cpp",
diff --git a/chromeos/services/ime/BUILD.gn b/chromeos/services/ime/BUILD.gn
index cc29e8b..f3a349b 100644
--- a/chromeos/services/ime/BUILD.gn
+++ b/chromeos/services/ime/BUILD.gn
@@ -18,6 +18,7 @@
     "//base",
     "//chromeos/services/ime/public/cpp:buildflags",
     "//chromeos/services/ime/public/cpp:rulebased",
+    "//chromeos/services/ime/public/cpp/shared_lib:interfaces",
     "//chromeos/services/ime/public/mojom",
     "//services/service_manager/public/cpp",
     "//services/service_manager/public/mojom",
@@ -25,7 +26,6 @@
 
   if (enable_cros_ime_decoder) {
     sources += [
-      "//chromeos/services/ime/public/cpp/shared_lib:interfaces",
       "decoder/decoder_engine.cc",
       "decoder/decoder_engine.h",
       "decoder/downloader_impl.cc",
diff --git a/components/autofill/content/renderer/password_form_conversion_utils.cc b/components/autofill/content/renderer/password_form_conversion_utils.cc
index f1309e7..baf455cb 100644
--- a/components/autofill/content/renderer/password_form_conversion_utils.cc
+++ b/components/autofill/content/renderer/password_form_conversion_utils.cc
@@ -47,6 +47,8 @@
 
 namespace autofill {
 
+using mojom::PasswordFormFieldPredictionType;
+
 namespace {
 
 constexpr char kAutocompleteUsername[] = "username";
@@ -234,19 +236,17 @@
   // Matching only requires that action and name of the form match to allow
   // the username to be updated even if the form is changed after page load.
   // See https://crbug.com/476092 for more details.
-  const PasswordFormFieldPredictionMap* field_predictions = nullptr;
-  for (const auto& form_predictions_pair : form_predictions) {
-    if (form_predictions_pair.first.action == form_data.action &&
-        form_predictions_pair.first.name == form_data.name) {
-      field_predictions = &form_predictions_pair.second;
-      break;
-    }
-  }
+  auto field_predictions = std::find_if(
+      form_predictions.begin(), form_predictions.end(),
+      [&form_data](const auto& form_predictions_pair) {
+        return form_predictions_pair.first.action == form_data.action &&
+               form_predictions_pair.first.name == form_data.name;
+      });
 
-  if (!field_predictions)
+  if (field_predictions == form_predictions.end())
     return;
 
-  for (const auto& prediction : *field_predictions) {
+  for (const auto& prediction : field_predictions->second) {
     const FormFieldData& target_field = prediction.first;
     const PasswordFormFieldPredictionType& type = prediction.second;
     for (const FormFieldData& field : form_data.fields) {
@@ -549,7 +549,7 @@
                           &predicted_fields);
 
     for (const auto& predicted_pair : predicted_fields) {
-      if (predicted_pair.second == PREDICTION_USERNAME) {
+      if (predicted_pair.second == PasswordFormFieldPredictionType::kUsername) {
         predicted_username_field = predicted_pair.first;
         break;
       }
@@ -570,7 +570,8 @@
     }
     auto possible_password_field_iterator = predicted_fields.find(input);
     return possible_password_field_iterator != predicted_fields.end() &&
-           possible_password_field_iterator->second == PREDICTION_NOT_PASSWORD;
+           possible_password_field_iterator->second ==
+               PasswordFormFieldPredictionType::kNotPassword;
   });
 
   // Derive the list of all plausible passwords, usernames and the non-password
diff --git a/components/autofill/content/renderer/password_form_conversion_utils_browsertest.cc b/components/autofill/content/renderer/password_form_conversion_utils_browsertest.cc
index 5436a0a3..67bd03c 100644
--- a/components/autofill/content/renderer/password_form_conversion_utils_browsertest.cc
+++ b/components/autofill/content/renderer/password_form_conversion_utils_browsertest.cc
@@ -37,6 +37,9 @@
 using blink::WebVector;
 
 namespace autofill {
+
+using mojom::PasswordFormFieldPredictionType;
+
 namespace {
 
 const char kTestFormActionURL[] = "http://cnn.com";
@@ -1858,7 +1861,7 @@
   std::string html = builder.ProduceHTML();
 
   std::map<int, PasswordFormFieldPredictionType> predictions_positions;
-  predictions_positions[1] = PREDICTION_NOT_PASSWORD;
+  predictions_positions[1] = PasswordFormFieldPredictionType::kNotPassword;
 
   FormsPredictionsMap predictions;
   SetPredictions(html, &predictions, predictions_positions);
@@ -1886,7 +1889,7 @@
   std::string html = builder.ProduceHTML();
 
   std::map<int, PasswordFormFieldPredictionType> predictions_positions;
-  predictions_positions[0] = PREDICTION_USERNAME;
+  predictions_positions[0] = PasswordFormFieldPredictionType::kUsername;
   FormsPredictionsMap predictions;
   SetPredictions(html, &predictions, predictions_positions);
 
@@ -1914,7 +1917,7 @@
   std::string html = builder.ProduceHTML();
 
   std::map<int, PasswordFormFieldPredictionType> predictions_positions;
-  predictions_positions[0] = PREDICTION_USERNAME;
+  predictions_positions[0] = PasswordFormFieldPredictionType::kUsername;
   FormsPredictionsMap predictions;
   SetPredictions(html, &predictions, predictions_positions);
 
@@ -1945,7 +1948,7 @@
   std::string html = builder.ProduceHTML();
 
   std::map<int, PasswordFormFieldPredictionType> predictions_positions;
-  predictions_positions[2] = PREDICTION_NOT_PASSWORD;
+  predictions_positions[2] = PasswordFormFieldPredictionType::kNotPassword;
 
   FormsPredictionsMap predictions;
   SetPredictions(html, &predictions, predictions_positions);
@@ -1973,7 +1976,7 @@
   std::string html = builder.ProduceHTML();
 
   std::map<int, PasswordFormFieldPredictionType> predictions_positions;
-  predictions_positions[1] = PREDICTION_NOT_PASSWORD;
+  predictions_positions[1] = PasswordFormFieldPredictionType::kNotPassword;
 
   FormsPredictionsMap predictions;
   SetPredictions(html, &predictions, predictions_positions);
@@ -2001,7 +2004,7 @@
   std::string html = builder.ProduceHTML();
 
   std::map<int, PasswordFormFieldPredictionType> predictions_positions;
-  predictions_positions[2] = PREDICTION_NOT_PASSWORD;
+  predictions_positions[2] = PasswordFormFieldPredictionType::kNotPassword;
 
   FormsPredictionsMap predictions;
   SetPredictions(html, &predictions, predictions_positions);
diff --git a/components/autofill/core/browser/DEPS b/components/autofill/core/browser/DEPS
index e56e6370..d668f841 100644
--- a/components/autofill/core/browser/DEPS
+++ b/components/autofill/core/browser/DEPS
@@ -11,10 +11,21 @@
   "+components/signin/core/browser",
   # Use identity_manager.h instead of the below files;
   # see https://groups.google.com/a/chromium.org/d/msg/chromium-dev/dgFLuxqZt1o/iEqkyoQQBwAJ for help and info.
+  "-components/signin/core/browser/account_fetcher_service.h",
+  "-components/signin/core/browser/account_info_fetcher.h",
+  "-components/signin/core/browser/account_tracker_service.h",
+  "-components/signin/core/browser/child_account_info_fetcher_android.h",
   "-components/signin/core/browser/fake_profile_oauth2_token_service.h",
-  "-components/signin/core/browser/profile_oauth2_token_service.h",
+  "-components/signin/core/browser/gaia_cookie_manager_service.h",
+  "-components/signin/core/browser/oauth2_token_service_delegate_android.h",
+  "-components/signin/core/browser/oauth2_multilogin_helper.h",
+  "-components/signin/core/browser/oauth2_multilogin_token_fetcher.h",
   "-components/signin/core/browser/primary_account_manager.h",
   "-components/signin/core/browser/primary_account_policy_manager.h",
+  "-components/signin/core/browser/profile_oauth2_token_service.h",
+  "-components/signin/core/browser/profile_oauth2_token_service_delegate_chromeos.h",
+  "-components/signin/core/browser/ubertoken_fetcher_impl.h",
+
   "+components/sync",
   "+components/variations",
   "+components/version_info",
diff --git a/components/autofill/core/browser/autofill_manager.cc b/components/autofill/core/browser/autofill_manager.cc
index a706e6b..b96bba7 100644
--- a/components/autofill/core/browser/autofill_manager.cc
+++ b/components/autofill/core/browser/autofill_manager.cc
@@ -191,6 +191,29 @@
   return google_apis::GetNonStableAPIKey();
 }
 
+bool IsAddressForm(FieldTypeGroup field_type_group) {
+  switch (field_type_group) {
+    case NAME:
+    case NAME_BILLING:
+    case EMAIL:
+    case COMPANY:
+    case ADDRESS_HOME:
+    case ADDRESS_BILLING:
+    case PHONE_HOME:
+    case PHONE_BILLING:
+      return true;
+    case CREDIT_CARD:
+    case TRANSACTION:
+    case PASSWORD_FIELD:
+    case USERNAME_FIELD:
+    case NO_GROUP:
+    case UNFILLABLE:
+      return false;
+  }
+  NOTREACHED();
+  return false;
+}
+
 }  // namespace
 
 AutofillManager::FillingContext::FillingContext() = default;
@@ -531,13 +554,9 @@
   if (!GetCachedFormAndField(form, field, &form_structure, &autofill_field))
     return;
 
-  if (autofill_field->Type().group() == CREDIT_CARD) {
-    credit_card_form_event_logger_->OnPopupSuppressed(*form_structure,
-                                                      *autofill_field);
-  } else {
-    address_form_event_logger_->OnPopupSuppressed(*form_structure,
-                                                  *autofill_field);
-  }
+  auto* logger = GetEventFormLogger(autofill_field->Type().group());
+  if (logger)
+    logger->OnPopupSuppressed(*form_structure, *autofill_field);
 }
 
 void AutofillManager::OnTextFieldDidChangeImpl(const FormData& form,
@@ -562,6 +581,12 @@
         data_util::DetermineGroups(form_structure->GetServerFieldTypes());
   }
 
+  if (!autofill_field->is_autofilled) {
+    auto* logger = GetEventFormLogger(autofill_field->Type().group());
+    if (logger)
+      logger->OnTypedIntoNonFilledField();
+  }
+
   if (!user_did_type_) {
     user_did_type_ = true;
     AutofillMetrics::LogUserHappinessMetric(
@@ -577,6 +602,10 @@
         autofill_field->Type().group(),
         client_->GetSecurityLevelForUmaHistograms(), profile_form_bitmask);
 
+    auto* logger = GetEventFormLogger(autofill_field->Type().group());
+    if (logger)
+      logger->OnEditedAutofilledField();
+
     if (!user_did_edit_autofilled_field_) {
       user_did_edit_autofilled_field_ = true;
       AutofillMetrics::LogUserHappinessMetric(
@@ -927,14 +956,11 @@
         client_->GetSecurityLevelForUmaHistograms(), profile_form_bitmask);
   }
 
-  if (autofill_field->Type().group() == CREDIT_CARD) {
-    credit_card_form_event_logger_->OnDidShowSuggestions(
-        *form_structure, *autofill_field,
-        form_structure->form_parsed_timestamp(), sync_state_);
-  } else {
-    address_form_event_logger_->OnDidShowSuggestions(
-        *form_structure, *autofill_field,
-        form_structure->form_parsed_timestamp(), sync_state_);
+  auto* logger = GetEventFormLogger(autofill_field->Type().group());
+  if (logger) {
+    logger->OnDidShowSuggestions(*form_structure, *autofill_field,
+                                 form_structure->form_parsed_timestamp(),
+                                 sync_state_);
   }
 }
 
@@ -1621,7 +1647,7 @@
     for (const auto& field : *form_structure) {
       if (field->Type().group() == CREDIT_CARD) {
         card_form = true;
-      } else {
+      } else if (IsAddressForm(field->Type().group())) {
         address_form = true;
       }
     }
@@ -2079,11 +2105,11 @@
   if (got_autofillable_form) {
     if (context->focused_field->Type().group() == CREDIT_CARD) {
       context->is_filling_credit_card = true;
-      credit_card_form_event_logger_->OnDidInteractWithAutofillableForm(
-          *(context->form_structure), sync_state_);
-    } else {
-      address_form_event_logger_->OnDidInteractWithAutofillableForm(
-          *(context->form_structure), sync_state_);
+    }
+    auto* logger = GetEventFormLogger(context->focused_field->Type().group());
+    if (logger) {
+      logger->OnDidInteractWithAutofillableForm(*(context->form_structure),
+                                                sync_state_);
     }
   }
 
@@ -2142,4 +2168,29 @@
   }
 }
 
+FormEventLoggerBase* AutofillManager::GetEventFormLogger(
+    FieldTypeGroup field_type_group) const {
+  switch (field_type_group) {
+    case NAME:
+    case NAME_BILLING:
+    case EMAIL:
+    case COMPANY:
+    case ADDRESS_HOME:
+    case ADDRESS_BILLING:
+    case PHONE_HOME:
+    case PHONE_BILLING:
+      return address_form_event_logger_.get();
+    case CREDIT_CARD:
+      return credit_card_form_event_logger_.get();
+    case TRANSACTION:
+    case PASSWORD_FIELD:
+    case USERNAME_FIELD:
+    case NO_GROUP:
+    case UNFILLABLE:
+      return nullptr;
+  }
+  NOTREACHED();
+  return nullptr;
+}
+
 }  // namespace autofill
diff --git a/components/autofill/core/browser/autofill_manager.h b/components/autofill/core/browser/autofill_manager.h
index bff2eca6..c936a750 100644
--- a/components/autofill/core/browser/autofill_manager.h
+++ b/components/autofill/core/browser/autofill_manager.h
@@ -503,6 +503,11 @@
                                std::vector<Suggestion>* suggestions,
                                SuggestionsContext* context);
 
+  // Returns an appropriate EventFormLogger for the given |field_type_group|.
+  // May return nullptr.
+  FormEventLoggerBase* GetEventFormLogger(
+      FieldTypeGroup field_type_group) const;
+
   AutofillClient* const client_;
 
   std::string app_locale_;
@@ -692,6 +697,11 @@
                            OnLoadedServerPredictions_ResetManager);
   FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, DontOfferToSavePaymentsCard);
   FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, FillInUpdatedExpirationDate);
+  FRIEND_TEST_ALL_PREFIXES(AutofillMetricsFunnelTest, LogFunnelMetrics);
+  FRIEND_TEST_ALL_PREFIXES(AutofillMetricsKeyMetricsTest,
+                           LogUserFixesFilledData);
+  FRIEND_TEST_ALL_PREFIXES(AutofillMetricsKeyMetricsTest,
+                           LogUserFixesFilledDataButDoesNotSubmit);
   DISALLOW_COPY_AND_ASSIGN(AutofillManager);
 };
 
diff --git a/components/autofill/core/browser/autofill_metrics_unittest.cc b/components/autofill/core/browser/autofill_metrics_unittest.cc
index 0d924c1..7504a61 100644
--- a/components/autofill/core/browser/autofill_metrics_unittest.cc
+++ b/components/autofill/core/browser/autofill_metrics_unittest.cc
@@ -9006,4 +9006,375 @@
   }
 }
 
+// Parameterized test where the parameter indicates how far we went through
+// the funnel:
+// 0 = Site contained form but user did not focus it (did not interact).
+// 1 = User interacted with form (focused a field).
+// 2 = User saw a suggestion to fill the form.
+// 3 = User accepted the suggestion.
+// 4 = User submitted the form.
+class AutofillMetricsFunnelTest : public AutofillMetricsTest,
+                                  public testing::WithParamInterface<int> {
+ public:
+  AutofillMetricsFunnelTest() = default;
+  ~AutofillMetricsFunnelTest() = default;
+};
+
+INSTANTIATE_TEST_SUITE_P(AutofillMetricsTest,
+                         AutofillMetricsFunnelTest,
+                         testing::Values(0, 1, 2, 3, 4));
+
+TEST_P(AutofillMetricsFunnelTest, LogFunnelMetrics) {
+  // Create a profile.
+  RecreateProfile(/*is_server=*/false);
+
+  // Load a fillable form.
+  FormData form;
+  form.name = ASCIIToUTF16("TestForm");
+  form.url = GURL("http://example.com/form.html");
+  form.action = GURL("http://example.com/submit.html");
+  form.main_frame_origin = url::Origin::Create(autofill_client_.form_origin());
+
+  FormFieldData field;
+  std::vector<ServerFieldType> field_types;
+  test::CreateTestFormField("State", "state", "", "text", &field);
+  form.fields.push_back(field);
+  field_types.push_back(ADDRESS_HOME_STATE);
+  test::CreateTestFormField("City", "city", "", "text", &field);
+  form.fields.push_back(field);
+  field_types.push_back(ADDRESS_HOME_CITY);
+  test::CreateTestFormField("Street", "street", "", "text", &field);
+  form.fields.push_back(field);
+  field_types.push_back(ADDRESS_HOME_STREET_ADDRESS);
+
+  base::HistogramTester histogram_tester;
+
+  // Phase 1: Simulate events according to GetParam().
+  const bool user_interacted_with_form = GetParam() >= 1;
+  const bool user_saw_suggestion = GetParam() >= 2;
+  const bool user_accepted_suggestion = GetParam() >= 3;
+  const bool user_submitted_form = GetParam() >= 4;
+
+  // Simulate that the autofill manager has seen this form on page load.
+  autofill_manager_->OnFormsSeen({form}, TimeTicks());
+
+  if (!user_saw_suggestion) {
+    // Remove the profile to prevent suggestion from being shown.
+    personal_data_->ClearProfiles();
+  }
+
+  // Simulate interacting with the form.
+  if (user_interacted_with_form) {
+    autofill_manager_->OnQueryFormFieldAutofill(
+        /*query_id=*/0, form, form.fields[0], gfx::RectF(),
+        /*autoselect_first_suggestion=*/false);
+  }
+
+  // Simulate seeing a suggestion.
+  if (user_saw_suggestion) {
+    autofill_manager_->DidShowSuggestions(
+        /*has_autofill_suggestions=*/true, form, form.fields[0]);
+  }
+
+  // Simulate filling the form.
+  if (user_accepted_suggestion) {
+    autofill_manager_->FillOrPreviewForm(
+        AutofillDriver::FORM_DATA_ACTION_FILL, /*query_id=*/0, form,
+        form.fields.front(),
+        autofill_manager_->MakeFrontendID(std::string(), kTestGuid));
+  }
+
+  // Simulate form submission.
+  if (user_submitted_form) {
+    autofill_manager_->OnFormSubmitted(form, /*known_success=*/false,
+                                       SubmissionSource::FORM_SUBMISSION);
+  }
+
+  // Reset |autofill_manager_| to commit UMA metrics.
+  autofill_manager_.reset();
+
+  // Phase 2: Validate Funnel expectations.
+  histogram_tester.ExpectBucketCount("Autofill.Funnel.ParsedAsType.Address", 1,
+                                     1);
+  histogram_tester.ExpectBucketCount("Autofill.Funnel.ParsedAsType.CreditCard",
+                                     0, 1);
+  histogram_tester.ExpectBucketCount(
+      "Autofill.Funnel.InteractionAfterParsedAsType.Address",
+      user_interacted_with_form ? 1 : 0, 1);
+  if (user_interacted_with_form) {
+    histogram_tester.ExpectBucketCount(
+        "Autofill.Funnel.SuggestionAfterInteraction.Address",
+        user_saw_suggestion ? 1 : 0, 1);
+  } else {
+    histogram_tester.ExpectTotalCount(
+        "Autofill.Funnel.SuggestionAfterInteraction.Address", 0);
+  }
+
+  if (user_saw_suggestion) {
+    // If the suggestion was shown, we should record whether the user
+    // accepted it.
+    histogram_tester.ExpectBucketCount(
+        "Autofill.Funnel.FillAfterSuggestion.Address",
+        user_accepted_suggestion ? 1 : 0, 1);
+  } else {
+    histogram_tester.ExpectTotalCount(
+        "Autofill.Funnel.FillAfterSuggestion.Address", 0);
+  }
+
+  if (user_accepted_suggestion) {
+    histogram_tester.ExpectBucketCount(
+        "Autofill.Funnel.SubmissionAfterFill.Address",
+        user_submitted_form ? 1 : 0, 1);
+  } else {
+    histogram_tester.ExpectTotalCount(
+        "Autofill.Funnel.SubmissionAfterFill.Address", 0);
+  }
+
+  // Phase 3: Validate KeyMetrics expectations.
+  if (user_submitted_form) {
+    histogram_tester.ExpectBucketCount(
+        "Autofill.KeyMetrics.FillingReadiness.Address", 1, 1);
+    histogram_tester.ExpectBucketCount(
+        "Autofill.KeyMetrics.FillingAcceptance.Address", 1, 1);
+    histogram_tester.ExpectBucketCount(
+        "Autofill.KeyMetrics.FillingCorrectness.Address", 1, 1);
+    histogram_tester.ExpectBucketCount(
+        "Autofill.KeyMetrics.FillingAssistance.Address", 1, 1);
+  } else {
+    histogram_tester.ExpectTotalCount(
+        "Autofill.KeyMetrics.FillingReadiness.Address", 0);
+    histogram_tester.ExpectTotalCount(
+        "Autofill.KeyMetrics.FillingAcceptance.Address", 0);
+    histogram_tester.ExpectTotalCount(
+        "Autofill.KeyMetrics.FillingCorrectness.Address", 0);
+    histogram_tester.ExpectTotalCount(
+        "Autofill.KeyMetrics.FillingAssistance.Address", 0);
+  }
+  if (user_accepted_suggestion) {
+    histogram_tester.ExpectBucketCount(
+        "Autofill.KeyMetrics.FormSubmission.Autofilled.Address",
+        user_submitted_form ? 1 : 0, 1);
+  }
+}
+
+// Tests for Autofill.KeyMetrics.* metrics.
+class AutofillMetricsKeyMetricsTest : public AutofillMetricsTest {
+ public:
+  AutofillMetricsKeyMetricsTest() = default;
+  ~AutofillMetricsKeyMetricsTest() override = default;
+
+  void SetUp() override;
+
+  // Fillable form.
+  FormData form_;
+};
+
+void AutofillMetricsKeyMetricsTest::SetUp() {
+  AutofillMetricsTest::SetUp();
+
+  // Create a profile.
+  RecreateProfile(/*is_server=*/false);
+
+  // Load a fillable form.
+  form_.name = ASCIIToUTF16("TestForm");
+  form_.url = GURL("http://example.com/form.html");
+  form_.action = GURL("http://example.com/submit.html");
+  form_.main_frame_origin = url::Origin::Create(autofill_client_.form_origin());
+
+  FormFieldData field;
+  std::vector<ServerFieldType> field_types;
+  test::CreateTestFormField("State", "state", "", "text", &field);
+  form_.fields.push_back(field);
+  field_types.push_back(ADDRESS_HOME_STATE);
+  test::CreateTestFormField("City", "city", "", "text", &field);
+  form_.fields.push_back(field);
+  field_types.push_back(ADDRESS_HOME_CITY);
+  test::CreateTestFormField("Street", "street", "", "text", &field);
+  form_.fields.push_back(field);
+  field_types.push_back(ADDRESS_HOME_STREET_ADDRESS);
+
+  // Simulate having seen this form on page load.
+  autofill_manager_->AddSeenForm(form_, field_types, field_types);
+}
+
+// Validate Autofill.KeyMetrics.* in case the user submits the empty form.
+// Empty in the sense that the user did not fill/type into the fields (not that
+// it has no fields).
+TEST_F(AutofillMetricsKeyMetricsTest, LogEmptyForm) {
+  base::HistogramTester histogram_tester;
+
+  // Simulate page load.
+  autofill_manager_->OnFormsSeen({form_}, TimeTicks());
+  autofill_manager_->OnQueryFormFieldAutofill(
+      0, form_, form_.fields[0], gfx::RectF(),
+      /*autoselect_first_suggestion=*/false);
+
+  // Simulate form submission.
+  autofill_manager_->OnFormSubmitted(form_, false,
+                                     SubmissionSource::FORM_SUBMISSION);
+
+  // Reset |autofill_manager_| to commit UMA metrics.
+  autofill_manager_.reset();
+
+  histogram_tester.ExpectBucketCount(
+      "Autofill.KeyMetrics.FillingReadiness.Address", 1, 1);
+  histogram_tester.ExpectTotalCount(
+      "Autofill.KeyMetrics.FillingAcceptance.Address", 0);
+  histogram_tester.ExpectTotalCount(
+      "Autofill.KeyMetrics.FillingCorrectness.Address", 0);
+  histogram_tester.ExpectBucketCount(
+      "Autofill.KeyMetrics.FillingAssistance.Address", 0, 1);
+  histogram_tester.ExpectTotalCount(
+      "Autofill.KeyMetrics.FormSubmission.NotAutofilled.Address", 0);
+}
+
+// Validate Autofill.KeyMetrics.* in case the user has no address profile on
+// file, so nothing can be filled.
+TEST_F(AutofillMetricsKeyMetricsTest, LogNoProfile) {
+  base::HistogramTester histogram_tester;
+
+  // Simulate that no data is available.
+  personal_data_->ClearProfiles();
+  autofill_manager_->OnFormsSeen({form_}, TimeTicks());
+  autofill_manager_->OnQueryFormFieldAutofill(
+      0, form_, form_.fields[0], gfx::RectF(),
+      /*autoselect_first_suggestion=*/false);
+
+  // Simulate user typing the address.
+  autofill_manager_->OnTextFieldDidChange(form_, form_.fields[0], gfx::RectF(),
+                                          TimeTicks());
+  autofill_manager_->OnTextFieldDidChange(form_, form_.fields[1], gfx::RectF(),
+                                          TimeTicks());
+
+  // Simulate form submission.
+  autofill_manager_->OnFormSubmitted(form_, false,
+                                     SubmissionSource::FORM_SUBMISSION);
+
+  // Reset |autofill_manager_| to commit UMA metrics.
+  autofill_manager_.reset();
+
+  histogram_tester.ExpectBucketCount(
+      "Autofill.KeyMetrics.FillingReadiness.Address", 0, 1);
+  histogram_tester.ExpectTotalCount(
+      "Autofill.KeyMetrics.FillingAcceptance.Address", 0);
+  histogram_tester.ExpectTotalCount(
+      "Autofill.KeyMetrics.FillingCorrectness.Address", 0);
+  histogram_tester.ExpectBucketCount(
+      "Autofill.KeyMetrics.FillingAssistance.Address", 0, 1);
+  histogram_tester.ExpectBucketCount(
+      "Autofill.KeyMetrics.FormSubmission.NotAutofilled.Address", 1, 1);
+}
+
+// Validate Autofill.KeyMetrics.* in case the user does not accept a suggestion.
+TEST_F(AutofillMetricsKeyMetricsTest, LogUserDoesNotAcceptSuggestion) {
+  base::HistogramTester histogram_tester;
+
+  // Simulate that suggestion is shown but user does not accept it.
+  autofill_manager_->OnFormsSeen({form_}, TimeTicks());
+  autofill_manager_->OnQueryFormFieldAutofill(
+      0, form_, form_.fields[0], gfx::RectF(),
+      /*autoselect_first_suggestion=*/false);
+  autofill_manager_->DidShowSuggestions(
+      /*has_autofill_suggestions=*/true, form_, form_.fields[0]);
+
+  // Simulate user typing the address.
+  autofill_manager_->OnTextFieldDidChange(form_, form_.fields[0], gfx::RectF(),
+                                          TimeTicks());
+  autofill_manager_->OnTextFieldDidChange(form_, form_.fields[1], gfx::RectF(),
+                                          TimeTicks());
+
+  // Simulate form submission.
+  autofill_manager_->OnFormSubmitted(form_, false,
+                                     SubmissionSource::FORM_SUBMISSION);
+
+  // Reset |autofill_manager_| to commit UMA metrics.
+  autofill_manager_.reset();
+
+  histogram_tester.ExpectBucketCount(
+      "Autofill.KeyMetrics.FillingReadiness.Address", 1, 1);
+  histogram_tester.ExpectBucketCount(
+      "Autofill.KeyMetrics.FillingAcceptance.Address", 0, 1);
+  histogram_tester.ExpectTotalCount(
+      "Autofill.KeyMetrics.FillingCorrectness.Address", 0);
+  histogram_tester.ExpectBucketCount(
+      "Autofill.KeyMetrics.FillingAssistance.Address", 0, 1);
+  histogram_tester.ExpectBucketCount(
+      "Autofill.KeyMetrics.FormSubmission.NotAutofilled.Address", 1, 1);
+}
+
+// Validate Autofill.KeyMetrics.* in case the user has to fix the filled data.
+TEST_F(AutofillMetricsKeyMetricsTest, LogUserFixesFilledData) {
+  base::HistogramTester histogram_tester;
+
+  // Simulate that suggestion is shown and user accepts it.
+  autofill_manager_->OnFormsSeen({form_}, TimeTicks());
+  autofill_manager_->OnQueryFormFieldAutofill(
+      0, form_, form_.fields[0], gfx::RectF(),
+      /*autoselect_first_suggestion=*/false);
+  autofill_manager_->DidShowSuggestions(
+      /*has_autofill_suggestions=*/true, form_, form_.fields[0]);
+  autofill_manager_->FillOrPreviewForm(
+      AutofillDriver::FORM_DATA_ACTION_FILL, 0, form_, form_.fields.front(),
+      autofill_manager_->MakeFrontendID(std::string(), kTestGuid));
+
+  // Simulate user fixing the address.
+  autofill_manager_->OnTextFieldDidChange(form_, form_.fields[1], gfx::RectF(),
+                                          TimeTicks());
+
+  // Simulate form submission.
+  autofill_manager_->OnFormSubmitted(form_, false,
+                                     SubmissionSource::FORM_SUBMISSION);
+
+  // Reset |autofill_manager_| to commit UMA metrics.
+  autofill_manager_.reset();
+
+  histogram_tester.ExpectBucketCount(
+      "Autofill.KeyMetrics.FillingReadiness.Address", 1, 1);
+  histogram_tester.ExpectBucketCount(
+      "Autofill.KeyMetrics.FillingAcceptance.Address", 1, 1);
+  histogram_tester.ExpectBucketCount(
+      "Autofill.KeyMetrics.FillingCorrectness.Address", 0, 1);
+  histogram_tester.ExpectBucketCount(
+      "Autofill.KeyMetrics.FillingAssistance.Address", 1, 1);
+  histogram_tester.ExpectBucketCount(
+      "Autofill.KeyMetrics.FormSubmission.Autofilled.Address", 1, 1);
+}
+
+// Validate Autofill.KeyMetrics.* in case the user fixes the filled data but
+// then does not submit the form.
+TEST_F(AutofillMetricsKeyMetricsTest, LogUserFixesFilledDataButDoesNotSubmit) {
+  base::HistogramTester histogram_tester;
+
+  // Simulate that suggestion is shown and user accepts it.
+  autofill_manager_->OnFormsSeen({form_}, TimeTicks());
+  autofill_manager_->OnQueryFormFieldAutofill(
+      0, form_, form_.fields[0], gfx::RectF(),
+      /*autoselect_first_suggestion=*/false);
+  autofill_manager_->DidShowSuggestions(
+      /*has_autofill_suggestions=*/true, form_, form_.fields[0]);
+  autofill_manager_->FillOrPreviewForm(
+      AutofillDriver::FORM_DATA_ACTION_FILL, 0, form_, form_.fields.front(),
+      autofill_manager_->MakeFrontendID(std::string(), kTestGuid));
+
+  // Simulate user fixing the address.
+  autofill_manager_->OnTextFieldDidChange(form_, form_.fields[1], gfx::RectF(),
+                                          TimeTicks());
+
+  // Don't submit form.
+
+  // Reset |autofill_manager_| to commit UMA metrics.
+  autofill_manager_.reset();
+
+  histogram_tester.ExpectTotalCount(
+      "Autofill.KeyMetrics.FillingReadiness.Address", 0);
+  histogram_tester.ExpectTotalCount(
+      "Autofill.KeyMetrics.FillingAcceptance.Address", 0);
+  histogram_tester.ExpectTotalCount(
+      "Autofill.KeyMetrics.FillingCorrectness.Address", 0);
+  histogram_tester.ExpectTotalCount(
+      "Autofill.KeyMetrics.FillingAssistance.Address", 0);
+  histogram_tester.ExpectBucketCount(
+      "Autofill.KeyMetrics.FormSubmission.Autofilled.Address", 0, 1);
+}
+
 }  // namespace autofill
diff --git a/components/autofill/core/browser/metrics/form_event_logger_base.cc b/components/autofill/core/browser/metrics/form_event_logger_base.cc
index 7a7edfc..0b216483 100644
--- a/components/autofill/core/browser/metrics/form_event_logger_base.cc
+++ b/components/autofill/core/browser/metrics/form_event_logger_base.cc
@@ -7,8 +7,11 @@
 #include "base/metrics/histogram_functions.h"
 #include "base/metrics/user_metrics.h"
 #include "base/metrics/user_metrics_action.h"
+#include "base/strings/strcat.h"
 #include "base/time/time.h"
 
+using base::UmaHistogramBoolean;
+
 namespace autofill {
 
 FormEventLoggerBase::FormEventLoggerBase(
@@ -19,7 +22,9 @@
       is_in_main_frame_(is_in_main_frame),
       form_interactions_ukm_logger_(form_interactions_ukm_logger) {}
 
-FormEventLoggerBase::~FormEventLoggerBase() = default;
+FormEventLoggerBase::~FormEventLoggerBase() {
+  RecordFunnelAndKeyMetrics();
+}
 
 void FormEventLoggerBase::OnDidInteractWithAutofillableForm(
     const FormStructure& form,
@@ -49,6 +54,7 @@
 void FormEventLoggerBase::OnDidParseForm(const FormStructure& form) {
   Log(FORM_EVENT_DID_PARSE_FORM, form);
   RecordParseForm();
+  has_parsed_form_ = true;
 }
 
 void FormEventLoggerBase::OnPopupSuppressed(const FormStructure& form,
@@ -121,6 +127,14 @@
   }
 }
 
+void FormEventLoggerBase::OnTypedIntoNonFilledField() {
+  has_logged_typed_into_non_filled_field_ = true;
+}
+
+void FormEventLoggerBase::OnEditedAutofilledField() {
+  has_logged_edited_autofilled_field_ = true;
+}
+
 void FormEventLoggerBase::Log(FormEvent event,
                               const FormStructure& form) const {
   DCHECK_LT(event, NUM_FORM_EVENTS);
@@ -184,4 +198,71 @@
       server_record_type_count_, form_signature);
 }
 
+void FormEventLoggerBase::RecordFunnelAndKeyMetrics() {
+  UmaHistogramBoolean("Autofill.Funnel.ParsedAsType." + form_type_name_,
+                      has_parsed_form_);
+  // Log chronological funnel.
+  if (!has_parsed_form_)
+    return;
+  UmaHistogramBoolean(
+      "Autofill.Funnel.InteractionAfterParsedAsType." + form_type_name_,
+      has_logged_interacted_);
+  if (has_logged_interacted_) {
+    UmaHistogramBoolean(
+        "Autofill.Funnel.SuggestionAfterInteraction." + form_type_name_,
+        has_logged_suggestions_shown_);
+  }
+  if (has_logged_interacted_ && has_logged_suggestions_shown_) {
+    UmaHistogramBoolean(
+        "Autofill.Funnel.FillAfterSuggestion." + form_type_name_,
+        has_logged_suggestion_filled_);
+  }
+  if (has_logged_interacted_ && has_logged_suggestions_shown_ &&
+      has_logged_suggestion_filled_) {
+    UmaHistogramBoolean(
+        "Autofill.Funnel.SubmissionAfterFill." + form_type_name_,
+        has_logged_will_submit_);
+  }
+  // Log key success metrics, always preconditioned on a form submission (except
+  // for the Autofill.KeyMetrics.FormSubmission metrics which measure whether
+  // a submission happens).
+  if (has_logged_will_submit_) {
+    bool has_logged_data_to_fill_available_ =
+        (server_record_type_count_ + local_record_type_count_) > 0;
+    // Whether for a submitted form, Chrome had data stored that could be
+    // filled.
+    UmaHistogramBoolean(
+        "Autofill.KeyMetrics.FillingReadiness." + form_type_name_,
+        has_logged_data_to_fill_available_);
+    if (has_logged_suggestions_shown_) {
+      // Whether a user accepted a filling suggestion they saw for a form that
+      // was later submitted.
+      UmaHistogramBoolean(
+          "Autofill.KeyMetrics.FillingAcceptance." + form_type_name_,
+          has_logged_suggestion_filled_);
+    }
+    if (has_logged_suggestion_filled_) {
+      // Whether a filled form and submitted form required no fixes to filled
+      // fields.
+      UmaHistogramBoolean(
+          "Autofill.KeyMetrics.FillingCorrectness." + form_type_name_,
+          !has_logged_edited_autofilled_field_);
+    }
+    // Whether a submitted form was filled.
+    UmaHistogramBoolean(
+        "Autofill.KeyMetrics.FillingAssistance." + form_type_name_,
+        has_logged_suggestion_filled_);
+  }
+  if (has_logged_typed_into_non_filled_field_ ||
+      has_logged_suggestion_filled_) {
+    // Whether a (non-)autofilled form was submitted.
+    UmaHistogramBoolean(
+        base::StrCat(
+            {"Autofill.KeyMetrics.FormSubmission.",
+             (has_logged_suggestion_filled_ ? "Autofilled." : "NotAutofilled."),
+             form_type_name_}),
+        has_logged_will_submit_);
+  }
+}
+
 }  // namespace autofill
diff --git a/components/autofill/core/browser/metrics/form_event_logger_base.h b/components/autofill/core/browser/metrics/form_event_logger_base.h
index f07e6950..7d1351a7 100644
--- a/components/autofill/core/browser/metrics/form_event_logger_base.h
+++ b/components/autofill/core/browser/metrics/form_event_logger_base.h
@@ -56,6 +56,9 @@
                        AutofillSyncSigninState sync_state,
                        const FormStructure& form);
 
+  void OnTypedIntoNonFilledField();
+  void OnEditedAutofilledField();
+
  protected:
   virtual ~FormEventLoggerBase();
 
@@ -84,6 +87,10 @@
                      FormEvent event,
                      const FormStructure& form) const {}
 
+  // Records UMA metrics on the funnel and key metrics. This is not virtual
+  // because it is called in the destructor.
+  void RecordFunnelAndKeyMetrics();
+
   // Constructor parameters.
   std::string form_type_name_;
   bool is_in_main_frame_;
@@ -91,6 +98,7 @@
   // State variables.
   size_t server_record_type_count_ = 0;
   size_t local_record_type_count_ = 0;
+  bool has_parsed_form_ = false;
   bool has_logged_interacted_ = false;
   bool has_logged_popup_suppressed_ = false;
   bool has_logged_suggestions_shown_ = false;
@@ -98,6 +106,8 @@
   bool has_logged_will_submit_ = false;
   bool has_logged_submitted_ = false;
   bool logged_suggestion_filled_was_server_data_ = false;
+  bool has_logged_typed_into_non_filled_field_ = false;
+  bool has_logged_edited_autofilled_field_ = false;
 
   // The last field that was polled for suggestions.
   FormFieldData last_polled_field_;
diff --git a/components/autofill/core/common/mojom/autofill_types.mojom b/components/autofill/core/common/mojom/autofill_types.mojom
index 21aa222b..6091a04 100644
--- a/components/autofill/core/common/mojom/autofill_types.mojom
+++ b/components/autofill/core/common/mojom/autofill_types.mojom
@@ -29,12 +29,15 @@
     PROBABLE_FORM_SUBMISSION = 10,
 };
 
-// autofill::PasswordFormFieldPredictionType
+// This enum lists form field types as understood by the password manager,
+// essentially a digest of |autofill::ServerFieldType|. Note that we cannot
+// simply reuse |autofill::ServerFieldType| as it is defined in the browser,
+// while this enum will be used by both the browser and renderer.
 enum PasswordFormFieldPredictionType {
-  PREDICTION_USERNAME,
-  PREDICTION_CURRENT_PASSWORD,
-  PREDICTION_NEW_PASSWORD,
-  PREDICTION_NOT_PASSWORD
+  kUsername,
+  kCurrentPassword,
+  kNewPassword,
+  kNotPassword,
 };
 
 enum SubmissionSource {
@@ -298,17 +301,15 @@
   bool is_gaia_with_skip_save_password_form;
 };
 
-// TODO(leonhsl): Use map directly after http://crbug.com/628104 solved.
-// autofill::PasswordFormFieldPredictionMap
-// --> std::map<FormFieldData, PasswordFormFieldPredictionType>
+// Note: Even though https://crbug.com/628104 is solved, we still can not use a
+// map directly as long as https://crbug.com/914074 is not fixed.
 struct PasswordFormFieldPredictionMap {
   array<FormFieldData> keys;
   array<PasswordFormFieldPredictionType> values;
 };
 
-// TODO(leonhsl): Use map directly after http://crbug.com/628104 solved.
-// autofill::FormsPredictionsMap
-// --> std::map<FormData, PasswordFormFieldPredictionMap>
+// Note: Even though https://crbug.com/628104 is solved, we still can not use a
+// map directly as long as https://crbug.com/914074 is not fixed.
 struct FormsPredictionsMap {
   array<FormData> keys;
   array<PasswordFormFieldPredictionMap> values;
diff --git a/components/autofill/core/common/mojom/autofill_types.typemap b/components/autofill/core/common/mojom/autofill_types.typemap
index 50a36fd..cf6bd4d7 100644
--- a/components/autofill/core/common/mojom/autofill_types.typemap
+++ b/components/autofill/core/common/mojom/autofill_types.typemap
@@ -35,7 +35,6 @@
   "autofill.mojom.PasswordAndRealm=autofill::PasswordAndRealm",
   "autofill.mojom.PasswordForm=autofill::PasswordForm",
   "autofill.mojom.PasswordFormFieldPredictionMap=autofill::PasswordFormFieldPredictionMap",
-  "autofill.mojom.PasswordFormFieldPredictionType=autofill::PasswordFormFieldPredictionType",
   "autofill.mojom.PasswordFormFillData=autofill::PasswordFormFillData",
   "autofill.mojom.PasswordFormGenerationData=autofill::PasswordFormGenerationData",
   "autofill.mojom.PasswordGenerationUIData=autofill::password_generation::PasswordGenerationUIData",
diff --git a/components/autofill/core/common/mojom/autofill_types_struct_traits.cc b/components/autofill/core/common/mojom/autofill_types_struct_traits.cc
index f464ca1..90c3d50 100644
--- a/components/autofill/core/common/mojom/autofill_types_struct_traits.cc
+++ b/components/autofill/core/common/mojom/autofill_types_struct_traits.cc
@@ -14,61 +14,6 @@
 namespace mojo {
 
 // static
-autofill::mojom::PasswordFormFieldPredictionType
-EnumTraits<autofill::mojom::PasswordFormFieldPredictionType,
-           autofill::PasswordFormFieldPredictionType>::
-    ToMojom(autofill::PasswordFormFieldPredictionType input) {
-  switch (input) {
-    case autofill::PasswordFormFieldPredictionType::PREDICTION_USERNAME:
-      return autofill::mojom::PasswordFormFieldPredictionType::
-          PREDICTION_USERNAME;
-    case autofill::PasswordFormFieldPredictionType::PREDICTION_CURRENT_PASSWORD:
-      return autofill::mojom::PasswordFormFieldPredictionType::
-          PREDICTION_CURRENT_PASSWORD;
-    case autofill::PasswordFormFieldPredictionType::PREDICTION_NEW_PASSWORD:
-      return autofill::mojom::PasswordFormFieldPredictionType::
-          PREDICTION_NEW_PASSWORD;
-    case autofill::PasswordFormFieldPredictionType::PREDICTION_NOT_PASSWORD:
-      return autofill::mojom::PasswordFormFieldPredictionType::
-          PREDICTION_NOT_PASSWORD;
-  }
-
-  NOTREACHED();
-  return autofill::mojom::PasswordFormFieldPredictionType::
-      PREDICTION_NOT_PASSWORD;
-}
-
-// static
-bool EnumTraits<autofill::mojom::PasswordFormFieldPredictionType,
-                autofill::PasswordFormFieldPredictionType>::
-    FromMojom(autofill::mojom::PasswordFormFieldPredictionType input,
-              autofill::PasswordFormFieldPredictionType* output) {
-  switch (input) {
-    case autofill::mojom::PasswordFormFieldPredictionType::PREDICTION_USERNAME:
-      *output = autofill::PasswordFormFieldPredictionType::PREDICTION_USERNAME;
-      return true;
-    case autofill::mojom::PasswordFormFieldPredictionType::
-        PREDICTION_CURRENT_PASSWORD:
-      *output = autofill::PasswordFormFieldPredictionType::
-          PREDICTION_CURRENT_PASSWORD;
-      return true;
-    case autofill::mojom::PasswordFormFieldPredictionType::
-        PREDICTION_NEW_PASSWORD:
-      *output =
-          autofill::PasswordFormFieldPredictionType::PREDICTION_NEW_PASSWORD;
-      return true;
-    case autofill::mojom::PasswordFormFieldPredictionType::
-        PREDICTION_NOT_PASSWORD:
-      *output =
-          autofill::PasswordFormFieldPredictionType::PREDICTION_NOT_PASSWORD;
-      return true;
-  }
-
-  NOTREACHED();
-  return false;
-}
-
-// static
 bool StructTraits<
     autofill::mojom::FormFieldDataDataView,
     autofill::FormFieldData>::Read(autofill::mojom::FormFieldDataDataView data,
@@ -363,11 +308,11 @@
 }
 
 // static
-std::vector<autofill::PasswordFormFieldPredictionType>
+std::vector<autofill::mojom::PasswordFormFieldPredictionType>
 StructTraits<autofill::mojom::PasswordFormFieldPredictionMapDataView,
              autofill::PasswordFormFieldPredictionMap>::
     values(const autofill::PasswordFormFieldPredictionMap& r) {
-  std::vector<autofill::PasswordFormFieldPredictionType> types;
+  std::vector<autofill::mojom::PasswordFormFieldPredictionType> types;
   for (const auto& i : r)
     types.push_back(i.second);
   return types;
@@ -382,7 +327,7 @@
   std::vector<autofill::FormFieldData> keys;
   if (!data.ReadKeys(&keys))
     return false;
-  std::vector<autofill::PasswordFormFieldPredictionType> values;
+  std::vector<autofill::mojom::PasswordFormFieldPredictionType> values;
   if (!data.ReadValues(&values))
     return false;
   if (keys.size() != values.size())
diff --git a/components/autofill/core/common/mojom/autofill_types_struct_traits.h b/components/autofill/core/common/mojom/autofill_types_struct_traits.h
index 98a32476..249b3c929 100644
--- a/components/autofill/core/common/mojom/autofill_types_struct_traits.h
+++ b/components/autofill/core/common/mojom/autofill_types_struct_traits.h
@@ -30,15 +30,6 @@
 namespace mojo {
 
 template <>
-struct EnumTraits<autofill::mojom::PasswordFormFieldPredictionType,
-                  autofill::PasswordFormFieldPredictionType> {
-  static autofill::mojom::PasswordFormFieldPredictionType ToMojom(
-      autofill::PasswordFormFieldPredictionType input);
-  static bool FromMojom(autofill::mojom::PasswordFormFieldPredictionType input,
-                        autofill::PasswordFormFieldPredictionType* output);
-};
-
-template <>
 struct StructTraits<autofill::mojom::FormFieldDataDataView,
                     autofill::FormFieldData> {
   static const base::string16& label(const autofill::FormFieldData& r) {
@@ -588,7 +579,7 @@
   static std::vector<autofill::FormFieldData> keys(
       const autofill::PasswordFormFieldPredictionMap& r);
 
-  static std::vector<autofill::PasswordFormFieldPredictionType> values(
+  static std::vector<autofill::mojom::PasswordFormFieldPredictionType> values(
       const autofill::PasswordFormFieldPredictionMap& r);
 
   static bool Read(autofill::mojom::PasswordFormFieldPredictionMapDataView data,
diff --git a/components/autofill/core/common/mojom/autofill_types_struct_traits_unittest.cc b/components/autofill/core/common/mojom/autofill_types_struct_traits_unittest.cc
index 46c71e04..3fa3da3 100644
--- a/components/autofill/core/common/mojom/autofill_types_struct_traits_unittest.cc
+++ b/components/autofill/core/common/mojom/autofill_types_struct_traits_unittest.cc
@@ -20,6 +20,8 @@
 
 namespace autofill {
 
+using mojom::PasswordFormFieldPredictionType;
+
 const std::vector<const char*> kOptions = {"Option1", "Option2", "Option3",
                                            "Option4"};
 namespace {
@@ -114,18 +116,17 @@
   test::CreateTestAddressFormData(&form_data);
   ASSERT_TRUE(form_data.fields.size() >= 4);
   result_map[form_data][form_data.fields[0]] =
-      PasswordFormFieldPredictionType::PREDICTION_USERNAME;
+      PasswordFormFieldPredictionType::kUsername;
   result_map[form_data][form_data.fields[1]] =
-      PasswordFormFieldPredictionType::PREDICTION_CURRENT_PASSWORD;
+      PasswordFormFieldPredictionType::kCurrentPassword;
   result_map[form_data][form_data.fields[2]] =
-      PasswordFormFieldPredictionType::PREDICTION_NEW_PASSWORD;
+      PasswordFormFieldPredictionType::kNewPassword;
   result_map[form_data][form_data.fields[3]] =
-      PasswordFormFieldPredictionType::PREDICTION_NOT_PASSWORD;
+      PasswordFormFieldPredictionType::kNotPassword;
 
   // 2nd element.
   form_data.fields.clear();
-  result_map[form_data] =
-      std::map<FormFieldData, PasswordFormFieldPredictionType>();
+  result_map[form_data] = {};
 
   // 3rd element.
   FormFieldData field_data;
@@ -136,9 +137,9 @@
                               kOptions, 4, &field_data);
   form_data.fields.push_back(field_data);
   result_map[form_data][form_data.fields[0]] =
-      PasswordFormFieldPredictionType::PREDICTION_NEW_PASSWORD;
+      PasswordFormFieldPredictionType::kNewPassword;
   result_map[form_data][form_data.fields[1]] =
-      PasswordFormFieldPredictionType::PREDICTION_CURRENT_PASSWORD;
+      PasswordFormFieldPredictionType::kCurrentPassword;
 }
 
 void CreatePasswordGenerationUIData(
diff --git a/components/autofill/core/common/password_form_field_prediction_map.h b/components/autofill/core/common/password_form_field_prediction_map.h
index 1f92c3b2..b0d149c 100644
--- a/components/autofill/core/common/password_form_field_prediction_map.h
+++ b/components/autofill/core/common/password_form_field_prediction_map.h
@@ -5,29 +5,17 @@
 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_PASSWORD_FORM_FIELD_PREDICTION_MAP_H_
 #define COMPONENTS_AUTOFILL_CORE_BROWSER_PASSWORD_FORM_FIELD_PREDICTION_MAP_H_
 
-#include <map>
-
+#include "base/containers/flat_map.h"
 #include "components/autofill/core/common/form_data.h"
 #include "components/autofill/core/common/form_field_data.h"
+#include "components/autofill/core/common/mojom/autofill_types.mojom-shared.h"
 
 namespace autofill {
 
-// This enum lists form field types as understood by the password manager,
-// esentially a digest of |autofill::ServerFieldType|. Note that we cannot
-// simply reuse |autofill::ServerFieldType| as it is defined in the browser,
-// while this enum will be used by both the browser and renderer.
-enum PasswordFormFieldPredictionType {
-  PREDICTION_USERNAME,
-  PREDICTION_CURRENT_PASSWORD,
-  PREDICTION_NEW_PASSWORD,
-  PREDICTION_NOT_PASSWORD,
-  PREDICTION_MAX = PREDICTION_NOT_PASSWORD
-};
-
 using PasswordFormFieldPredictionMap =
-    std::map<FormFieldData, PasswordFormFieldPredictionType>;
+    base::flat_map<FormFieldData, mojom::PasswordFormFieldPredictionType>;
 using FormsPredictionsMap =
-    std::map<FormData, PasswordFormFieldPredictionMap>;
+    base::flat_map<FormData, PasswordFormFieldPredictionMap>;
 
 }  // namespace autofill
 
diff --git a/components/background_task_scheduler/android/java/src/org/chromium/components/background_task_scheduler/TaskIds.java b/components/background_task_scheduler/android/java/src/org/chromium/components/background_task_scheduler/TaskIds.java
index fa0b485..54199d7 100644
--- a/components/background_task_scheduler/android/java/src/org/chromium/components/background_task_scheduler/TaskIds.java
+++ b/components/background_task_scheduler/android/java/src/org/chromium/components/background_task_scheduler/TaskIds.java
@@ -34,6 +34,7 @@
     public static final int BACKGROUND_SYNC_ONE_SHOT_JOB_ID = 102;
     public static final int NOTIFICATION_SCHEDULER_JOB_ID = 103;
     public static final int NOTIFICATION_TRIGGER_JOB_ID = 104;
+    public static final int PERIODIC_BACKGROUND_SYNC_CHROME_WAKEUP_TASK_JOB_ID = 105;
 
     private TaskIds() {}
 }
diff --git a/components/content_settings/core/browser/BUILD.gn b/components/content_settings/core/browser/BUILD.gn
index bfabd79..90aa5e8f 100644
--- a/components/content_settings/core/browser/BUILD.gn
+++ b/components/content_settings/core/browser/BUILD.gn
@@ -66,6 +66,17 @@
     deps += [ "//media" ]
   }
 
+  if (!is_ios) {
+    sources += [
+      "cookie_settings_policy_handler.cc",
+      "cookie_settings_policy_handler.h",
+    ]
+    deps += [
+      "//components/policy:generated",
+      "//components/policy/core/browser",
+    ]
+  }
+
   configs += [
     "//build/config/compiler:no_size_t_to_int_warning",
     "//build/config/compiler:wexit_time_destructors",
@@ -104,4 +115,13 @@
     "//testing/gtest",
     "//url",
   ]
+
+  if (!is_ios) {
+    sources += [ "cookie_settings_policy_handler_unittest.cc" ]
+
+    deps += [
+      "//components/policy:generated",
+      "//components/policy/core/browser:test_support",
+    ]
+  }
 }
diff --git a/components/content_settings/core/browser/DEPS b/components/content_settings/core/browser/DEPS
index 952dd9c..50d1bba9 100644
--- a/components/content_settings/core/browser/DEPS
+++ b/components/content_settings/core/browser/DEPS
@@ -3,6 +3,7 @@
   "+components/content_settings/core/test",
   "+components/keyed_service/core",
   "+components/pref_registry",
+  "+components/policy",
   "+components/sync_preferences",
   "+components/url_formatter",
   "+extensions/buildflags",
diff --git a/components/content_settings/core/browser/cookie_settings_policy_handler.cc b/components/content_settings/core/browser/cookie_settings_policy_handler.cc
new file mode 100644
index 0000000..eaabdad7
--- /dev/null
+++ b/components/content_settings/core/browser/cookie_settings_policy_handler.cc
@@ -0,0 +1,36 @@
+// Copyright 2019 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "components/content_settings/core/browser/cookie_settings_policy_handler.h"
+
+#include "components/content_settings/core/common/pref_names.h"
+#include "components/policy/core/common/policy_map.h"
+#include "components/policy/policy_constants.h"
+#include "components/prefs/pref_value_map.h"
+
+namespace content_settings {
+
+CookieSettingsPolicyHandler::CookieSettingsPolicyHandler() {}
+
+CookieSettingsPolicyHandler::~CookieSettingsPolicyHandler() {}
+
+bool CookieSettingsPolicyHandler::CheckPolicySettings(
+    const policy::PolicyMap& policies,
+    policy::PolicyErrorMap* errors) {
+  return true;
+}
+
+void CookieSettingsPolicyHandler::ApplyPolicySettings(
+    const policy::PolicyMap& policies,
+    PrefValueMap* prefs) {
+  // When third party cookie blocking is set by policy, the cookie controls UI
+  // can't be enabled.
+  const base::Value* third_party_cookie_blocking =
+      policies.GetValue(policy::key::kBlockThirdPartyCookies);
+  if (third_party_cookie_blocking) {
+    prefs->SetBoolean(prefs::kCookieControlsEnabled, false);
+  }
+}
+
+}  // namespace content_settings
diff --git a/components/content_settings/core/browser/cookie_settings_policy_handler.h b/components/content_settings/core/browser/cookie_settings_policy_handler.h
new file mode 100644
index 0000000..391e97b
--- /dev/null
+++ b/components/content_settings/core/browser/cookie_settings_policy_handler.h
@@ -0,0 +1,34 @@
+// Copyright 2019 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_COOKIE_SETTINGS_POLICY_HANDLER_H_
+#define COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_COOKIE_SETTINGS_POLICY_HANDLER_H_
+
+#include "base/macros.h"
+#include "components/policy/core/browser/configuration_policy_handler.h"
+
+class PrefValueMap;
+
+namespace content_settings {
+
+// A ConfigurationPolicyHandler which forces kCookieControlsEnabled to false
+// when BlockThirdPartyCookies is set by policy.
+class CookieSettingsPolicyHandler : public policy::ConfigurationPolicyHandler {
+ public:
+  CookieSettingsPolicyHandler();
+  ~CookieSettingsPolicyHandler() override;
+
+  // ConfigurationPolicyHandler:
+  bool CheckPolicySettings(const policy::PolicyMap& policies,
+                           policy::PolicyErrorMap* errors) override;
+  void ApplyPolicySettings(const policy::PolicyMap& policies,
+                           PrefValueMap* prefs) override;
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(CookieSettingsPolicyHandler);
+};
+
+}  // namespace content_settings
+
+#endif  // COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_COOKIE_SETTINGS_POLICY_HANDLER_H_
diff --git a/components/content_settings/core/browser/cookie_settings_policy_handler_unittest.cc b/components/content_settings/core/browser/cookie_settings_policy_handler_unittest.cc
new file mode 100644
index 0000000..5976b17
--- /dev/null
+++ b/components/content_settings/core/browser/cookie_settings_policy_handler_unittest.cc
@@ -0,0 +1,59 @@
+// Copyright 2019 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "components/content_settings/core/browser/cookie_settings_policy_handler.h"
+
+#include <memory>
+
+#include "base/values.h"
+#include "components/content_settings/core/common/pref_names.h"
+#include "components/policy/core/browser/configuration_policy_pref_store.h"
+#include "components/policy/core/browser/configuration_policy_pref_store_test.h"
+#include "components/policy/core/common/policy_map.h"
+#include "components/policy/core/common/policy_types.h"
+#include "components/policy/policy_constants.h"
+
+namespace content_settings {
+
+class CookieSettingsPolicyHandlerTest
+    : public policy::ConfigurationPolicyPrefStoreTest {
+ public:
+  void SetUp() override {
+    handler_list_.AddHandler(std::make_unique<CookieSettingsPolicyHandler>());
+  }
+
+ protected:
+  void SetThirdPartyCookiePolicy(bool third_party_cookie_blocking_enabled) {
+    policy::PolicyMap policy;
+    policy.Set(
+        policy::key::kBlockThirdPartyCookies, policy::POLICY_LEVEL_MANDATORY,
+        policy::POLICY_SCOPE_USER, policy::POLICY_SOURCE_CLOUD,
+        std::make_unique<base::Value>(third_party_cookie_blocking_enabled),
+        nullptr);
+    UpdateProviderPolicy(policy);
+  }
+};
+
+TEST_F(CookieSettingsPolicyHandlerTest, ThirdPartyCookieBlockingNotSet) {
+  policy::PolicyMap policy;
+  UpdateProviderPolicy(policy);
+  const base::Value* value;
+  EXPECT_FALSE(store_->GetValue(prefs::kCookieControlsEnabled, &value));
+}
+
+TEST_F(CookieSettingsPolicyHandlerTest, ThirdPartyCookieBlockingEnabled) {
+  SetThirdPartyCookiePolicy(true);
+  const base::Value* value;
+  ASSERT_TRUE(store_->GetValue(prefs::kCookieControlsEnabled, &value));
+  EXPECT_FALSE(value->GetBool());
+}
+
+TEST_F(CookieSettingsPolicyHandlerTest, ThirdPartyCookieBlockingDisabled) {
+  SetThirdPartyCookiePolicy(false);
+  const base::Value* value;
+  ASSERT_TRUE(store_->GetValue(prefs::kCookieControlsEnabled, &value));
+  EXPECT_FALSE(value->GetBool());
+}
+
+}  // namespace content_settings
diff --git a/components/google/core/browser/google_url_tracker.cc b/components/google/core/browser/google_url_tracker.cc
index 99f87416..f7fb266 100644
--- a/components/google/core/browser/google_url_tracker.cc
+++ b/components/google/core/browser/google_url_tracker.cc
@@ -28,7 +28,7 @@
 const char GoogleURLTracker::kSearchDomainCheckURL[] =
     "https://www.google.com/searchdomaincheck?format=domain&type=chrome";
 const base::Feature GoogleURLTracker::kNoSearchDomainCheck{
-    "NoSearchDomainCheck", base::FEATURE_DISABLED_BY_DEFAULT};
+    "NoSearchDomainCheck", base::FEATURE_ENABLED_BY_DEFAULT};
 
 GoogleURLTracker::GoogleURLTracker(
     std::unique_ptr<GoogleURLTrackerClient> client,
diff --git a/components/invalidation/impl/profile_identity_provider.cc b/components/invalidation/impl/profile_identity_provider.cc
index d208585..487e2805 100644
--- a/components/invalidation/impl/profile_identity_provider.cc
+++ b/components/invalidation/impl/profile_identity_provider.cc
@@ -5,7 +5,6 @@
 #include "components/invalidation/impl/profile_identity_provider.h"
 
 #include "base/bind.h"
-#include "components/invalidation/public/active_account_access_token_fetcher_impl.h"
 
 namespace invalidation {
 
diff --git a/components/invalidation/public/BUILD.gn b/components/invalidation/public/BUILD.gn
index 3d55989..aa76520 100644
--- a/components/invalidation/public/BUILD.gn
+++ b/components/invalidation/public/BUILD.gn
@@ -8,8 +8,6 @@
     "ack_handle.h",
     "ack_handler.cc",
     "ack_handler.h",
-    "active_account_access_token_fetcher_impl.cc",
-    "active_account_access_token_fetcher_impl.h",
     "identity_provider.cc",
     "identity_provider.h",
     "invalidation.cc",
diff --git a/components/invalidation/public/active_account_access_token_fetcher_impl.cc b/components/invalidation/public/active_account_access_token_fetcher_impl.cc
deleted file mode 100644
index f6b6d30..0000000
--- a/components/invalidation/public/active_account_access_token_fetcher_impl.cc
+++ /dev/null
@@ -1,47 +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 "components/invalidation/public/active_account_access_token_fetcher_impl.h"
-
-namespace invalidation {
-
-ActiveAccountAccessTokenFetcherImpl::ActiveAccountAccessTokenFetcherImpl(
-    const std::string& active_account_id,
-    const std::string& oauth_consumer_name,
-    OAuth2TokenService* token_service,
-    const OAuth2TokenService::ScopeSet& scopes,
-    ActiveAccountAccessTokenCallback callback)
-    : OAuth2TokenService::Consumer(oauth_consumer_name),
-      callback_(std::move(callback)) {
-  access_token_request_ =
-      token_service->StartRequest(active_account_id, scopes, this);
-}
-
-ActiveAccountAccessTokenFetcherImpl::~ActiveAccountAccessTokenFetcherImpl() {}
-
-void ActiveAccountAccessTokenFetcherImpl::OnGetTokenSuccess(
-    const OAuth2TokenService::Request* request,
-    const OAuth2AccessTokenConsumer::TokenResponse& token_response) {
-  HandleTokenRequestCompletion(request, GoogleServiceAuthError::AuthErrorNone(),
-                               token_response.access_token);
-}
-
-void ActiveAccountAccessTokenFetcherImpl::OnGetTokenFailure(
-    const OAuth2TokenService::Request* request,
-    const GoogleServiceAuthError& error) {
-  HandleTokenRequestCompletion(request, error, std::string());
-}
-
-void ActiveAccountAccessTokenFetcherImpl::HandleTokenRequestCompletion(
-    const OAuth2TokenService::Request* request,
-    const GoogleServiceAuthError& error,
-    const std::string& access_token) {
-  DCHECK_EQ(request, access_token_request_.get());
-  std::unique_ptr<OAuth2TokenService::Request> request_deleter(
-      std::move(access_token_request_));
-
-  std::move(callback_).Run(error, access_token);
-}
-
-}  // namespace invalidation
diff --git a/components/invalidation/public/active_account_access_token_fetcher_impl.h b/components/invalidation/public/active_account_access_token_fetcher_impl.h
deleted file mode 100644
index 7d6f16f..0000000
--- a/components/invalidation/public/active_account_access_token_fetcher_impl.h
+++ /dev/null
@@ -1,55 +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 COMPONENTS_INVALIDATION_PUBLIC_ACTIVE_ACCOUNT_ACCESS_TOKEN_FETCHER_IMPL_H_
-#define COMPONENTS_INVALIDATION_PUBLIC_ACTIVE_ACCOUNT_ACCESS_TOKEN_FETCHER_IMPL_H_
-
-#include <string>
-
-#include "base/macros.h"
-#include "base/time/time.h"
-#include "components/invalidation/public/identity_provider.h"
-#include "google_apis/gaia/oauth2_token_service.h"
-
-namespace invalidation {
-
-// An implementation of ActiveAccountAccessTokenFetcher that is backed by
-// OAuth2TokenService.
-// TODO(809452): Once ProfileIdentityProvider is converted to talk to
-// IdentityManager, this helper class should either be hidden inside
-// DeviceIdentityProvider or moved to live next to it.
-class ActiveAccountAccessTokenFetcherImpl
-    : public ActiveAccountAccessTokenFetcher,
-      OAuth2TokenService::Consumer {
- public:
-  ActiveAccountAccessTokenFetcherImpl(
-      const std::string& active_account_id,
-      const std::string& oauth_consumer_name,
-      OAuth2TokenService* token_service,
-      const OAuth2TokenService::ScopeSet& scopes,
-      ActiveAccountAccessTokenCallback callback);
-  ~ActiveAccountAccessTokenFetcherImpl() override;
-
- private:
-  // OAuth2TokenService::Consumer implementation.
-  void OnGetTokenSuccess(
-      const OAuth2TokenService::Request* request,
-      const OAuth2AccessTokenConsumer::TokenResponse& token_response) override;
-  void OnGetTokenFailure(const OAuth2TokenService::Request* request,
-                         const GoogleServiceAuthError& error) override;
-
-  // Invokes |callback_| with (|access_token|, |error|).
-  void HandleTokenRequestCompletion(const OAuth2TokenService::Request* request,
-                                    const GoogleServiceAuthError& error,
-                                    const std::string& access_token);
-
-  ActiveAccountAccessTokenCallback callback_;
-  std::unique_ptr<OAuth2TokenService::Request> access_token_request_;
-
-  DISALLOW_COPY_AND_ASSIGN(ActiveAccountAccessTokenFetcherImpl);
-};
-
-}  // namespace invalidation
-
-#endif  // COMPONENTS_INVALIDATION_PUBLIC_ACTIVE_ACCOUNT_ACCESS_TOKEN_FETCHER_IMPL_H_
diff --git a/components/password_manager/content/browser/content_password_manager_driver.cc b/components/password_manager/content/browser/content_password_manager_driver.cc
index a3e3beb..91e08e5e 100644
--- a/components/password_manager/content/browser/content_password_manager_driver.cc
+++ b/components/password_manager/content/browser/content_password_manager_driver.cc
@@ -113,8 +113,7 @@
 }
 
 void ContentPasswordManagerDriver::AutofillDataReceived(
-    const std::map<autofill::FormData,
-                   autofill::PasswordFormFieldPredictionMap>& predictions) {
+    const autofill::FormsPredictionsMap& predictions) {
   GetPasswordAutofillAgent()->AutofillUsernameAndPasswordDataReceived(
       predictions);
 }
diff --git a/components/password_manager/content/browser/content_password_manager_driver.h b/components/password_manager/content/browser/content_password_manager_driver.h
index 832cc5a..43acb7a7 100644
--- a/components/password_manager/content/browser/content_password_manager_driver.h
+++ b/components/password_manager/content/browser/content_password_manager_driver.h
@@ -57,9 +57,7 @@
   void FormEligibleForGenerationFound(
       const autofill::PasswordFormGenerationData& form) override;
   void AutofillDataReceived(
-      const std::map<autofill::FormData,
-                     autofill::PasswordFormFieldPredictionMap>& predictions)
-      override;
+      const autofill::FormsPredictionsMap& predictions) override;
   void GeneratedPasswordAccepted(const base::string16& password) override;
   void FillSuggestion(const base::string16& username,
                       const base::string16& password) override;
diff --git a/components/password_manager/core/browser/password_manager.cc b/components/password_manager/core/browser/password_manager.cc
index c216045..061faa7 100644
--- a/components/password_manager/core/browser/password_manager.cc
+++ b/components/password_manager/core/browser/password_manager.cc
@@ -46,6 +46,7 @@
 
 using autofill::FormData;
 using autofill::PasswordForm;
+using autofill::mojom::PasswordFormFieldPredictionType;
 #if defined(SYNC_PASSWORD_REUSE_DETECTION_ENABLED)
 using password_manager::metrics_util::SyncPasswordHashChange;
 #endif  // SYNC_PASSWORD_REUSE_DETECTION_ENABLED
@@ -123,20 +124,20 @@
 bool ServerPredictionsToPasswordFormPrediction(
     std::vector<autofill::AutofillQueryResponseContents::Field::FieldPrediction>
         server_field_predictions,
-    autofill::PasswordFormFieldPredictionType* type) {
+    PasswordFormFieldPredictionType* type) {
   for (auto const& server_field_prediction : server_field_predictions) {
     switch (server_field_prediction.type()) {
       case autofill::USERNAME:
       case autofill::USERNAME_AND_EMAIL_ADDRESS:
-        *type = autofill::PREDICTION_USERNAME;
+        *type = PasswordFormFieldPredictionType::kUsername;
         return true;
 
       case autofill::PASSWORD:
-        *type = autofill::PREDICTION_CURRENT_PASSWORD;
+        *type = PasswordFormFieldPredictionType::kCurrentPassword;
         return true;
 
       case autofill::ACCOUNT_CREATION_PASSWORD:
-        *type = autofill::PREDICTION_NEW_PASSWORD;
+        *type = PasswordFormFieldPredictionType::kNewPassword;
         return true;
 
       default:
@@ -1288,12 +1289,12 @@
   }
 
   // Leave only forms that contain fields that are useful for password manager.
-  std::map<FormData, autofill::PasswordFormFieldPredictionMap> predictions;
+  autofill::FormsPredictionsMap predictions;
   for (const autofill::FormStructure* form : forms) {
     if (logger)
       logger->LogFormStructure(Logger::STRING_SERVER_PREDICTIONS, *form);
     for (const auto& field : *form) {
-      autofill::PasswordFormFieldPredictionType prediction_type;
+      PasswordFormFieldPredictionType prediction_type;
       if (ServerPredictionsToPasswordFormPrediction(field->server_predictions(),
                                                     &prediction_type)) {
         predictions[form->ToFormData()][*field] = prediction_type;
@@ -1304,7 +1305,7 @@
           IsPredictedTypeNotPasswordPrediction(
               field->Type().GetStorableType())) {
         predictions[form->ToFormData()][*field] =
-            autofill::PREDICTION_NOT_PASSWORD;
+            PasswordFormFieldPredictionType::kNotPassword;
       }
     }
   }
diff --git a/components/password_manager/core/browser/password_manager_driver.h b/components/password_manager/core/browser/password_manager_driver.h
index 1b0f6a1..41f572a 100644
--- a/components/password_manager/core/browser/password_manager_driver.h
+++ b/components/password_manager/core/browser/password_manager_driver.h
@@ -17,7 +17,6 @@
 
 namespace autofill {
 class AutofillDriver;
-struct FormData;
 struct PasswordFormGenerationData;
 struct PasswordFormFillData;
 }  // namespace autofill
@@ -53,8 +52,7 @@
   // Notifies the driver that username and password predictions from autofill
   // have been received.
   virtual void AutofillDataReceived(
-      const std::map<autofill::FormData,
-                     autofill::PasswordFormFieldPredictionMap>& predictions) {}
+      const autofill::FormsPredictionsMap& predictions) {}
 
   // Notifies the driver that the user has accepted a generated password.
   virtual void GeneratedPasswordAccepted(const base::string16& password) = 0;
diff --git a/components/password_manager/core/browser/password_manager_unittest.cc b/components/password_manager/core/browser/password_manager_unittest.cc
index e332142..01d57a9 100644
--- a/components/password_manager/core/browser/password_manager_unittest.cc
+++ b/components/password_manager/core/browser/password_manager_unittest.cc
@@ -46,6 +46,7 @@
 using autofill::FormFieldData;
 using autofill::PasswordForm;
 using autofill::PasswordFormFillData;
+using autofill::mojom::PasswordFormFieldPredictionType;
 using base::ASCIIToUTF16;
 using base::Feature;
 using base::TestMockTimeTaskRunner;
@@ -154,8 +155,7 @@
  public:
   MOCK_METHOD1(FillPasswordForm, void(const autofill::PasswordFormFillData&));
   MOCK_METHOD1(AutofillDataReceived,
-               void(const std::map<autofill::FormData,
-                                   autofill::PasswordFormFieldPredictionMap>&));
+               void(const autofill::FormsPredictionsMap&));
   MOCK_METHOD0(GetPasswordManager, PasswordManager*());
   MOCK_METHOD0(GetPasswordAutofillManager, PasswordAutofillManager*());
 };
@@ -2746,10 +2746,11 @@
 
   // Check that Autofill predictions are converted to password related
   // predictions.
-  std::map<autofill::FormData, autofill::PasswordFormFieldPredictionMap>
-      predictions;
-  predictions[form][form.fields[0]] = autofill::PREDICTION_USERNAME;
-  predictions[form][form.fields[1]] = autofill::PREDICTION_CURRENT_PASSWORD;
+  autofill::FormsPredictionsMap predictions;
+  predictions[form][form.fields[0]] =
+      PasswordFormFieldPredictionType::kUsername;
+  predictions[form][form.fields[1]] =
+      PasswordFormFieldPredictionType::kCurrentPassword;
   EXPECT_CALL(driver_, AutofillDataReceived(predictions));
 
   manager()->ProcessAutofillPredictions(&driver_, forms);
diff --git a/components/policy/core/common/cloud/enterprise_metrics.h b/components/policy/core/common/cloud/enterprise_metrics.h
index d9a4a8c..3cbe6e8 100644
--- a/components/policy/core/common/cloud/enterprise_metrics.h
+++ b/components/policy/core/common/cloud/enterprise_metrics.h
@@ -100,10 +100,8 @@
   kMetricEnrollmentRegisterPolicyResponseInvalid = 40,
   // OAuth token fetch failed: account not signed up.
   kMetricEnrollmentAccountNotSignedUp = 41,
-  // OAuth token fetch failed: account deleted.
-  kMetricEnrollmentAccountDeleted = 42,
-  // OAuth token fetch failed: account disabled.
-  kMetricEnrollmentAccountDisabled = 43,
+  /* kMetricEnrollmentAccountDeleted = 42 REMOVED */
+  /* kMetricEnrollmentAccountDisabled = 43 REMOVED */
   // Re-enrollment pre-check failed: domain does not match install attributes.
   kMetricEnrollmentPrecheckDomainMismatch = 44,
   // Lockbox backend failed to initialize.
diff --git a/components/policy/core/common/policy_service_impl.cc b/components/policy/core/common/policy_service_impl.cc
index 4b0472e..6359542 100644
--- a/components/policy/core/common/policy_service_impl.cc
+++ b/components/policy/core/common/policy_service_impl.cc
@@ -129,10 +129,8 @@
                                        PolicyService::Observer* observer) {
   DCHECK(thread_checker_.CalledOnValidThread());
   auto it = observers_.find(domain);
-  if (it == observers_.end()) {
-    NOTREACHED();
+  if (it == observers_.end())
     return;
-  }
   it->second->RemoveObserver(observer);
   if (!it->second->might_have_observers()) {
     observers_.erase(it);
diff --git a/components/search_provider_logos/DEPS b/components/search_provider_logos/DEPS
index c825848..c8cebd8 100644
--- a/components/search_provider_logos/DEPS
+++ b/components/search_provider_logos/DEPS
@@ -5,10 +5,21 @@
   "+components/signin/core/browser",
   # Use identity_manager.h instead of the below files;
   # see https://groups.google.com/a/chromium.org/d/msg/chromium-dev/dgFLuxqZt1o/iEqkyoQQBwAJ for help and info.
-  "!components/signin/core/browser/fake_profile_oauth2_token_service.h",
-  "-components/signin/core/browser/profile_oauth2_token_service.h",
+  "-components/signin/core/browser/account_fetcher_service.h",
+  "-components/signin/core/browser/account_info_fetcher.h",
+  "-components/signin/core/browser/account_tracker_service.h",
+  "-components/signin/core/browser/child_account_info_fetcher_android.h",
+  "-components/signin/core/browser/fake_profile_oauth2_token_service.h",
+  "-components/signin/core/browser/gaia_cookie_manager_service.h",
+  "-components/signin/core/browser/oauth2_token_service_delegate_android.h",
+  "-components/signin/core/browser/oauth2_multilogin_helper.h",
+  "-components/signin/core/browser/oauth2_multilogin_token_fetcher.h",
   "-components/signin/core/browser/primary_account_manager.h",
   "-components/signin/core/browser/primary_account_policy_manager.h",
+  "-components/signin/core/browser/profile_oauth2_token_service.h",
+  "-components/signin/core/browser/profile_oauth2_token_service_delegate_chromeos.h",
+  "-components/signin/core/browser/ubertoken_fetcher_impl.h",
+
   "+components/sync_preferences/testing_pref_service_syncable.h",
   "+net",
   "+services/identity/public/cpp",
diff --git a/components/signin/core/browser/BUILD.gn b/components/signin/core/browser/BUILD.gn
index 85a48a9..b04eea2 100644
--- a/components/signin/core/browser/BUILD.gn
+++ b/components/signin/core/browser/BUILD.gn
@@ -17,9 +17,8 @@
   ]
 }
 
-# This target contains code that will be shared between the Identity Service
-# implementation and its client library/clients. Currently, this code is used
-# both by IdentityManager and by its clients.
+# This target contains code that is used both by the IdentityManager
+# implementation and by clients of the //components/signin public code.
 static_library("shared") {
   sources = [
     "account_consistency_method.cc",
@@ -30,9 +29,13 @@
     "account_info_util.h",
     "avatar_icon_util.cc",
     "avatar_icon_util.h",
+    "device_id_helper.cc",
+    "device_id_helper.h",
     "identity_utils.cc",
     "identity_utils.h",
     "set_accounts_in_cookie_result.h",
+    "signin_client.cc",
+    "signin_client.h",
     "signin_metrics.cc",
     "signin_metrics.h",
     "signin_pref_names.cc",
@@ -53,18 +56,16 @@
   ]
   public_deps = [
     "//base",
-
-    # TODO(blundell): Analyze this dependency.
+    "//components/keyed_service/core",
     "//google_apis",
   ]
 }
 
-# This target contains what will become the core of the Identity Service
-# implementation. It currently forms the core of the IdentityManager
-# implementation (//services/identity/public/cpp/identity_manager.*). We are
-# actively converting the codebase away from using the code in this target
-# directly to using IdentityManager (tracked in https://crbug.com/796544). Do
-# not add code to this target without consulting with blundell@chromium.org.
+# This target forms the core of the IdentityManager implementation
+# (//services/identity/public/cpp/identity_manager.*). We are actively
+# converting the codebase away from using the code in this target directly to
+# using IdentityManager (tracked in https://crbug.com/796544). Do not add code
+# to this target without consulting with blundell@chromium.org.
 static_library("internals") {
   sources = [
     "account_fetcher_service.cc",
@@ -75,8 +76,6 @@
     "account_tracker_service.h",
     "child_account_info_fetcher_android.cc",
     "child_account_info_fetcher_android.h",
-    "device_id_helper.cc",
-    "device_id_helper.h",
     "gaia_cookie_manager_service.cc",
     "gaia_cookie_manager_service.h",
     "oauth2_token_service_delegate_android.cc",
@@ -92,8 +91,6 @@
     "profile_oauth2_token_service.h",
     "profile_oauth2_token_service_delegate_chromeos.cc",
     "profile_oauth2_token_service_delegate_chromeos.h",
-    "signin_client.cc",
-    "signin_client.h",
     "ubertoken_fetcher_impl.cc",
     "ubertoken_fetcher_impl.h",
   ]
@@ -134,6 +131,7 @@
   }
 }
 
+# This target contains code that is used by clients of //components/signin.
 static_library("browser") {
   sources = [
     "about_signin_internals.cc",
@@ -160,6 +158,8 @@
     "mice_account_reconcilor_delegate.h",
     "mirror_account_reconcilor_delegate.cc",
     "mirror_account_reconcilor_delegate.h",
+    "multilogin_parameters.cc",
+    "multilogin_parameters.h",
     "mutable_profile_oauth2_token_service_delegate.cc",
     "mutable_profile_oauth2_token_service_delegate.h",
     "signin_error_controller.cc",
diff --git a/components/signin/core/browser/account_reconcilor_delegate.h b/components/signin/core/browser/account_reconcilor_delegate.h
index e75cfe0..7e193ba7 100644
--- a/components/signin/core/browser/account_reconcilor_delegate.h
+++ b/components/signin/core/browser/account_reconcilor_delegate.h
@@ -9,7 +9,7 @@
 #include <vector>
 
 #include "base/time/time.h"
-#include "components/signin/core/browser/gaia_cookie_manager_service.h"
+#include "components/signin/core/browser/multilogin_parameters.h"
 #include "google_apis/gaia/gaia_auth_fetcher.h"
 #include "google_apis/gaia/gaia_auth_util.h"
 #include "google_apis/gaia/google_service_auth_error.h"
diff --git a/components/signin/core/browser/gaia_cookie_manager_service.cc b/components/signin/core/browser/gaia_cookie_manager_service.cc
index 3ea3e0a..6ef1fca0 100644
--- a/components/signin/core/browser/gaia_cookie_manager_service.cc
+++ b/components/signin/core/browser/gaia_cookie_manager_service.cc
@@ -43,27 +43,6 @@
 #include "chromeos/constants/chromeos_switches.h"
 #endif
 
-namespace signin {
-MultiloginParameters::MultiloginParameters(
-    const gaia::MultiloginMode mode,
-    const std::vector<std::string>& accounts_to_send)
-    : mode(mode), accounts_to_send(accounts_to_send) {}
-
-MultiloginParameters::~MultiloginParameters() {}
-
-MultiloginParameters::MultiloginParameters(const MultiloginParameters& other) {
-  mode = other.mode;
-  accounts_to_send = other.accounts_to_send;
-}
-
-MultiloginParameters& MultiloginParameters::operator=(
-    const MultiloginParameters& other) {
-  mode = other.mode;
-  accounts_to_send = other.accounts_to_send;
-  return *this;
-}
-}  // namespace signin
-
 namespace {
 
 // The maximum number of retries for a fetcher used in this class.
diff --git a/components/signin/core/browser/gaia_cookie_manager_service.h b/components/signin/core/browser/gaia_cookie_manager_service.h
index cbeeb58..83992005 100644
--- a/components/signin/core/browser/gaia_cookie_manager_service.h
+++ b/components/signin/core/browser/gaia_cookie_manager_service.h
@@ -42,21 +42,6 @@
 class UbertokenFetcherImpl;
 enum class SetAccountsInCookieResult;
 
-struct MultiloginParameters {
-  MultiloginParameters(gaia::MultiloginMode mode,
-                       const std::vector<std::string>& accounts_to_send);
-  MultiloginParameters(const MultiloginParameters& other);
-  MultiloginParameters& operator=(const MultiloginParameters& other);
-  ~MultiloginParameters();
-
-  // Needed for testing.
-  bool operator==(const MultiloginParameters& other) const {
-    return mode == other.mode && accounts_to_send == other.accounts_to_send;
-  }
-
-  gaia::MultiloginMode mode;
-  std::vector<std::string> accounts_to_send;
-};
 }  // namespace signin
 
 // Merges a Google account known to Chrome into the cookie jar.  When merging
diff --git a/components/signin/core/browser/multilogin_parameters.cc b/components/signin/core/browser/multilogin_parameters.cc
new file mode 100644
index 0000000..9296cd6
--- /dev/null
+++ b/components/signin/core/browser/multilogin_parameters.cc
@@ -0,0 +1,28 @@
+// Copyright 2019 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "components/signin/core/browser/multilogin_parameters.h"
+
+namespace signin {
+
+MultiloginParameters::MultiloginParameters(
+    const gaia::MultiloginMode mode,
+    const std::vector<std::string>& accounts_to_send)
+    : mode(mode), accounts_to_send(accounts_to_send) {}
+
+MultiloginParameters::~MultiloginParameters() {}
+
+MultiloginParameters::MultiloginParameters(const MultiloginParameters& other) {
+  mode = other.mode;
+  accounts_to_send = other.accounts_to_send;
+}
+
+MultiloginParameters& MultiloginParameters::operator=(
+    const MultiloginParameters& other) {
+  mode = other.mode;
+  accounts_to_send = other.accounts_to_send;
+  return *this;
+}
+
+}  // namespace signin
diff --git a/components/signin/core/browser/multilogin_parameters.h b/components/signin/core/browser/multilogin_parameters.h
new file mode 100644
index 0000000..ce590c66
--- /dev/null
+++ b/components/signin/core/browser/multilogin_parameters.h
@@ -0,0 +1,32 @@
+// Copyright 2019 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_SIGNIN_CORE_BROWSER_MULTILOGIN_PARAMETERS_H_
+#define COMPONENTS_SIGNIN_CORE_BROWSER_MULTILOGIN_PARAMETERS_H_
+
+#include <string>
+#include <vector>
+
+#include "google_apis/gaia/gaia_auth_fetcher.h"
+
+namespace signin {
+
+struct MultiloginParameters {
+  MultiloginParameters(gaia::MultiloginMode mode,
+                       const std::vector<std::string>& accounts_to_send);
+  MultiloginParameters(const MultiloginParameters& other);
+  MultiloginParameters& operator=(const MultiloginParameters& other);
+  ~MultiloginParameters();
+
+  // Needed for testing.
+  bool operator==(const MultiloginParameters& other) const {
+    return mode == other.mode && accounts_to_send == other.accounts_to_send;
+  }
+
+  gaia::MultiloginMode mode;
+  std::vector<std::string> accounts_to_send;
+};
+}  // namespace signin
+
+#endif  // COMPONENTS_SIGNIN_CORE_BROWSER_MULTILOGIN_PARAMETERS_H_
diff --git a/components/signin/core/browser/mutable_profile_oauth2_token_service_delegate_unittest.cc b/components/signin/core/browser/mutable_profile_oauth2_token_service_delegate_unittest.cc
index e509eb7..41e7d6c8 100644
--- a/components/signin/core/browser/mutable_profile_oauth2_token_service_delegate_unittest.cc
+++ b/components/signin/core/browser/mutable_profile_oauth2_token_service_delegate_unittest.cc
@@ -1001,7 +1001,8 @@
   EXPECT_EQ(GoogleServiceAuthError::AuthErrorNone(),
             oauth2_service_delegate_->GetAuthError(email));
 
-  GoogleServiceAuthError authfail(GoogleServiceAuthError::ACCOUNT_DELETED);
+  GoogleServiceAuthError authfail(
+      GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS);
   oauth2_service_delegate_->UpdateAuthError(email, authfail);
   EXPECT_NE(GoogleServiceAuthError::AuthErrorNone(),
             oauth2_service_delegate_->GetAuthError(email));
diff --git a/components/signin/core/browser/oauth2_token_service_delegate_android.h b/components/signin/core/browser/oauth2_token_service_delegate_android.h
index 6c78576..ddc92339 100644
--- a/components/signin/core/browser/oauth2_token_service_delegate_android.h
+++ b/components/signin/core/browser/oauth2_token_service_delegate_android.h
@@ -26,8 +26,7 @@
 //
 // See |OAuth2TokenServiceDelegate| for usage details.
 //
-// Note: requests should be started from the UI thread. To start a
-// request from other thread, please use OAuth2TokenServiceRequest.
+// Note: requests should be started from the UI thread.
 class OAuth2TokenServiceDelegateAndroid : public OAuth2TokenServiceDelegate {
  public:
   OAuth2TokenServiceDelegateAndroid(
diff --git a/components/signin/core/browser/profile_oauth2_token_service.h b/components/signin/core/browser/profile_oauth2_token_service.h
index cf13c44..03886da 100644
--- a/components/signin/core/browser/profile_oauth2_token_service.h
+++ b/components/signin/core/browser/profile_oauth2_token_service.h
@@ -37,8 +37,7 @@
 // Consumer::OnGetTokenSuccess will be invoked, but the access token
 // won't be cached.
 //
-// Note: requests should be started from the UI thread. To start a
-// request from other thread, please use OAuth2TokenServiceRequest.
+// Note: requests should be started from the UI thread.
 class ProfileOAuth2TokenService : public OAuth2TokenService {
  public:
   typedef base::RepeatingCallback<void(const CoreAccountId& /* account_id */,
diff --git a/components/signin/core/browser/signin_error_controller_unittest.cc b/components/signin/core/browser/signin_error_controller_unittest.cc
index f2bb7a4..68a1b00 100644
--- a/components/signin/core/browser/signin_error_controller_unittest.cc
+++ b/components/signin/core/browser/signin_error_controller_unittest.cc
@@ -65,7 +65,7 @@
   ::testing::Mock::VerifyAndClearExpectations(&observer);
 
   GoogleServiceAuthError error2 =
-      GoogleServiceAuthError(GoogleServiceAuthError::ACCOUNT_DISABLED);
+      GoogleServiceAuthError(GoogleServiceAuthError::USER_NOT_SIGNED_UP);
   EXPECT_CALL(observer, OnErrorChanged()).Times(1);
   identity_test_env.UpdatePersistentErrorOfRefreshTokenForAccount(
       test_account_id, error2);
@@ -193,8 +193,6 @@
       GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS,
       GoogleServiceAuthError::USER_NOT_SIGNED_UP,
       GoogleServiceAuthError::CONNECTION_FAILED,
-      GoogleServiceAuthError::ACCOUNT_DELETED,
-      GoogleServiceAuthError::ACCOUNT_DISABLED,
       GoogleServiceAuthError::SERVICE_UNAVAILABLE,
       GoogleServiceAuthError::REQUEST_CANCELED,
       GoogleServiceAuthError::UNEXPECTED_SERVICE_RESPONSE,
diff --git a/components/sync/driver/DEPS b/components/sync/driver/DEPS
index 73f02757..8c58bd2 100644
--- a/components/sync/driver/DEPS
+++ b/components/sync/driver/DEPS
@@ -8,10 +8,21 @@
   "+components/signin/core/browser",
   # Use identity_manager.h instead of the below files;
   # see https://groups.google.com/a/chromium.org/d/msg/chromium-dev/dgFLuxqZt1o/iEqkyoQQBwAJ for help and info.
+  "-components/signin/core/browser/account_fetcher_service.h",
+  "-components/signin/core/browser/account_info_fetcher.h",
+  "-components/signin/core/browser/account_tracker_service.h",
+  "-components/signin/core/browser/child_account_info_fetcher_android.h",
   "-components/signin/core/browser/fake_profile_oauth2_token_service.h",
-  "-components/signin/core/browser/profile_oauth2_token_service.h",
+  "-components/signin/core/browser/gaia_cookie_manager_service.h",
+  "-components/signin/core/browser/oauth2_token_service_delegate_android.h",
+  "-components/signin/core/browser/oauth2_multilogin_helper.h",
+  "-components/signin/core/browser/oauth2_multilogin_token_fetcher.h",
   "-components/signin/core/browser/primary_account_manager.h",
   "-components/signin/core/browser/primary_account_policy_manager.h",
+  "-components/signin/core/browser/profile_oauth2_token_service.h",
+  "-components/signin/core/browser/profile_oauth2_token_service_delegate_chromeos.h",
+  "-components/signin/core/browser/ubertoken_fetcher_impl.h",
+
   "+components/sync/base",
   "+components/sync/engine",
   "+components/sync/engine_impl",
diff --git a/content/browser/background_sync/background_sync_context_impl.cc b/content/browser/background_sync/background_sync_context_impl.cc
index 33b8b07..d974e48 100644
--- a/content/browser/background_sync/background_sync_context_impl.cc
+++ b/content/browser/background_sync/background_sync_context_impl.cc
@@ -40,10 +40,12 @@
 #if defined(OS_ANDROID)
 void BackgroundSyncContext::FireBackgroundSyncEventsAcrossPartitions(
     BrowserContext* browser_context,
+    blink::mojom::BackgroundSyncType sync_type,
     const base::android::JavaParamRef<jobject>& j_runnable) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
   DCHECK(browser_context);
-  BackgroundSyncLauncher::FireBackgroundSyncEvents(browser_context, j_runnable);
+  BackgroundSyncLauncher::FireBackgroundSyncEvents(browser_context, sync_type,
+                                                   j_runnable);
 }
 #endif
 
@@ -170,16 +172,18 @@
 }
 
 void BackgroundSyncContextImpl::FireBackgroundSyncEvents(
+    blink::mojom::BackgroundSyncType sync_type,
     base::OnceClosure done_closure) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
   base::PostTaskWithTraits(
       FROM_HERE, {BrowserThread::IO},
       base::BindOnce(
           &BackgroundSyncContextImpl::FireBackgroundSyncEventsOnIOThread, this,
-          std::move(done_closure)));
+          sync_type, std::move(done_closure)));
 }
 
 void BackgroundSyncContextImpl::FireBackgroundSyncEventsOnIOThread(
+    blink::mojom::BackgroundSyncType sync_type,
     base::OnceClosure done_closure) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
 
@@ -188,9 +192,11 @@
     return;
   }
 
-  background_sync_manager_->FireReadyEvents(base::BindOnce(
-      &BackgroundSyncContextImpl::DidFireBackgroundSyncEventsOnIOThread, this,
-      std::move(done_closure)));
+  background_sync_manager_->FireReadyEvents(
+      sync_type,
+      base::BindOnce(
+          &BackgroundSyncContextImpl::DidFireBackgroundSyncEventsOnIOThread,
+          this, std::move(done_closure)));
 }
 
 void BackgroundSyncContextImpl::DidFireBackgroundSyncEventsOnIOThread(
diff --git a/content/browser/background_sync/background_sync_context_impl.h b/content/browser/background_sync/background_sync_context_impl.h
index b256e5a..a242fa35 100644
--- a/content/browser/background_sync/background_sync_context_impl.h
+++ b/content/browser/background_sync/background_sync_context_impl.h
@@ -68,7 +68,8 @@
   BackgroundSyncManager* background_sync_manager() const;
 
   // BackgroundSyncContext implementation.
-  void FireBackgroundSyncEvents(base::OnceClosure done_closure) override;
+  void FireBackgroundSyncEvents(blink::mojom::BackgroundSyncType sync_type,
+                                base::OnceClosure done_closure) override;
   void GetSoonestWakeupDelta(
       base::OnceCallback<void(base::TimeDelta)> callback) override;
 
@@ -86,7 +87,9 @@
   friend class PeriodicBackgroundSyncServiceImplTest;
   friend class BackgroundSyncLauncherTest;
 
-  void FireBackgroundSyncEventsOnIOThread(base::OnceClosure done_closure);
+  void FireBackgroundSyncEventsOnIOThread(
+      blink::mojom::BackgroundSyncType sync_type,
+      base::OnceClosure done_closure);
   void DidFireBackgroundSyncEventsOnIOThread(base::OnceClosure done_closure);
   virtual void CreateBackgroundSyncManager(
       scoped_refptr<ServiceWorkerContextWrapper> service_worker_context,
diff --git a/content/browser/background_sync/background_sync_launcher.cc b/content/browser/background_sync/background_sync_launcher.cc
index a6dd4b9..44074bb 100644
--- a/content/browser/background_sync/background_sync_launcher.cc
+++ b/content/browser/background_sync/background_sync_launcher.cc
@@ -70,6 +70,7 @@
 #if defined(OS_ANDROID)
 void BackgroundSyncLauncher::FireBackgroundSyncEvents(
     BrowserContext* browser_context,
+    blink::mojom::BackgroundSyncType sync_type,
     const base::android::JavaParamRef<jobject>& j_runnable) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
   DCHECK(browser_context);
@@ -80,16 +81,17 @@
                      base::android::ScopedJavaGlobalRef<jobject>(j_runnable)));
 
   BrowserContext::ForEachStoragePartition(
-      browser_context,
-      base::BindRepeating(
-          [](base::OnceClosure done_closure,
-             StoragePartition* storage_partition) {
-            BackgroundSyncContext* sync_context =
-                storage_partition->GetBackgroundSyncContext();
-            DCHECK(sync_context);
-            sync_context->FireBackgroundSyncEvents(std::move(done_closure));
-          },
-          std::move(done_closure)));
+      browser_context, base::BindRepeating(
+                           [](blink::mojom::BackgroundSyncType sync_type,
+                              base::OnceClosure done_closure,
+                              StoragePartition* storage_partition) {
+                             BackgroundSyncContext* sync_context =
+                                 storage_partition->GetBackgroundSyncContext();
+                             DCHECK(sync_context);
+                             sync_context->FireBackgroundSyncEvents(
+                                 sync_type, std::move(done_closure));
+                           },
+                           sync_type, std::move(done_closure)));
 }
 #endif
 
diff --git a/content/browser/background_sync/background_sync_launcher.h b/content/browser/background_sync/background_sync_launcher.h
index 97d1a86..6bdb47a 100644
--- a/content/browser/background_sync/background_sync_launcher.h
+++ b/content/browser/background_sync/background_sync_launcher.h
@@ -16,6 +16,8 @@
 #include "base/android/scoped_java_ref.h"
 #endif
 
+#include "third_party/blink/public/mojom/background_sync/background_sync.mojom.h"
+
 namespace content {
 
 class BrowserContext;
@@ -30,6 +32,7 @@
 #if defined(OS_ANDROID)
   static void FireBackgroundSyncEvents(
       BrowserContext* browser_context,
+      blink::mojom::BackgroundSyncType sync_type,
       const base::android::JavaParamRef<jobject>& j_runnable);
 #endif
 
diff --git a/content/browser/background_sync/background_sync_launcher_unittest.cc b/content/browser/background_sync/background_sync_launcher_unittest.cc
index 41bbe37..2d11ed1 100644
--- a/content/browser/background_sync/background_sync_launcher_unittest.cc
+++ b/content/browser/background_sync/background_sync_launcher_unittest.cc
@@ -116,7 +116,9 @@
                StoragePartition* storage_partition) {
               BackgroundSyncContext* sync_context =
                   storage_partition->GetBackgroundSyncContext();
-              sync_context->FireBackgroundSyncEvents(std::move(done_closure));
+              sync_context->FireBackgroundSyncEvents(
+                  blink::mojom::BackgroundSyncType::ONE_SHOT,
+                  std::move(done_closure));
             },
             std::move(done_closure)));
 
diff --git a/content/browser/background_sync/background_sync_manager.cc b/content/browser/background_sync/background_sync_manager.cc
index 9c697555..a093620 100644
--- a/content/browser/background_sync/background_sync_manager.cc
+++ b/content/browser/background_sync/background_sync_manager.cc
@@ -492,7 +492,7 @@
   if (emulated_offline_sw_[service_worker_id] > 0)
     return;
   emulated_offline_sw_.erase(service_worker_id);
-  FireReadyEvents(MakeEmptyCompletion());
+  FireReadyEvents(BackgroundSyncType::ONE_SHOT, MakeEmptyCompletion());
 }
 
 BackgroundSyncManager::BackgroundSyncManager(
@@ -626,7 +626,8 @@
     }
   }
 
-  FireReadyEvents(MakeEmptyCompletion());
+  FireReadyEvents(BackgroundSyncType::ONE_SHOT, MakeEmptyCompletion());
+  FireReadyEvents(BackgroundSyncType::PERIODIC, MakeEmptyCompletion());
   base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, std::move(callback));
 }
 
@@ -1046,7 +1047,8 @@
     std::unique_ptr<BackgroundSyncEventKeepAlive> keepalive) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
 
-  FireReadyEvents(MakeEmptyCompletion(), std::move(keepalive));
+  FireReadyEvents(BackgroundSyncType::ONE_SHOT, MakeEmptyCompletion(),
+                  std::move(keepalive));
   op_scheduler_.CompleteOperationAndRunNext();
 }
 
@@ -1296,19 +1298,20 @@
   return soonest_wakeup_delta;
 }
 
+// TODO(crbug.com/925297): Update to also schedule a wakeup task for Periodic
+// Background Sync.
 void BackgroundSyncManager::RunInBackgroundIfNecessary() {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
 
   base::TimeDelta soonest_wakeup_delta =
-      std::min(GetSoonestWakeupDelta(BackgroundSyncType::ONE_SHOT),
-               GetSoonestWakeupDelta(BackgroundSyncType::PERIODIC));
+      GetSoonestWakeupDelta(BackgroundSyncType::ONE_SHOT);
 
   // Try firing again after the wakeup delta.
   if (!soonest_wakeup_delta.is_max() && !soonest_wakeup_delta.is_zero()) {
-    delayed_sync_task_.Reset(
-        base::BindOnce(&BackgroundSyncManager::FireReadyEvents,
-                       weak_ptr_factory_.GetWeakPtr(), MakeEmptyCompletion(),
-                       /* keepalive= */ nullptr));
+    delayed_sync_task_.Reset(base::BindOnce(
+        &BackgroundSyncManager::FireReadyEvents, weak_ptr_factory_.GetWeakPtr(),
+        BackgroundSyncType::ONE_SHOT, MakeEmptyCompletion(),
+        /* keepalive= */ nullptr));
     ScheduleDelayedTask(delayed_sync_task_.callback(), soonest_wakeup_delta);
   }
 
@@ -1320,6 +1323,7 @@
 }
 
 void BackgroundSyncManager::FireReadyEvents(
+    blink::mojom::BackgroundSyncType sync_type,
     base::OnceClosure callback,
     std::unique_ptr<BackgroundSyncEventKeepAlive> keepalive) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
@@ -1330,11 +1334,12 @@
   op_scheduler_.ScheduleOperation(
       CacheStorageSchedulerOp::kBackgroundSync,
       base::BindOnce(&BackgroundSyncManager::FireReadyEventsImpl,
-                     weak_ptr_factory_.GetWeakPtr(), std::move(callback),
-                     std::move(keepalive)));
+                     weak_ptr_factory_.GetWeakPtr(), sync_type,
+                     std::move(callback), std::move(keepalive)));
 }
 
 void BackgroundSyncManager::FireReadyEventsImpl(
+    blink::mojom::BackgroundSyncType sync_type,
     base::OnceClosure callback,
     std::unique_ptr<BackgroundSyncEventKeepAlive> keepalive) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
@@ -1356,6 +1361,8 @@
     for (auto& key_and_registration :
          sw_reg_id_and_registrations.second.registration_map) {
       BackgroundSyncRegistration* registration = &key_and_registration.second;
+      if (sync_type != registration->sync_type())
+        continue;
 
       if (IsRegistrationReadyToFire(*registration,
                                     service_worker_registration_id)) {
@@ -1688,7 +1695,10 @@
   }
 
   // Fire any ready events and call RunInBackground if anything is waiting.
-  FireReadyEvents(MakeEmptyCompletion());
+  // We don't need to do this for periodic Background Sync registrations, since
+  // once all events have been dispatched, we'll schedule a delayed task to
+  // (wake up Chrome and) fire the next set of periodicsync events.
+  FireReadyEvents(BackgroundSyncType::ONE_SHOT, MakeEmptyCompletion());
 
   base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, std::move(callback));
 }
@@ -1724,7 +1734,8 @@
 void BackgroundSyncManager::OnNetworkChanged() {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
 
-  FireReadyEvents(MakeEmptyCompletion());
+  FireReadyEvents(BackgroundSyncType::ONE_SHOT, MakeEmptyCompletion());
+  FireReadyEvents(BackgroundSyncType::PERIODIC, MakeEmptyCompletion());
 }
 
 void BackgroundSyncManager::SetMaxSyncAttemptsImpl(int max_attempts,
diff --git a/content/browser/background_sync/background_sync_manager.h b/content/browser/background_sync/background_sync_manager.h
index 376f41d..edc3ecd 100644
--- a/content/browser/background_sync/background_sync_manager.h
+++ b/content/browser/background_sync/background_sync_manager.h
@@ -136,10 +136,11 @@
   // Called from DevTools to toggle service worker "offline" status
   void EmulateServiceWorkerOffline(int64_t service_worker_id, bool is_offline);
 
-  // Scans the list of available events and fires those that are
-  // ready to fire. For those that can't yet be fired, wakeup alarms are set.
-  // Once all of this is done, invokes |callback|.
+  // Scans the list of available events and fires those of type |sync_type| that
+  // are ready to fire. For those that can't yet be fired, wakeup alarms are
+  // set. Once all of this is done, invokes |callback|.
   void FireReadyEvents(
+      blink::mojom::BackgroundSyncType sync_type,
       base::OnceClosure callback,
       std::unique_ptr<BackgroundSyncEventKeepAlive> keepalive = nullptr);
 
@@ -302,6 +303,7 @@
   void RunInBackgroundIfNecessary();
 
   void FireReadyEventsImpl(
+      blink::mojom::BackgroundSyncType sync_type,
       base::OnceClosure callback,
       std::unique_ptr<BackgroundSyncEventKeepAlive> keepalive);
   void FireReadyEventsDidFindRegistration(
diff --git a/content/browser/renderer_host/dwrite_font_lookup_table_builder_win.cc b/content/browser/renderer_host/dwrite_font_lookup_table_builder_win.cc
index 7b48e6da..8bfb6b9 100644
--- a/content/browser/renderer_host/dwrite_font_lookup_table_builder_win.cc
+++ b/content/browser/renderer_host/dwrite_font_lookup_table_builder_win.cc
@@ -335,8 +335,12 @@
   TRACE_EVENT0("dwrite,fonts",
                "DWriteFontLookupTableBuilder::QueueShareMemoryRegionWhenReady");
   DCHECK(!HasDWriteUniqueFontLookups());
-  DCHECK(!font_table_built_.IsSignaled());
   pending_callbacks_.emplace_back(std::move(task_runner), std::move(callback));
+  // Cover for the condition in which the font table becomes ready briefly after
+  // a renderer asking for GetUniqueNameLookupTableIfAvailable(), receiving the
+  // information that it wasn't ready.
+  if (font_table_built_.IsSignaled())
+    PostCallbacks();
 }
 
 bool DWriteFontLookupTableBuilder::FontUniqueNameTableReady() {
diff --git a/content/common/accessibility_messages.h b/content/common/accessibility_messages.h
index 2ed10364..1c65537 100644
--- a/content/common/accessibility_messages.h
+++ b/content/common/accessibility_messages.h
@@ -139,18 +139,6 @@
 IPC_MESSAGE_ROUTED1(AccessibilityMsg_PerformAction,
                     ui::AXActionData  /* action parameters */)
 
-// Determine the accessibility object under a given point.
-//
-// If the target is an object with a child frame (like if the hit test
-// result is an iframe element), it responds with
-// AccessibilityHostMsg_ChildFrameHitTestResult so that the
-// hit test can be performed recursively on the child frame. Otherwise
-// it fires an accessibility event of type |event_to_fire| on the target.
-IPC_MESSAGE_ROUTED3(AccessibilityMsg_HitTest,
-                    gfx::Point /* location to test */,
-                    ax::mojom::Event /* event to fire */,
-                    int /* action request id */)
-
 // Tells the render view that a AccessibilityHostMsg_EventBundle
 // message was processed and it can send additional updates. The argument
 // must be the same as the ack_token passed to
@@ -202,7 +190,7 @@
     AccessibilityHostMsg_FindInPageResult,
     AccessibilityHostMsg_FindInPageResultParams)
 
-// Sent in response to AccessibilityMsg_HitTest.
+// Sent in response to PerformAction with parameter kHitTest.
 IPC_MESSAGE_ROUTED5(AccessibilityHostMsg_ChildFrameHitTestResult,
                     int /* action request id of initial caller */,
                     gfx::Point /* location tested */,
diff --git a/content/public/browser/background_sync_context.h b/content/public/browser/background_sync_context.h
index 67a7fa2..0273ceb 100644
--- a/content/public/browser/background_sync_context.h
+++ b/content/public/browser/background_sync_context.h
@@ -15,6 +15,8 @@
 #include "base/android/scoped_java_ref.h"
 #endif
 
+#include "third_party/blink/public/mojom/background_sync/background_sync.mojom.h"
+
 namespace content {
 
 class BrowserContext;
@@ -34,10 +36,12 @@
       base::OnceCallback<void(base::TimeDelta)> callback);
 
 #if defined(OS_ANDROID)
-  // Processes pending Background Sync registrations for all storage partitions
-  // in |browser_context|, and then runs  the |j_runnable| when done.
+  // Processes pending Background Sync registrations of |sync_type| for all the
+  // storage partitions in |browser_context|, and then runs  the |j_runnable|
+  // when done.
   static void FireBackgroundSyncEventsAcrossPartitions(
       BrowserContext* browser_context,
+      blink::mojom::BackgroundSyncType sync_type,
       const base::android::JavaParamRef<jobject>& j_runnable);
 #endif
 
@@ -47,7 +51,9 @@
   // This involves firing any sync events ready to be fired, and optionally
   // scheduling a job to wake up the browser when the next event needs to be
   // fired.
-  virtual void FireBackgroundSyncEvents(base::OnceClosure done_closure) = 0;
+  virtual void FireBackgroundSyncEvents(
+      blink::mojom::BackgroundSyncType sync_type,
+      base::OnceClosure done_closure) = 0;
 
   // Gets the soonest time delta from now, when the browser should be woken up
   // to fire any Background Sync events. Calls |callback| with this value.
diff --git a/content/renderer/accessibility/render_accessibility_impl.cc b/content/renderer/accessibility/render_accessibility_impl.cc
index dc9228b4..8fc9fa6 100644
--- a/content/renderer/accessibility/render_accessibility_impl.cc
+++ b/content/renderer/accessibility/render_accessibility_impl.cc
@@ -256,7 +256,6 @@
 
     IPC_MESSAGE_HANDLER(AccessibilityMsg_PerformAction, OnPerformAction)
     IPC_MESSAGE_HANDLER(AccessibilityMsg_EventBundle_ACK, OnEventsAck)
-    IPC_MESSAGE_HANDLER(AccessibilityMsg_HitTest, OnHitTest)
     IPC_MESSAGE_HANDLER(AccessibilityMsg_Reset, OnReset)
     IPC_MESSAGE_HANDLER(AccessibilityMsg_FatalError, OnFatalError)
     IPC_MESSAGE_UNHANDLED(handled = false)
diff --git a/content/renderer/loader/web_url_loader_impl_unittest.cc b/content/renderer/loader/web_url_loader_impl_unittest.cc
index 681217a8..3f7db944 100644
--- a/content/renderer/loader/web_url_loader_impl_unittest.cc
+++ b/content/renderer/loader/web_url_loader_impl_unittest.cc
@@ -548,22 +548,23 @@
   blink::WebURLResponse web_url_response;
   WebURLLoaderImpl::PopulateURLResponse(url, info, &web_url_response, true, -1);
 
-  blink::WebURLResponse::WebSecurityDetails security_details =
+  base::Optional<blink::WebURLResponse::WebSecurityDetails> security_details =
       web_url_response.SecurityDetailsForTesting();
-  EXPECT_EQ("TLS 1.2", security_details.protocol);
-  EXPECT_EQ("127.0.0.1", security_details.subject_name);
-  EXPECT_EQ("127.0.0.1", security_details.issuer);
-  ASSERT_EQ(3U, security_details.san_list.size());
-  EXPECT_EQ("test.example", security_details.san_list[0]);
-  EXPECT_EQ("127.0.0.2", security_details.san_list[1]);
-  EXPECT_EQ("fe80::1", security_details.san_list[2]);
-  EXPECT_EQ(certs[0]->valid_start().ToTimeT(), security_details.valid_from);
-  EXPECT_EQ(certs[0]->valid_expiry().ToTimeT(), security_details.valid_to);
-  ASSERT_EQ(2U, security_details.certificate.size());
+  ASSERT_TRUE(security_details.has_value());
+  EXPECT_EQ("TLS 1.2", security_details->protocol);
+  EXPECT_EQ("127.0.0.1", security_details->subject_name);
+  EXPECT_EQ("127.0.0.1", security_details->issuer);
+  ASSERT_EQ(3U, security_details->san_list.size());
+  EXPECT_EQ("test.example", security_details->san_list[0]);
+  EXPECT_EQ("127.0.0.2", security_details->san_list[1]);
+  EXPECT_EQ("fe80::1", security_details->san_list[2]);
+  EXPECT_EQ(certs[0]->valid_start().ToTimeT(), security_details->valid_from);
+  EXPECT_EQ(certs[0]->valid_expiry().ToTimeT(), security_details->valid_to);
+  ASSERT_EQ(2U, security_details->certificate.size());
   EXPECT_EQ(blink::WebString::FromLatin1(std::string(cert0_der)),
-            security_details.certificate[0]);
+            security_details->certificate[0]);
   EXPECT_EQ(blink::WebString::FromLatin1(std::string(cert1_der)),
-            security_details.certificate[1]);
+            security_details->certificate[1]);
 }
 
 TEST_F(WebURLLoaderImplTest, ResponseCertWithNoSANs) {
@@ -585,17 +586,18 @@
   blink::WebURLResponse web_url_response;
   WebURLLoaderImpl::PopulateURLResponse(url, info, &web_url_response, true, -1);
 
-  blink::WebURLResponse::WebSecurityDetails security_details =
+  base::Optional<blink::WebURLResponse::WebSecurityDetails> security_details =
       web_url_response.SecurityDetailsForTesting();
-  EXPECT_EQ("TLS 1.2", security_details.protocol);
-  EXPECT_EQ("B CA - Multi-root", security_details.subject_name);
-  EXPECT_EQ("C CA - Multi-root", security_details.issuer);
-  EXPECT_EQ(0U, security_details.san_list.size());
-  EXPECT_EQ(certs[0]->valid_start().ToTimeT(), security_details.valid_from);
-  EXPECT_EQ(certs[0]->valid_expiry().ToTimeT(), security_details.valid_to);
-  ASSERT_EQ(1U, security_details.certificate.size());
+  ASSERT_TRUE(security_details.has_value());
+  EXPECT_EQ("TLS 1.2", security_details->protocol);
+  EXPECT_EQ("B CA - Multi-root", security_details->subject_name);
+  EXPECT_EQ("C CA - Multi-root", security_details->issuer);
+  EXPECT_EQ(0U, security_details->san_list.size());
+  EXPECT_EQ(certs[0]->valid_start().ToTimeT(), security_details->valid_from);
+  EXPECT_EQ(certs[0]->valid_expiry().ToTimeT(), security_details->valid_to);
+  ASSERT_EQ(1U, security_details->certificate.size());
   EXPECT_EQ(blink::WebString::FromLatin1(std::string(cert0_der)),
-            security_details.certificate[0]);
+            security_details->certificate[0]);
 }
 
 // Verifies that the lengths used by the PerformanceResourceTiming API are
diff --git a/content/test/data/accessibility/aria/aria-level-expected-auralinux.txt b/content/test/data/accessibility/aria/aria-level-expected-auralinux.txt
index 4d69dfd..10b7909 100644
--- a/content/test/data/accessibility/aria/aria-level-expected-auralinux.txt
+++ b/content/test/data/accessibility/aria/aria-level-expected-auralinux.txt
@@ -21,7 +21,7 @@
 ++++++++++[text] name='Tree item at level 2'
 ++++[tree item] name='Tree item at level 3' selectable level:3
 ++++++[text] name='Tree item at level 3'
-++[tree table]
+++[tree table] cols=1 headers=(NONE); rows=2 headers=(NONE); caption=false; spans=(all: 1x1)
 ++++[table row] selectable level:1
 ++++++[table cell] name='Cell at level 1' selectable (row=0, col=0, row_span=1, col_span=1, n_row_headers=0, n_col_headers=0)
 ++++++++[text] name='Cell at level 1'
diff --git a/content/test/data/accessibility/aria/aria-orientation-expected-auralinux.txt b/content/test/data/accessibility/aria/aria-orientation-expected-auralinux.txt
index b296b94..7a6b299 100644
--- a/content/test/data/accessibility/aria/aria-orientation-expected-auralinux.txt
+++ b/content/test/data/accessibility/aria/aria-orientation-expected-auralinux.txt
@@ -32,6 +32,6 @@
 ++[tree] vertical
 ++[tree] horizontal
 ++[tree] vertical
-++[tree table]
-++[tree table] horizontal
-++[tree table] vertical
+++[tree table] cols=0 headers=(NONE); rows=0 headers=(NONE); caption=false; spans=(all: 1x1)
+++[tree table] horizontal cols=0 headers=(NONE); rows=0 headers=(NONE); caption=false; spans=(all: 1x1)
+++[tree table] vertical cols=0 headers=(NONE); rows=0 headers=(NONE); caption=false; spans=(all: 1x1)
diff --git a/content/test/data/accessibility/aria/aria-treegrid-expected-auralinux.txt b/content/test/data/accessibility/aria/aria-treegrid-expected-auralinux.txt
index e9437cc..740c964f 100644
--- a/content/test/data/accessibility/aria/aria-treegrid-expected-auralinux.txt
+++ b/content/test/data/accessibility/aria/aria-treegrid-expected-auralinux.txt
@@ -1,12 +1,12 @@
 [document web]
-++[tree table] xml-roles:treegrid
+++[tree table] xml-roles:treegrid cols=1 headers=(NONE); rows=2 headers=(NONE); caption=false; spans=(all: 1x1)
 ++++[table row] selectable level:1 xml-roles:row
 ++++++[table cell] name='Cell at level 1' selectable xml-roles:gridcell (row=0, col=0, row_span=1, col_span=1, n_row_headers=0, n_col_headers=0)
 ++++++++[text] name='Cell at level 1'
 ++++[table row] selectable level:2 xml-roles:row
 ++++++[table cell] name='Cell at level 2' selectable xml-roles:gridcell (row=1, col=0, row_span=1, col_span=1, n_row_headers=0, n_col_headers=0)
 ++++++++[text] name='Cell at level 2'
-++[tree table] xml-roles:treegrid
+++[tree table] xml-roles:treegrid cols=1 headers=(NONE); rows=1 headers=(NONE); caption=false; spans=(all: 1x1)
 ++++[table row] selectable level:1 xml-roles:row
 ++++++[table cell] name='Cell at level 1' selectable xml-roles:gridcell (row=0, col=0, row_span=1, col_span=1, n_row_headers=0, n_col_headers=0)
 ++++++++[text] name='Cell at level 1'
diff --git a/docs/origin_trials_integration.md b/docs/origin_trials_integration.md
index 028d12a..b42382d 100644
--- a/docs/origin_trials_integration.md
+++ b/docs/origin_trials_integration.md
@@ -1,4 +1,4 @@
-# Integrating a feature with the Origin Trials framework
+# Integrating a feature with the origin trials framework
 
 To expose your feature via the origin trials framework, there are a few code
 changes required.
@@ -13,11 +13,10 @@
 explained in the file, but you use `origin_trial_feature_name` to associate your
 runtime feature flag with a name for your origin trial.  The name can be the
 same as your runtime feature flag, or different.  Eventually, this configured
-name will be used in the Origin Trials developer console (still under
-development). You can have both `status: experimental` and
-`origin_trial_feature_name` if you want your feature to be enabled either by
-using the `--enable-experimental-web-platform-features` flag **or** the origin
-trial.
+name will be used in the origin trials developer console. You can have both
+`status: experimental` and `origin_trial_feature_name` if you want your feature
+to be enabled either by using the `--enable-experimental-web-platform-features`
+flag **or** the origin trial.
 
 You may have a feature that is not available on all platforms, or need to limit
 the trial to specific platforms. Use `origin_trial_os: [list]` to specify which
@@ -60,17 +59,21 @@
 feature implementation.
 
 1. A native C++ method that you can call in Blink code at runtime to expose your
-    feature: `bool OriginTrials::myFeatureEnabled()`
-2. An IDL attribute \[[OriginTrialEnabled]\] that you can use to automatically
-    generate code to expose and hide JavaScript methods/attributes/objects. This
-    attribute works very similarly to \[RuntimeEnabled\].
+    feature: `bool RuntimeEnabledFeatures::MyFeatureEnabled(ExecutionContext*)`
+2. An IDL attribute \[[RuntimeEnabled]\] that you can use to automatically
+    generate code to expose and hide JavaScript methods/attributes/objects.
 ```
-[OriginTrialEnabled=MyFeature]
+[RuntimeEnabled=MyFeature]
 partial interface Navigator {
      readonly attribute MyFeatureManager myFeature;
 }
 ```
 
+**NOTE:** Your feature implementation must not persist the result of the enabled
+check. Your code should simply call
+`RuntimeEnabledFeatures::MyFeatureEnabled(ExecutionContext*)` as often as
+necessary to gate access to your feature.
+
 ### Web Feature Counting
 
 Once the feature is created, in order to run the origin trial you need to track
@@ -94,11 +97,11 @@
 
 3. Increment your feature counter in c++ code.
 ```c++
-#include "third_party/blink/renderer/core/frame/use_counter.h"
+#include "third_party/blink/renderer/platform/instrumentation/use_counter.h"
 
 // ...
 
-  if (OriginTrials::myFeatureEnabled()) {
+  if (RuntimeEnabledFeatures::MyFeatureEnabled(context)) {
     UseCounter::Count(context, WebFeature::kMyFeature);
   }
 ```
@@ -108,7 +111,7 @@
 1. Add \[[Measure]\] IDL attribute
 ```
 partial interface Navigator {
-  [OriginTrialEnabled=MyFeature, Measure]
+  [RuntimeEnabled=MyFeature, Measure]
   readonly attribute MyFeatureManager myFeature;
 ```
 
@@ -127,14 +130,9 @@
 };
 ```
 
-
-**NOTE:** Your feature implementation must not persist the result of the enabled
-check. Your code should simply call `OriginTrials::myFeatureEnabled()` as often
-as necessary to gate access to your feature.
-
 ## Limitations
 
-What you can't do, because of the nature of these Origin Trials, is know at
+What you can't do, because of the nature of these origin trials, is know at
 either browser or renderer startup time whether your feature is going to be used
 in the current page/context. This means that if you require lots of expensive
 processing to begin (say you index the user's hard drive, or scan an entire city
@@ -182,7 +180,7 @@
 directly modify [chrome_origin_trial_policy.cc].
 
 ### Web Tests
-When using the \[OriginTrialEnabled\] IDL attribute, you should add web tests
+When using the \[RuntimeEnabled\] IDL attribute, you should add web tests
 to verify that the V8 bindings code is working as expected. Depending on how
 your feature is exposed, you'll want tests for the exposed interfaces, as well
 as tests for script-added tokens. For examples, refer to the existing tests in
@@ -192,7 +190,7 @@
 [chrome_origin_trial_policy.cc]: /chrome/common/origin_trials/chrome_origin_trial_policy.cc
 [generate_token.py]: /tools/origin_trials/generate_token.py
 [Developer Guide]: https://github.com/jpchase/OriginTrials/blob/gh-pages/developer-guide.md
-[OriginTrialEnabled]: /third_party/blink/renderer/bindings/IDLExtendedAttributes.md#_OriginTrialEnabled_i_m_a_c_
+[RuntimeEnabled]: /third_party/blink/renderer/bindings/IDLExtendedAttributes.md#RuntimeEnabled_i_m_a_c
 [origin_trials/webexposed]: /third_party/blink/web_tests/http/tests/origin_trials/webexposed/
 [runtime\_enabled\_features.json5]: /third_party/blink/renderer/platform/runtime_enabled_features.json5
 [trial_token_unittest.cc]: /third_party/blink/common/origin_trials/trial_token_unittest.cc
diff --git a/google_apis/BUILD.gn b/google_apis/BUILD.gn
index ef0da3d..3b12ded 100644
--- a/google_apis/BUILD.gn
+++ b/google_apis/BUILD.gn
@@ -124,8 +124,6 @@
       "gaia/oauth2_token_service_delegate.cc",
       "gaia/oauth2_token_service_delegate.h",
       "gaia/oauth2_token_service_observer.h",
-      "gaia/oauth2_token_service_request.cc",
-      "gaia/oauth2_token_service_request.h",
       "gaia/oauth_multilogin_result.cc",
       "gaia/oauth_multilogin_result.h",
       "gaia/oauth_request_signer.cc",
@@ -222,7 +220,6 @@
     "gaia/oauth2_id_token_decoder_unittest.cc",
     "gaia/oauth2_mint_token_flow_unittest.cc",
     "gaia/oauth2_token_service_delegate_unittest.cc",
-    "gaia/oauth2_token_service_request_unittest.cc",
     "gaia/oauth2_token_service_unittest.cc",
     "gaia/oauth_multilogin_result_unittest.cc",
     "gaia/oauth_request_signer_unittest.cc",
diff --git a/google_apis/gaia/gaia_auth_fetcher.cc b/google_apis/gaia/gaia_auth_fetcher.cc
index b90f1be..e90efabf 100644
--- a/google_apis/gaia/gaia_auth_fetcher.cc
+++ b/google_apis/gaia/gaia_auth_fetcher.cc
@@ -175,11 +175,6 @@
 
 const char GaiaAuthFetcher::kOAuthLoginFormat[] = "service=%s&source=%s";
 
-// static
-const char GaiaAuthFetcher::kAccountDeletedError[] = "AccountDeleted";
-// static
-const char GaiaAuthFetcher::kAccountDisabledError[] = "AccountDisabled";
-// static
 const char GaiaAuthFetcher::kBadAuthenticationError[] = "BadAuthentication";
 // static
 const char GaiaAuthFetcher::kServiceUnavailableError[] =
@@ -886,10 +881,6 @@
   ParseClientLoginFailure(data, &error, &url);
   DLOG(WARNING) << "ClientLogin failed with " << error;
 
-  if (error == kAccountDeletedError)
-    return GoogleServiceAuthError(GoogleServiceAuthError::ACCOUNT_DELETED);
-  if (error == kAccountDisabledError)
-    return GoogleServiceAuthError(GoogleServiceAuthError::ACCOUNT_DISABLED);
   if (error == kBadAuthenticationError) {
     return GoogleServiceAuthError(
         GoogleServiceAuthError::FromInvalidGaiaCredentialsReason(
diff --git a/google_apis/gaia/gaia_auth_fetcher.h b/google_apis/gaia/gaia_auth_fetcher.h
index ec29c53..f6aa443 100644
--- a/google_apis/gaia/gaia_auth_fetcher.h
+++ b/google_apis/gaia/gaia_auth_fetcher.h
@@ -237,10 +237,6 @@
   static const char kOAuthLoginFormat[];
 
   // Constants for parsing ClientLogin errors.
-  static const char kAccountDeletedError[];
-  static const char kAccountDeletedErrorCode[];
-  static const char kAccountDisabledError[];
-  static const char kAccountDisabledErrorCode[];
   static const char kBadAuthenticationError[];
   static const char kBadAuthenticationErrorCode[];
   static const char kServiceUnavailableError[];
@@ -376,8 +372,6 @@
 
   friend class GaiaAuthFetcherTest;
   FRIEND_TEST_ALL_PREFIXES(GaiaAuthFetcherTest, CaptchaParse);
-  FRIEND_TEST_ALL_PREFIXES(GaiaAuthFetcherTest, AccountDeletedError);
-  FRIEND_TEST_ALL_PREFIXES(GaiaAuthFetcherTest, AccountDisabledError);
   FRIEND_TEST_ALL_PREFIXES(GaiaAuthFetcherTest, BadAuthenticationError);
   FRIEND_TEST_ALL_PREFIXES(GaiaAuthFetcherTest, IncomprehensibleError);
   FRIEND_TEST_ALL_PREFIXES(GaiaAuthFetcherTest, ServiceUnavailableError);
diff --git a/google_apis/gaia/gaia_auth_fetcher_unittest.cc b/google_apis/gaia/gaia_auth_fetcher_unittest.cc
index 8e4afa9..291e38d3 100644
--- a/google_apis/gaia/gaia_auth_fetcher_unittest.cc
+++ b/google_apis/gaia/gaia_auth_fetcher_unittest.cc
@@ -238,20 +238,6 @@
       "E", "U");
 }
 
-TEST_F(GaiaAuthFetcherTest, AccountDeletedError) {
-  std::string data = "Error=AccountDeleted\n";
-  GoogleServiceAuthError error =
-      GaiaAuthFetcher::GenerateAuthError(data, net::OK);
-  EXPECT_EQ(error.state(), GoogleServiceAuthError::ACCOUNT_DELETED);
-}
-
-TEST_F(GaiaAuthFetcherTest, AccountDisabledError) {
-  std::string data = "Error=AccountDisabled\n";
-  GoogleServiceAuthError error =
-      GaiaAuthFetcher::GenerateAuthError(data, net::OK);
-  EXPECT_EQ(error.state(), GoogleServiceAuthError::ACCOUNT_DISABLED);
-}
-
 TEST_F(GaiaAuthFetcherTest, BadAuthenticationError) {
   std::string data = "Error=BadAuthentication\n";
   GoogleServiceAuthError error =
diff --git a/google_apis/gaia/google_service_auth_error.cc b/google_apis/gaia/google_service_auth_error.cc
index 9095837..73ef9fa 100644
--- a/google_apis/gaia/google_service_auth_error.cc
+++ b/google_apis/gaia/google_service_auth_error.cc
@@ -101,8 +101,6 @@
     case INVALID_GAIA_CREDENTIALS:
     case USER_NOT_SIGNED_UP:
     case CONNECTION_FAILED:
-    case ACCOUNT_DELETED:
-    case ACCOUNT_DISABLED:
     case SERVICE_UNAVAILABLE:
     case REQUEST_CANCELED:
     case UNEXPECTED_SERVICE_RESPONSE:
@@ -145,10 +143,6 @@
       return "Not authorized.";
     case CONNECTION_FAILED:
       return base::StringPrintf("Connection failed (%d).", network_error_);
-    case ACCOUNT_DELETED:
-      return "Account deleted.";
-    case ACCOUNT_DISABLED:
-      return "Account disabled.";
     case SERVICE_UNAVAILABLE:
       return "Service unavailable; try again later.";
     case REQUEST_CANCELED:
diff --git a/google_apis/gaia/google_service_auth_error.h b/google_apis/gaia/google_service_auth_error.h
index ecdac1fe..e3cd035 100644
--- a/google_apis/gaia/google_service_auth_error.h
+++ b/google_apis/gaia/google_service_auth_error.h
@@ -52,11 +52,13 @@
     // will provide details about the associated challenge.
     // CAPTCHA_REQUIRED = 4,
 
+    // DEPRECATED.
     // The user account has been deleted.
-    ACCOUNT_DELETED = 5,
+    // ACCOUNT_DELETED = 5,
 
+    // DEPRECATED.
     // The user account has been disabled.
-    ACCOUNT_DISABLED = 6,
+    // ACCOUNT_DISABLED = 6,
 
     // The service is not available; try again later.
     SERVICE_UNAVAILABLE = 7,
@@ -88,7 +90,7 @@
     NUM_STATES = 14,
   };
 
-  static constexpr size_t kDeprecatedStateCount = 4;
+  static constexpr size_t kDeprecatedStateCount = 6;
 
   // Error reason for invalid credentials. Only used when the error is
   // INVALID_GAIA_CREDENTIALS.
diff --git a/google_apis/gaia/oauth2_token_service_request.cc b/google_apis/gaia/oauth2_token_service_request.cc
deleted file mode 100644
index 41d22256..0000000
--- a/google_apis/gaia/oauth2_token_service_request.cc
+++ /dev/null
@@ -1,367 +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.
-
-#include "google_apis/gaia/oauth2_token_service_request.h"
-
-#include <memory>
-
-#include "base/bind.h"
-#include "base/location.h"
-#include "base/macros.h"
-#include "base/memory/ref_counted_delete_on_sequence.h"
-#include "base/single_thread_task_runner.h"
-#include "base/threading/sequenced_task_runner_handle.h"
-#include "google_apis/gaia/google_service_auth_error.h"
-#include "google_apis/gaia/oauth2_access_token_consumer.h"
-
-OAuth2TokenServiceRequest::TokenServiceProvider::TokenServiceProvider() {
-}
-
-OAuth2TokenServiceRequest::TokenServiceProvider::~TokenServiceProvider() {
-}
-
-// Core serves as the base class for OAuth2TokenService operations.  Each
-// operation should be modeled as a derived type.
-//
-// Core is used like this:
-//
-// 1. Constructed on owner thread.
-//
-// 2. Start() is called on owner thread, which calls StartOnTokenServiceThread()
-// on token service thread.
-//
-// 3. Request is executed.
-//
-// 4. Stop() is called on owner thread, which calls StopOnTokenServiceThread()
-// on token service thread.
-//
-// 5. Core is destroyed on owner thread.
-class OAuth2TokenServiceRequest::Core
-    : public base::RefCountedDeleteOnSequence<OAuth2TokenServiceRequest::Core> {
- public:
-  // Note the thread where an instance of Core is constructed is referred to as
-  // the "owner thread" here.
-  Core(OAuth2TokenServiceRequest* owner,
-       const scoped_refptr<TokenServiceProvider>& provider);
-
-  // Starts the core.  Must be called on the owner thread.
-  void Start();
-
-  // Stops the core.  Must be called on the owner thread.
-  void Stop();
-
-  // Returns true if this object has been stopped.  Must be called on the owner
-  // thread.
-  bool IsStopped() const;
-
- protected:
-  // Core must be destroyed on the owner thread.  If data members must be
-  // cleaned up or destroyed on the token service thread, do so in the
-  // StopOnTokenServiceThread method.
-  virtual ~Core();
-
-  // Called on the token service thread.
-  virtual void StartOnTokenServiceThread() = 0;
-
-  // Called on the token service thread.
-  virtual void StopOnTokenServiceThread() = 0;
-
-  const base::SingleThreadTaskRunner* token_service_task_runner() const {
-    return token_service_task_runner_.get();
-  }
-  OAuth2TokenService* token_service();
-  OAuth2TokenServiceRequest* owner();
-
-  SEQUENCE_CHECKER(sequence_checker_);
-
- private:
-  friend class base::RefCountedDeleteOnSequence<
-      OAuth2TokenServiceRequest::Core>;
-  friend class base::DeleteHelper<OAuth2TokenServiceRequest::Core>;
-
-  scoped_refptr<base::SingleThreadTaskRunner> token_service_task_runner_;
-  OAuth2TokenServiceRequest* owner_;
-
-  // Clear on owner thread.  OAuth2TokenServiceRequest promises to clear its
-  // last reference to TokenServiceProvider on the owner thread so the caller
-  // can ensure it is destroyed on the owner thread if desired.
-  scoped_refptr<TokenServiceProvider> provider_;
-
-  DISALLOW_COPY_AND_ASSIGN(Core);
-};
-
-OAuth2TokenServiceRequest::Core::Core(
-    OAuth2TokenServiceRequest* owner,
-    const scoped_refptr<TokenServiceProvider>& provider)
-    : RefCountedDeleteOnSequence<OAuth2TokenServiceRequest::Core>(
-          base::SequencedTaskRunnerHandle::Get()),
-      owner_(owner),
-      provider_(provider) {
-  DCHECK(owner_);
-  DCHECK(provider_.get());
-  token_service_task_runner_ = provider_->GetTokenServiceTaskRunner();
-  DCHECK(token_service_task_runner());
-}
-
-OAuth2TokenServiceRequest::Core::~Core() {
-}
-
-void OAuth2TokenServiceRequest::Core::Start() {
-  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-  token_service_task_runner_->PostTask(
-      FROM_HERE,
-      base::BindOnce(
-          &OAuth2TokenServiceRequest::Core::StartOnTokenServiceThread, this));
-}
-
-void OAuth2TokenServiceRequest::Core::Stop() {
-  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-  DCHECK(!IsStopped());
-
-  // Detaches |owner_| from this instance so |owner_| will be called back only
-  // if |Stop()| has never been called.
-  owner_ = nullptr;
-
-  // Stop on the token service thread.  RefCountedDeleteOnSequence ensures we
-  // will be destroyed on the owner thread.
-  token_service_task_runner_->PostTask(
-      FROM_HERE,
-      base::BindOnce(&OAuth2TokenServiceRequest::Core::StopOnTokenServiceThread,
-                     this));
-}
-
-bool OAuth2TokenServiceRequest::Core::IsStopped() const {
-  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-  return owner_ == nullptr;
-}
-
-OAuth2TokenService* OAuth2TokenServiceRequest::Core::token_service() {
-  DCHECK(token_service_task_runner()->RunsTasksInCurrentSequence());
-  return provider_->GetTokenService();
-}
-
-OAuth2TokenServiceRequest* OAuth2TokenServiceRequest::Core::owner() {
-  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-  return owner_;
-}
-
-namespace {
-
-// An implementation of Core for getting an access token.
-class RequestCore : public OAuth2TokenServiceRequest::Core,
-                    public OAuth2TokenService::Consumer {
- public:
-  RequestCore(
-      OAuth2TokenServiceRequest* owner,
-      const scoped_refptr<OAuth2TokenServiceRequest::TokenServiceProvider>&
-          provider,
-      OAuth2TokenService::Consumer* consumer,
-      const CoreAccountId& account_id,
-      const OAuth2TokenService::ScopeSet& scopes);
-
-  // OAuth2TokenService::Consumer.  Must be called on the token service thread.
-  void OnGetTokenSuccess(
-      const OAuth2TokenService::Request* request,
-      const OAuth2AccessTokenConsumer::TokenResponse& token_response) override;
-  void OnGetTokenFailure(const OAuth2TokenService::Request* request,
-                         const GoogleServiceAuthError& error) override;
-
- private:
-  friend class base::RefCountedThreadSafe<RequestCore>;
-
-  // Must be destroyed on the owner thread.
-  ~RequestCore() override;
-
-  // Core implementation.
-  void StartOnTokenServiceThread() override;
-  void StopOnTokenServiceThread() override;
-
-  void InformOwnerOnGetTokenSuccess(
-      const OAuth2AccessTokenConsumer::TokenResponse& token_response);
-  void InformOwnerOnGetTokenFailure(GoogleServiceAuthError error);
-
-  OAuth2TokenService::Consumer* const consumer_;
-  CoreAccountId account_id_;
-  OAuth2TokenService::ScopeSet scopes_;
-
-  // OAuth2TokenService request for fetching OAuth2 access token; it should be
-  // created, reset and accessed only on the token service thread.
-  std::unique_ptr<OAuth2TokenService::Request> request_;
-
-  DISALLOW_COPY_AND_ASSIGN(RequestCore);
-};
-
-RequestCore::RequestCore(
-    OAuth2TokenServiceRequest* owner,
-    const scoped_refptr<OAuth2TokenServiceRequest::TokenServiceProvider>&
-        provider,
-    OAuth2TokenService::Consumer* consumer,
-    const CoreAccountId& account_id,
-    const OAuth2TokenService::ScopeSet& scopes)
-    : OAuth2TokenServiceRequest::Core(owner, provider),
-      OAuth2TokenService::Consumer("oauth2_token_service"),
-      consumer_(consumer),
-      account_id_(account_id),
-      scopes_(scopes) {
-  DCHECK(consumer_);
-  DCHECK(!account_id_.empty());
-  DCHECK(!scopes_.empty());
-}
-
-RequestCore::~RequestCore() {
-}
-
-void RequestCore::StartOnTokenServiceThread() {
-  DCHECK(token_service_task_runner()->RunsTasksInCurrentSequence());
-  request_ = token_service()->StartRequest(account_id_, scopes_, this);
-}
-
-void RequestCore::StopOnTokenServiceThread() {
-  DCHECK(token_service_task_runner()->RunsTasksInCurrentSequence());
-  request_.reset();
-}
-
-void RequestCore::OnGetTokenSuccess(
-    const OAuth2TokenService::Request* request,
-    const OAuth2AccessTokenConsumer::TokenResponse& token_response) {
-  DCHECK(token_service_task_runner()->RunsTasksInCurrentSequence());
-  DCHECK_EQ(request_.get(), request);
-  owning_task_runner()->PostTask(
-      FROM_HERE, base::BindOnce(&RequestCore::InformOwnerOnGetTokenSuccess,
-                                this, token_response));
-  request_.reset();
-}
-
-void RequestCore::OnGetTokenFailure(const OAuth2TokenService::Request* request,
-                                    const GoogleServiceAuthError& error) {
-  DCHECK(token_service_task_runner()->RunsTasksInCurrentSequence());
-  DCHECK_EQ(request_.get(), request);
-  owning_task_runner()->PostTask(
-      FROM_HERE,
-      base::BindOnce(&RequestCore::InformOwnerOnGetTokenFailure, this, error));
-  request_.reset();
-}
-
-void RequestCore::InformOwnerOnGetTokenSuccess(
-    const OAuth2AccessTokenConsumer::TokenResponse& token_response) {
-  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-  if (!IsStopped()) {
-    consumer_->OnGetTokenSuccess(owner(), token_response);
-  }
-}
-
-void RequestCore::InformOwnerOnGetTokenFailure(GoogleServiceAuthError error) {
-  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-  if (!IsStopped()) {
-    consumer_->OnGetTokenFailure(owner(), error);
-  }
-}
-
-// An implementation of Core for invalidating an access token.
-class InvalidateCore : public OAuth2TokenServiceRequest::Core {
- public:
-  InvalidateCore(
-      OAuth2TokenServiceRequest* owner,
-      const scoped_refptr<OAuth2TokenServiceRequest::TokenServiceProvider>&
-          provider,
-      const std::string& access_token,
-      const CoreAccountId& account_id,
-      const OAuth2TokenService::ScopeSet& scopes);
-
- private:
-  friend class base::RefCountedThreadSafe<InvalidateCore>;
-
-  // Must be destroyed on the owner thread.
-  ~InvalidateCore() override;
-
-  // Core implementation.
-  void StartOnTokenServiceThread() override;
-  void StopOnTokenServiceThread() override;
-
-  std::string access_token_;
-  CoreAccountId account_id_;
-  OAuth2TokenService::ScopeSet scopes_;
-
-  DISALLOW_COPY_AND_ASSIGN(InvalidateCore);
-};
-
-InvalidateCore::InvalidateCore(
-    OAuth2TokenServiceRequest* owner,
-    const scoped_refptr<OAuth2TokenServiceRequest::TokenServiceProvider>&
-        provider,
-    const std::string& access_token,
-    const CoreAccountId& account_id,
-    const OAuth2TokenService::ScopeSet& scopes)
-    : OAuth2TokenServiceRequest::Core(owner, provider),
-      access_token_(access_token),
-      account_id_(account_id),
-      scopes_(scopes) {
-  DCHECK(!access_token_.empty());
-  DCHECK(!account_id_.empty());
-  DCHECK(!scopes.empty());
-}
-
-InvalidateCore::~InvalidateCore() {
-}
-
-void InvalidateCore::StartOnTokenServiceThread() {
-  DCHECK(token_service_task_runner()->RunsTasksInCurrentSequence());
-  token_service()->InvalidateAccessToken(account_id_, scopes_, access_token_);
-}
-
-void InvalidateCore::StopOnTokenServiceThread() {
-  DCHECK(token_service_task_runner()->RunsTasksInCurrentSequence());
-  // Nothing to do.
-}
-
-}  // namespace
-
-// static
-std::unique_ptr<OAuth2TokenServiceRequest>
-OAuth2TokenServiceRequest::CreateAndStart(
-    const scoped_refptr<TokenServiceProvider>& provider,
-    const CoreAccountId& account_id,
-    const OAuth2TokenService::ScopeSet& scopes,
-    OAuth2TokenService::Consumer* consumer) {
-  std::unique_ptr<OAuth2TokenServiceRequest> request(
-      new OAuth2TokenServiceRequest(account_id));
-  scoped_refptr<Core> core(
-      new RequestCore(request.get(), provider, consumer, account_id, scopes));
-  request->StartWithCore(core);
-  return request;
-}
-
-// static
-void OAuth2TokenServiceRequest::InvalidateToken(
-    const scoped_refptr<TokenServiceProvider>& provider,
-    const CoreAccountId& account_id,
-    const OAuth2TokenService::ScopeSet& scopes,
-    const std::string& access_token) {
-  std::unique_ptr<OAuth2TokenServiceRequest> request(
-      new OAuth2TokenServiceRequest(account_id));
-  scoped_refptr<Core> core(new InvalidateCore(
-      request.get(), provider, access_token, account_id, scopes));
-  request->StartWithCore(core);
-}
-
-OAuth2TokenServiceRequest::~OAuth2TokenServiceRequest() {
-  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-  core_->Stop();
-}
-
-CoreAccountId OAuth2TokenServiceRequest::GetAccountId() const {
-  return account_id_;
-}
-
-OAuth2TokenServiceRequest::OAuth2TokenServiceRequest(
-    const CoreAccountId& account_id)
-    : account_id_(account_id) {
-  DCHECK(!account_id_.empty());
-}
-
-void OAuth2TokenServiceRequest::StartWithCore(const scoped_refptr<Core>& core) {
-  DCHECK(core.get());
-  core_ = core;
-  core_->Start();
-}
diff --git a/google_apis/gaia/oauth2_token_service_request.h b/google_apis/gaia/oauth2_token_service_request.h
deleted file mode 100644
index 061a794..0000000
--- a/google_apis/gaia/oauth2_token_service_request.h
+++ /dev/null
@@ -1,108 +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.
-
-#ifndef GOOGLE_APIS_GAIA_OAUTH2_TOKEN_SERVICE_REQUEST_H_
-#define GOOGLE_APIS_GAIA_OAUTH2_TOKEN_SERVICE_REQUEST_H_
-
-#include <memory>
-#include <set>
-#include <string>
-
-#include "base/macros.h"
-#include "base/memory/ref_counted.h"
-#include "base/sequence_checker.h"
-#include "base/single_thread_task_runner.h"
-#include "google_apis/gaia/oauth2_token_service.h"
-
-// OAuth2TokenServiceRequest represents an asynchronous request to an
-// OAuth2TokenService that may live in another thread.
-//
-// An OAuth2TokenServiceRequest can be created and started from any thread.
-class OAuth2TokenServiceRequest : public OAuth2TokenService::Request {
- public:
-  class Core;
-
-  // Interface for providing an OAuth2TokenService.
-  //
-  // Ref-counted so that OAuth2TokenServiceRequest can ensure this object isn't
-  // destroyed out from under the token service task runner thread.  Because
-  // OAuth2TokenServiceRequest has a reference, implementations of
-  // TokenServiceProvider must be capable of being destroyed on the same thread
-  // on which the OAuth2TokenServiceRequest was created.
-  class TokenServiceProvider
-      : public base::RefCountedThreadSafe<TokenServiceProvider> {
-   public:
-    TokenServiceProvider();
-
-    // Returns the task runner on which the token service lives.
-    //
-    // This method may be called from any thread.
-    virtual scoped_refptr<base::SingleThreadTaskRunner>
-        GetTokenServiceTaskRunner() = 0;
-
-    // Returns a pointer to a token service.
-    //
-    // Caller does not own the token service and must not delete it.  The token
-    // service must outlive all instances of OAuth2TokenServiceRequest.
-    //
-    // This method may only be called from the task runner returned by
-    // |GetTokenServiceTaskRunner|.
-    virtual OAuth2TokenService* GetTokenService() = 0;
-
-   protected:
-    friend class base::RefCountedThreadSafe<TokenServiceProvider>;
-    virtual ~TokenServiceProvider();
-  };
-
-  // Creates and starts an access token request for |account_id| and |scopes|.
-  //
-  // |provider| is used to get the OAuth2TokenService.
-  //
-  // |account_id| must not be empty.
-  //
-  // |scopes| must not be empty.
-  //
-  // |consumer| will be invoked in the same thread that invoked CreateAndStart
-  // and must outlive the returned request object.  Destroying the request
-  // object ensure that |consumer| will not be called.  However, the actual
-  // network activities may not be canceled and the cache in OAuth2TokenService
-  // may be populated with the fetched results.
-  static std::unique_ptr<OAuth2TokenServiceRequest> CreateAndStart(
-      const scoped_refptr<TokenServiceProvider>& provider,
-      const CoreAccountId& account_id,
-      const OAuth2TokenService::ScopeSet& scopes,
-      OAuth2TokenService::Consumer* consumer);
-
-  // Invalidates |access_token| for |account_id| and |scopes|.
-  //
-  // |provider| is used to get the OAuth2TokenService.
-  //
-  // |account_id| must not be empty.
-  //
-  // |scopes| must not be empty.
-  static void InvalidateToken(
-      const scoped_refptr<TokenServiceProvider>& provider,
-      const CoreAccountId& account_id,
-      const OAuth2TokenService::ScopeSet& scopes,
-      const std::string& access_token);
-
-  ~OAuth2TokenServiceRequest() override;
-
-  // OAuth2TokenService::Request.
-  CoreAccountId GetAccountId() const override;
-
- private:
-  OAuth2TokenServiceRequest(const CoreAccountId& account_id);
-
-  void StartWithCore(const scoped_refptr<Core>& core);
-
-  const CoreAccountId account_id_;
-  scoped_refptr<Core> core_;
-
-  SEQUENCE_CHECKER(sequence_checker_);
-
-  DISALLOW_COPY_AND_ASSIGN(OAuth2TokenServiceRequest);
-};
-
-#endif  // GOOGLE_APIS_GAIA_OAUTH2_TOKEN_SERVICE_REQUEST_H_
diff --git a/google_apis/gaia/oauth2_token_service_request_unittest.cc b/google_apis/gaia/oauth2_token_service_request_unittest.cc
deleted file mode 100644
index 96ffb30d..0000000
--- a/google_apis/gaia/oauth2_token_service_request_unittest.cc
+++ /dev/null
@@ -1,282 +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.
-
-#include "google_apis/gaia/oauth2_token_service_request.h"
-
-#include <set>
-#include <string>
-#include <vector>
-
-#include "base/bind.h"
-#include "base/location.h"
-#include "base/message_loop/message_loop.h"
-#include "base/run_loop.h"
-#include "base/single_thread_task_runner.h"
-#include "base/threading/thread.h"
-#include "base/threading/thread_task_runner_handle.h"
-#include "google_apis/gaia/fake_oauth2_token_service.h"
-#include "google_apis/gaia/google_service_auth_error.h"
-#include "google_apis/gaia/oauth2_token_service.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace {
-
-const char kAccessToken[] = "access_token";
-const char kAccountIdString[] = "test_user@gmail.com";
-const char kScope[] = "SCOPE";
-
-class TestingOAuth2TokenServiceConsumer : public OAuth2TokenService::Consumer {
- public:
-  TestingOAuth2TokenServiceConsumer();
-  ~TestingOAuth2TokenServiceConsumer() override;
-
-  void OnGetTokenSuccess(
-      const OAuth2TokenService::Request* request,
-      const OAuth2AccessTokenConsumer::TokenResponse& token_response) override;
-  void OnGetTokenFailure(const OAuth2TokenService::Request* request,
-                         const GoogleServiceAuthError& error) override;
-
-  int num_get_token_success_;
-  int num_get_token_failure_;
-  std::string last_token_;
-  std::string last_id_token_;
-  GoogleServiceAuthError last_error_;
-};
-
-TestingOAuth2TokenServiceConsumer::TestingOAuth2TokenServiceConsumer()
-    : OAuth2TokenService::Consumer("test"),
-      num_get_token_success_(0),
-      num_get_token_failure_(0),
-      last_error_(GoogleServiceAuthError::AuthErrorNone()) {
-}
-
-TestingOAuth2TokenServiceConsumer::~TestingOAuth2TokenServiceConsumer() {
-}
-
-void TestingOAuth2TokenServiceConsumer::OnGetTokenSuccess(
-    const OAuth2TokenService::Request* request,
-    const OAuth2AccessTokenConsumer::TokenResponse& token_response) {
-  last_token_ = token_response.access_token;
-  last_id_token_ = token_response.id_token;
-  ++num_get_token_success_;
-}
-
-void TestingOAuth2TokenServiceConsumer::OnGetTokenFailure(
-    const OAuth2TokenService::Request* request,
-    const GoogleServiceAuthError& error) {
-  last_error_ = error;
-  ++num_get_token_failure_;
-}
-
-// A mock implementation of an OAuth2TokenService.
-//
-// Use SetResponse to vary the response to token requests.
-class MockOAuth2TokenService : public FakeOAuth2TokenService {
- public:
-  MockOAuth2TokenService();
-  ~MockOAuth2TokenService() override;
-
-  void SetResponse(const GoogleServiceAuthError& error,
-                   const std::string& access_token,
-                   const base::Time& expiration,
-                   const std::string& id_token);
-
-  int num_invalidate_token() const { return num_invalidate_token_; }
-
-  const std::string& last_token_invalidated() const {
-    return last_token_invalidated_;
-  }
-
- protected:
-  void FetchOAuth2Token(
-      RequestImpl* request,
-      const CoreAccountId& account_id,
-      scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory,
-      const std::string& client_id,
-      const std::string& client_secret,
-      const ScopeSet& scopes) override;
-
-  void InvalidateAccessTokenImpl(const CoreAccountId& account_id,
-                                 const std::string& client_id,
-                                 const ScopeSet& scopes,
-                                 const std::string& access_token) override;
-
- private:
-  GoogleServiceAuthError response_error_;
-  std::string response_access_token_;
-  base::Time response_expiration_;
-  std::string response_id_token_;
-  int num_invalidate_token_;
-  std::string last_token_invalidated_;
-};
-
-MockOAuth2TokenService::MockOAuth2TokenService()
-    : response_error_(GoogleServiceAuthError::AuthErrorNone()),
-      response_access_token_(kAccessToken),
-      response_expiration_(base::Time::Max()),
-      num_invalidate_token_(0) {
-}
-
-MockOAuth2TokenService::~MockOAuth2TokenService() {
-}
-
-void MockOAuth2TokenService::SetResponse(const GoogleServiceAuthError& error,
-                                         const std::string& access_token,
-                                         const base::Time& expiration,
-                                         const std::string& id_token) {
-  response_error_ = error;
-  response_access_token_ = access_token;
-  response_expiration_ = expiration;
-  response_id_token_ = id_token;
-}
-
-void MockOAuth2TokenService::FetchOAuth2Token(
-    RequestImpl* request,
-    const CoreAccountId& account_id,
-    scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory,
-    const std::string& client_id,
-    const std::string& client_secret,
-    const ScopeSet& scopes) {
-  base::ThreadTaskRunnerHandle::Get()->PostTask(
-      FROM_HERE,
-      base::BindOnce(&OAuth2TokenService::RequestImpl::InformConsumer,
-                     request->AsWeakPtr(), response_error_,
-                     OAuth2AccessTokenConsumer::TokenResponse(
-                         response_access_token_, response_expiration_,
-                         response_id_token_)));
-}
-
-void MockOAuth2TokenService::InvalidateAccessTokenImpl(
-    const CoreAccountId& account_id,
-    const std::string& client_id,
-    const ScopeSet& scopes,
-    const std::string& access_token) {
-  ++num_invalidate_token_;
-  last_token_invalidated_ = access_token;
-}
-
-class OAuth2TokenServiceRequestTest : public testing::Test {
- public:
-  OAuth2TokenServiceRequestTest() : kAccountId_(kAccountIdString) {}
-  void SetUp() override;
-  void TearDown() override;
-
- protected:
-  class Provider : public OAuth2TokenServiceRequest::TokenServiceProvider {
-   public:
-    Provider(const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
-             OAuth2TokenService* token_service);
-
-    scoped_refptr<base::SingleThreadTaskRunner> GetTokenServiceTaskRunner()
-        override;
-    OAuth2TokenService* GetTokenService() override;
-
-   private:
-    ~Provider() override;
-
-    scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
-    OAuth2TokenService* token_service_;
-  };
-
-  const CoreAccountId kAccountId_;
-  base::MessageLoop ui_loop_;
-  OAuth2TokenService::ScopeSet scopes_;
-  std::unique_ptr<MockOAuth2TokenService> oauth2_service_;
-  scoped_refptr<OAuth2TokenServiceRequest::TokenServiceProvider> provider_;
-  TestingOAuth2TokenServiceConsumer consumer_;
-};
-
-void OAuth2TokenServiceRequestTest::SetUp() {
-  scopes_.insert(kScope);
-  oauth2_service_.reset(new MockOAuth2TokenService);
-  oauth2_service_->AddAccount(kAccountId_);
-  provider_ =
-      new Provider(base::ThreadTaskRunnerHandle::Get(), oauth2_service_.get());
-}
-
-void OAuth2TokenServiceRequestTest::TearDown() {
-  // Run the loop to execute any pending tasks that may free resources.
-  base::RunLoop().RunUntilIdle();
-}
-
-OAuth2TokenServiceRequestTest::Provider::Provider(
-    const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
-    OAuth2TokenService* token_service)
-    : task_runner_(task_runner), token_service_(token_service) {
-}
-
-scoped_refptr<base::SingleThreadTaskRunner>
-OAuth2TokenServiceRequestTest::Provider::GetTokenServiceTaskRunner() {
-  return task_runner_;
-}
-
-OAuth2TokenService* OAuth2TokenServiceRequestTest::Provider::GetTokenService() {
-  return token_service_;
-}
-
-OAuth2TokenServiceRequestTest::Provider::~Provider() {
-}
-
-TEST_F(OAuth2TokenServiceRequestTest, CreateAndStart_Failure) {
-  oauth2_service_->SetResponse(
-      GoogleServiceAuthError(GoogleServiceAuthError::SERVICE_UNAVAILABLE),
-      std::string(), base::Time(), std::string());
-  std::unique_ptr<OAuth2TokenServiceRequest> request(
-      OAuth2TokenServiceRequest::CreateAndStart(provider_.get(), kAccountId_,
-                                                scopes_, &consumer_));
-  base::RunLoop().RunUntilIdle();
-  EXPECT_EQ(0, consumer_.num_get_token_success_);
-  EXPECT_EQ(1, consumer_.num_get_token_failure_);
-  EXPECT_EQ(GoogleServiceAuthError::SERVICE_UNAVAILABLE,
-            consumer_.last_error_.state());
-  EXPECT_EQ(0, oauth2_service_->num_invalidate_token());
-}
-
-TEST_F(OAuth2TokenServiceRequestTest, CreateAndStart_Success) {
-  std::unique_ptr<OAuth2TokenServiceRequest> request(
-      OAuth2TokenServiceRequest::CreateAndStart(provider_.get(), kAccountId_,
-                                                scopes_, &consumer_));
-  base::RunLoop().RunUntilIdle();
-  EXPECT_EQ(1, consumer_.num_get_token_success_);
-  EXPECT_EQ(0, consumer_.num_get_token_failure_);
-  EXPECT_EQ(kAccessToken, consumer_.last_token_);
-  EXPECT_EQ(0, oauth2_service_->num_invalidate_token());
-}
-
-TEST_F(OAuth2TokenServiceRequestTest,
-       CreateAndStart_DestroyRequestBeforeCompletes) {
-  std::unique_ptr<OAuth2TokenServiceRequest> request(
-      OAuth2TokenServiceRequest::CreateAndStart(provider_.get(), kAccountId_,
-                                                scopes_, &consumer_));
-  request.reset();
-  base::RunLoop().RunUntilIdle();
-  EXPECT_EQ(0, consumer_.num_get_token_success_);
-  EXPECT_EQ(0, consumer_.num_get_token_failure_);
-  EXPECT_EQ(0, oauth2_service_->num_invalidate_token());
-}
-
-TEST_F(OAuth2TokenServiceRequestTest,
-       CreateAndStart_DestroyRequestAfterCompletes) {
-  std::unique_ptr<OAuth2TokenServiceRequest> request(
-      OAuth2TokenServiceRequest::CreateAndStart(provider_.get(), kAccountId_,
-                                                scopes_, &consumer_));
-  base::RunLoop().RunUntilIdle();
-  request.reset();
-  EXPECT_EQ(1, consumer_.num_get_token_success_);
-  EXPECT_EQ(0, consumer_.num_get_token_failure_);
-  EXPECT_EQ(kAccessToken, consumer_.last_token_);
-  EXPECT_EQ(0, oauth2_service_->num_invalidate_token());
-}
-
-TEST_F(OAuth2TokenServiceRequestTest, InvalidateToken) {
-  OAuth2TokenServiceRequest::InvalidateToken(provider_.get(), kAccountId_,
-                                             scopes_, kAccessToken);
-  base::RunLoop().RunUntilIdle();
-  EXPECT_EQ(0, consumer_.num_get_token_success_);
-  EXPECT_EQ(0, consumer_.num_get_token_failure_);
-  EXPECT_EQ(kAccessToken, oauth2_service_->last_token_invalidated());
-  EXPECT_EQ(1, oauth2_service_->num_invalidate_token());
-}
-
-}  // namespace
diff --git a/infra/config/cr-buildbucket.cfg b/infra/config/cr-buildbucket.cfg
index 96ae615..b4a2ef3 100644
--- a/infra/config/cr-buildbucket.cfg
+++ b/infra/config/cr-buildbucket.cfg
@@ -4716,10 +4716,30 @@
 
     # Win
 
-    builders { mixins: "win" name: "WebRTC Chromium FYI Win Builder" }
-    builders { mixins: "win" name: "WebRTC Chromium FYI Win Builder (dbg)" }
-    builders { mixins: "win" name: "WebRTC Chromium FYI Win10 Tester" }
-    builders { mixins: "win" name: "WebRTC Chromium FYI Win7 Tester" }
-    builders { mixins: "win" name: "WebRTC Chromium FYI Win8 Tester" }
+    builders {
+      name: "WebRTC Chromium FYI Win Builder"
+      mixins: "win"
+      dimensions: "os:Windows-10"
+    }
+    builders {
+      name: "WebRTC Chromium FYI Win Builder (dbg)"
+      mixins: "win"
+      dimensions: "os:Windows-10"
+    }
+    builders {
+      name: "WebRTC Chromium FYI Win10 Tester"
+      mixins: "win"
+      dimensions: "os:Windows-10"
+    }
+    builders {
+      name: "WebRTC Chromium FYI Win7 Tester"
+      mixins: "win"
+      dimensions: "os:Windows-7"
+    }
+    builders {
+      name: "WebRTC Chromium FYI Win8 Tester"
+      mixins: "win"
+      dimensions: "os:Windows-8.1"
+    }
   }
 }
diff --git a/ios/chrome/browser/DEPS b/ios/chrome/browser/DEPS
index d4e1ffd9d1..09a6955 100644
--- a/ios/chrome/browser/DEPS
+++ b/ios/chrome/browser/DEPS
@@ -75,9 +75,21 @@
   "+components/signin/core/browser",
   # Use identity_manager.h instead of the below files;
   # see https://groups.google.com/a/chromium.org/d/msg/chromium-dev/dgFLuxqZt1o/iEqkyoQQBwAJ for help and info.
-  "!components/signin/core/browser/fake_profile_oauth2_token_service.h",
-  "!components/signin/core/browser/primary_account_manager.h",
-  "!components/signin/core/browser/primary_account_policy_manager.h",
+  "-components/signin/core/browser/account_fetcher_service.h",
+  "-components/signin/core/browser/account_info_fetcher.h",
+  "-components/signin/core/browser/account_tracker_service.h",
+  "-components/signin/core/browser/child_account_info_fetcher_android.h",
+  "-components/signin/core/browser/fake_profile_oauth2_token_service.h",
+  "-components/signin/core/browser/gaia_cookie_manager_service.h",
+  "-components/signin/core/browser/oauth2_token_service_delegate_android.h",
+  "-components/signin/core/browser/oauth2_multilogin_helper.h",
+  "-components/signin/core/browser/oauth2_multilogin_token_fetcher.h",
+  "-components/signin/core/browser/primary_account_manager.h",
+  "-components/signin/core/browser/primary_account_policy_manager.h",
+  "-components/signin/core/browser/profile_oauth2_token_service.h",
+  "-components/signin/core/browser/profile_oauth2_token_service_delegate_chromeos.h",
+  "-components/signin/core/browser/ubertoken_fetcher_impl.h",
+
   "+components/signin/ios/browser",
   "+components/ssl_errors",
   "+components/suggestions",
diff --git a/ios/chrome/browser/signin/DEPS b/ios/chrome/browser/signin/DEPS
index a5ba9e61..91fd789 100644
--- a/ios/chrome/browser/signin/DEPS
+++ b/ios/chrome/browser/signin/DEPS
@@ -1,4 +1,16 @@
 specific_include_rules = {
+  # IdentityManagerFactory creates IdentityManager instances from internal
+  # dependencies. TODO(crbug.com/974198): Internalize this building and
+  # eliminate the need for these inclusions.
+  "identity_manager_factory.cc": [
+    "+components/signin/core/browser/account_fetcher_service.h",
+    "+components/signin/core/browser/account_tracker_service.h",
+    "+components/signin/core/browser/gaia_cookie_manager_service.h",
+    "+components/signin/core/browser/primary_account_manager.h",
+    "+components/signin/core/browser/primary_account_policy_manager.h",
+    "+components/signin/core/browser/profile_oauth2_token_service.h",
+  ],
+
   # The dependence on the Identity Service implementation should be used *only*
   # for Identity Service creation.
   "identity_service_creator.cc": [
diff --git a/ios/chrome/browser/sync/sync_setup_service.cc b/ios/chrome/browser/sync/sync_setup_service.cc
index 09157017..012a507 100644
--- a/ios/chrome/browser/sync/sync_setup_service.cc
+++ b/ios/chrome/browser/sync/sync_setup_service.cc
@@ -140,8 +140,6 @@
     case GoogleServiceAuthError::UNEXPECTED_SERVICE_RESPONSE:
       break;
     // The following errors are unexpected on iOS.
-    case GoogleServiceAuthError::ACCOUNT_DELETED:
-    case GoogleServiceAuthError::ACCOUNT_DISABLED:
     case GoogleServiceAuthError::SERVICE_ERROR:
     // Conventional value for counting the states, never used.
     case GoogleServiceAuthError::NUM_STATES:
diff --git a/ios/chrome/test/DEPS b/ios/chrome/test/DEPS
index 764eb24..b41d64c 100644
--- a/ios/chrome/test/DEPS
+++ b/ios/chrome/test/DEPS
@@ -11,15 +11,26 @@
   "+components/network_time",
   "+components/prefs",
   "+components/signin/core/browser",
-  "+components/translate",
   # Use identity_manager.h instead of the below files;
   # see https://groups.google.com/a/chromium.org/d/msg/chromium-dev/dgFLuxqZt1o/iEqkyoQQBwAJ for help and info.
+  "-components/signin/core/browser/account_fetcher_service.h",
+  "-components/signin/core/browser/account_info_fetcher.h",
+  "-components/signin/core/browser/account_tracker_service.h",
+  "-components/signin/core/browser/child_account_info_fetcher_android.h",
   "-components/signin/core/browser/fake_profile_oauth2_token_service.h",
-  "-components/signin/core/browser/profile_oauth2_token_service.h",
+  "-components/signin/core/browser/gaia_cookie_manager_service.h",
+  "-components/signin/core/browser/oauth2_token_service_delegate_android.h",
+  "-components/signin/core/browser/oauth2_multilogin_helper.h",
+  "-components/signin/core/browser/oauth2_multilogin_token_fetcher.h",
   "-components/signin/core/browser/primary_account_manager.h",
   "-components/signin/core/browser/primary_account_policy_manager.h",
+  "-components/signin/core/browser/profile_oauth2_token_service.h",
+  "-components/signin/core/browser/profile_oauth2_token_service_delegate_chromeos.h",
+  "-components/signin/core/browser/ubertoken_fetcher_impl.h",
+
   "+components/sync",
   "+components/sync_device_info",
+  "+components/translate",
   "+components/unified_consent",
   "+components/variations",
   "+components/version_info",
diff --git a/ios/web/BUILD.gn b/ios/web/BUILD.gn
index 833318a..6f7ed71 100644
--- a/ios/web/BUILD.gn
+++ b/ios/web/BUILD.gn
@@ -478,7 +478,6 @@
   sources = [
     "web_state/context_menu_params_utils_unittest.mm",
     "web_state/page_display_state_unittest.mm",
-    "web_state/ui/wk_security_origin_util_unittest.mm",
     "web_state/web_state_delegate_bridge_unittest.mm",
     "web_state/web_state_impl_unittest.mm",
     "web_state/web_state_observer_bridge_unittest.mm",
diff --git a/ios/web/web_state/ui/BUILD.gn b/ios/web/web_state/ui/BUILD.gn
index c9922bb8..0b66a6af 100644
--- a/ios/web/web_state/ui/BUILD.gn
+++ b/ios/web/web_state/ui/BUILD.gn
@@ -61,8 +61,8 @@
     "crw_wk_ui_handler.h",
     "crw_wk_ui_handler.mm",
     "crw_wk_ui_handler_delegate.h",
-    "wk_security_origin_util.h",
-    "wk_security_origin_util.mm",
+    "js_window_error_manager.h",
+    "js_window_error_manager.mm",
   ]
 
   libs = [ "WebKit.framework" ]
diff --git a/ios/web/web_state/ui/crw_web_controller.mm b/ios/web/web_state/ui/crw_web_controller.mm
index dd71b3f..1c23acf8e 100644
--- a/ios/web/web_state/ui/crw_web_controller.mm
+++ b/ios/web/web_state/ui/crw_web_controller.mm
@@ -55,12 +55,13 @@
 #import "ios/web/web_state/ui/crw_web_view_proxy_impl.h"
 #import "ios/web/web_state/ui/crw_wk_ui_handler.h"
 #import "ios/web/web_state/ui/crw_wk_ui_handler_delegate.h"
-#import "ios/web/web_state/ui/wk_security_origin_util.h"
+#import "ios/web/web_state/ui/js_window_error_manager.h"
 #import "ios/web/web_state/ui/wk_web_view_configuration_provider.h"
 #import "ios/web/web_state/user_interaction_state.h"
 #import "ios/web/web_state/web_state_impl.h"
 #import "ios/web/web_state/web_view_internal_creation_util.h"
 #import "ios/web/web_view/content_type_util.h"
+#import "ios/web/web_view/wk_security_origin_util.h"
 #import "ios/web/web_view/wk_web_view_util.h"
 #import "net/base/mac/url_conversions.h"
 #include "services/metrics/public/cpp/ukm_builders.h"
@@ -153,6 +154,9 @@
 
   // Manager for favicon JavaScript messages.
   std::unique_ptr<web::FaviconManager> _faviconManager;
+
+  // Manager for window.error message.
+  std::unique_ptr<web::JsWindowErrorManager> _jsWindowErrorManager;
 }
 
 // The WKNavigationDelegate handler class.
@@ -245,13 +249,6 @@
 // may be called multiple times and thus must be idempotent.
 - (void)loadCompleteWithSuccess:(BOOL)loadSuccess
                      forContext:(web::NavigationContextImpl*)context;
-// Acts on a single message from the JS object, parsed from JSON into a
-// DictionaryValue. Returns NO if the format for the message was invalid.
-- (BOOL)respondToMessage:(base::DictionaryValue*)crwMessage
-       userIsInteracting:(BOOL)userIsInteracting
-               originURL:(const GURL&)originURL
-             isMainFrame:(BOOL)isMainFrame
-             senderFrame:(web::WebFrame*)senderFrame;
 // Called when web controller receives a new message from the web page.
 - (void)didReceiveScriptMessage:(WKScriptMessage*)message;
 // Attempts to handle a script message. Returns YES on success, NO otherwise.
@@ -333,6 +330,8 @@
     web::WebFramesManagerImpl::CreateForWebState(_webStateImpl);
     web::FindInPageManagerImpl::CreateForWebState(_webStateImpl);
     _faviconManager = std::make_unique<web::FaviconManager>(_webStateImpl);
+    _jsWindowErrorManager =
+        std::make_unique<web::JsWindowErrorManager>(_webStateImpl);
     _legacyNativeController =
         [[CRWLegacyNativeContentController alloc] initWithWebState:webState];
     _legacyNativeController.delegate = self;
@@ -624,7 +623,7 @@
   [self.UIHandler close];
   [self.JSNavigationHandler close];
   _faviconManager.reset();
-
+  _jsWindowErrorManager.reset();
   self.swipeRecognizerProvider = nil;
   [self.legacyNativeController close];
 
@@ -1385,56 +1384,6 @@
 
 #pragma mark - JavaScript message Helpers (Private)
 
-- (BOOL)respondToMessage:(base::DictionaryValue*)message
-       userIsInteracting:(BOOL)userIsInteracting
-               originURL:(const GURL&)originURL
-             isMainFrame:(BOOL)isMainFrame
-             senderFrame:(web::WebFrame*)senderFrame {
-  std::string command;
-  if (!message->GetString("command", &command)) {
-    DLOG(WARNING) << "JS message parameter not found: command";
-    return NO;
-  }
-
-  SEL handler = [self selectorToHandleJavaScriptCommand:command];
-  if (!handler) {
-    if (self.webStateImpl->OnScriptCommandReceived(command, *message, originURL,
-                                                   userIsInteracting,
-                                                   isMainFrame, senderFrame)) {
-      return YES;
-    }
-    // Message was either unexpected or not correctly handled.
-    // Page is reset as a precaution.
-    DLOG(WARNING) << "Unexpected message received: " << command;
-    return NO;
-  }
-
-  typedef BOOL (*HandlerType)(id, SEL, base::DictionaryValue*, NSDictionary*);
-  HandlerType handlerImplementation =
-      reinterpret_cast<HandlerType>([self methodForSelector:handler]);
-  DCHECK(handlerImplementation);
-  NSMutableDictionary* context =
-      [NSMutableDictionary dictionaryWithObject:@(userIsInteracting)
-                                         forKey:kUserIsInteractingKey];
-  NSURL* originNSURL = net::NSURLWithGURL(originURL);
-  if (originNSURL)
-    context[kOriginURLKey] = originNSURL;
-  context[kIsMainFrame] = @(isMainFrame);
-  return handlerImplementation(self, handler, message, context);
-}
-
-- (SEL)selectorToHandleJavaScriptCommand:(const std::string&)command {
-  static std::map<std::string, SEL>* handlers = nullptr;
-  static dispatch_once_t onceToken;
-  dispatch_once(&onceToken, ^{
-    handlers = new std::map<std::string, SEL>();
-    (*handlers)["window.error"] = @selector(handleWindowErrorMessage:context:);
-  });
-  DCHECK(handlers);
-  auto iter = handlers->find(command);
-  return iter != handlers->end() ? iter->second : nullptr;
-}
-
 - (void)didReceiveScriptMessage:(WKScriptMessage*)message {
   // Broken out into separate method to catch errors.
   if (![self respondToWKScriptMessage:message]) {
@@ -1464,16 +1413,27 @@
     return NO;
   }
 
-  base::DictionaryValue* command = nullptr;
-  if (!message->GetDictionary("crwCommand", &command)) {
+  base::DictionaryValue* crwCommand = nullptr;
+  if (!message->GetDictionary("crwCommand", &crwCommand)) {
     return NO;
   }
-  return [self
-       respondToMessage:command
-      userIsInteracting:_userInteractionState.IsUserInteracting(self.webView)
-              originURL:net::GURLWithNSURL(self.webView.URL)
-            isMainFrame:scriptMessage.frameInfo.mainFrame
-            senderFrame:senderFrame];
+
+  std::string command;
+  if (!crwCommand->GetString("command", &command)) {
+    DLOG(WARNING) << "JS message parameter not found: command";
+    return NO;
+  }
+
+  if (self.webStateImpl->OnScriptCommandReceived(
+          command, *crwCommand, net::GURLWithNSURL(self.webView.URL),
+          _userInteractionState.IsUserInteracting(self.webView),
+          scriptMessage.frameInfo.mainFrame, senderFrame)) {
+    return YES;
+  }
+  // Message was either unexpected or not correctly handled.
+  // Page is reset as a precaution.
+  DLOG(WARNING) << "Unexpected message received: " << command;
+  return NO;
 }
 
 #pragma mark - Web frames management
@@ -1542,24 +1502,6 @@
   }
 }
 
-#pragma mark - JavaScript message handlers
-// Handlers for JavaScript messages. |message| contains a JavaScript command and
-// data relevant to the message, and |context| contains contextual information
-// about web view state needed for some handlers.
-
-// Handles 'window.error' message.
-- (BOOL)handleWindowErrorMessage:(base::DictionaryValue*)message
-                         context:(NSDictionary*)context {
-  std::string errorMessage;
-  if (!message->GetString("message", &errorMessage)) {
-    DLOG(WARNING) << "JS message parameter not found: message";
-    return NO;
-  }
-  DLOG(ERROR) << "JavaScript error: " << errorMessage
-              << " URL:" << [self currentURL].spec();
-  return YES;
-}
-
 #pragma mark - WebUI
 
 // Sets up WebUI for URL.
diff --git a/ios/web/web_state/ui/crw_wk_ui_handler.mm b/ios/web/web_state/ui/crw_wk_ui_handler.mm
index 9952809..0b30802 100644
--- a/ios/web/web_state/ui/crw_wk_ui_handler.mm
+++ b/ios/web/web_state/ui/crw_wk_ui_handler.mm
@@ -12,9 +12,9 @@
 #include "ios/web/public/web_state/web_state_interface_provider.h"
 #import "ios/web/web_state/ui/crw_context_menu_controller.h"
 #import "ios/web/web_state/ui/crw_wk_ui_handler_delegate.h"
-#import "ios/web/web_state/ui/wk_security_origin_util.h"
 #import "ios/web/web_state/user_interaction_state.h"
 #import "ios/web/web_state/web_state_impl.h"
+#import "ios/web/web_view/wk_security_origin_util.h"
 #import "ios/web/webui/mojo_facade.h"
 #import "net/base/mac/url_conversions.h"
 #include "url/gurl.h"
diff --git a/ios/web/web_state/ui/js_window_error_manager.h b/ios/web/web_state/ui/js_window_error_manager.h
new file mode 100644
index 0000000..8073558
--- /dev/null
+++ b/ios/web/web_state/ui/js_window_error_manager.h
@@ -0,0 +1,38 @@
+// Copyright 2019 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef IOS_WEB_WEB_STATE_UI_JS_WINDOW_ERROR_MANAGER_H_
+#define IOS_WEB_WEB_STATE_UI_JS_WINDOW_ERROR_MANAGER_H_
+
+#include "base/macros.h"
+
+namespace base {
+class DictionaryValue;
+}
+class GURL;
+namespace web {
+class WebState;
+class WebFrame;
+
+// Handles "window.error" message from injected JavaScript and DLOG it.
+class JsWindowErrorManager final {
+ public:
+  explicit JsWindowErrorManager(WebState* web_state);
+  ~JsWindowErrorManager();
+
+ private:
+  bool OnJsMessage(const base::DictionaryValue& message,
+                   const GURL& page_url,
+                   bool has_user_gesture,
+                   bool in_main_frame,
+                   WebFrame* sender_frame);
+
+  WebState* web_state_impl_ = nullptr;
+
+  DISALLOW_COPY_AND_ASSIGN(JsWindowErrorManager);
+};
+
+}  // namespace web
+
+#endif  // IOS_WEB_WEB_STATE_UI_JS_WINDOW_ERROR_MANAGER_H_
diff --git a/ios/web/web_state/ui/js_window_error_manager.mm b/ios/web/web_state/ui/js_window_error_manager.mm
new file mode 100644
index 0000000..4ee981f5
--- /dev/null
+++ b/ios/web/web_state/ui/js_window_error_manager.mm
@@ -0,0 +1,54 @@
+// Copyright 2019 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#import "ios/web/web_state/ui/js_window_error_manager.h"
+
+#import "base/values.h"
+#import "ios/web/public/js_messaging/web_frame.h"
+#import "ios/web/public/web_state/web_state.h"
+
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
+namespace {
+const char kCommandPrefix[] = "window";
+}
+
+namespace web {
+
+JsWindowErrorManager::JsWindowErrorManager(WebState* web_state)
+    : web_state_impl_(web_state) {
+  web_state_impl_->AddScriptCommandCallback(
+      base::BindRepeating(&JsWindowErrorManager::OnJsMessage,
+                          base::Unretained(this)),
+      kCommandPrefix);
+}
+
+JsWindowErrorManager::~JsWindowErrorManager() {
+  web_state_impl_->RemoveScriptCommandCallback(kCommandPrefix);
+}
+
+bool JsWindowErrorManager::OnJsMessage(const base::DictionaryValue& message,
+                                       const GURL& page_url,
+                                       bool has_user_gesture,
+                                       bool form_in_main_frame,
+                                       WebFrame* sender_frame) {
+  DCHECK(sender_frame->IsMainFrame());
+  std::string error_message;
+  if (!message.GetString("message", &error_message)) {
+    DLOG(WARNING) << "JS message parameter not found: message";
+    return NO;
+  }
+  web::URLVerificationTrustLevel trust_level =
+      web::URLVerificationTrustLevel::kNone;
+  const GURL current_url = web_state_impl_->GetCurrentURL(&trust_level);
+
+  DLOG(ERROR) << "JavaScript error: " << error_message
+              << " URL:" << current_url.spec();
+
+  return true;
+}
+
+}  // namespace web
diff --git a/ios/web/web_view/BUILD.gn b/ios/web/web_view/BUILD.gn
index b1c42cb..aca0f14a 100644
--- a/ios/web/web_view/BUILD.gn
+++ b/ios/web/web_view/BUILD.gn
@@ -10,6 +10,8 @@
     "content_type_util.h",
     "error_translation_util.h",
     "error_translation_util.mm",
+    "wk_security_origin_util.h",
+    "wk_security_origin_util.mm",
     "wk_web_view_util.h",
     "wk_web_view_util.mm",
   ]
@@ -42,6 +44,7 @@
   sources = [
     "content_type_util_unittest.cc",
     "error_translation_util_unittest.mm",
+    "wk_security_origin_util_unittest.mm",
     "wk_web_view_util_unittest.mm",
   ]
 }
diff --git a/ios/web/web_state/ui/wk_security_origin_util.h b/ios/web/web_view/wk_security_origin_util.h
similarity index 70%
rename from ios/web/web_state/ui/wk_security_origin_util.h
rename to ios/web/web_view/wk_security_origin_util.h
index 91e5d49..42d1588 100644
--- a/ios/web/web_state/ui/wk_security_origin_util.h
+++ b/ios/web/web_view/wk_security_origin_util.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef IOS_WEB_WEB_STATE_UI_WK_SECURITY_ORIGIN_UTIL_H_
-#define IOS_WEB_WEB_STATE_UI_WK_SECURITY_ORIGIN_UTIL_H_
+#ifndef IOS_WEB_WEB_VIEW_WK_SECURITY_ORIGIN_UTIL_H_
+#define IOS_WEB_WEB_VIEW_WK_SECURITY_ORIGIN_UTIL_H_
 
 #include "url/gurl.h"
 
@@ -17,4 +17,4 @@
 
 }  // namespace web
 
-#endif  // IOS_WEB_WEB_STATE_UI_WK_SECURITY_ORIGIN_UTIL_H_
+#endif  // IOS_WEB_WEB_VIEW_WK_SECURITY_ORIGIN_UTIL_H_
diff --git a/ios/web/web_state/ui/wk_security_origin_util.mm b/ios/web/web_view/wk_security_origin_util.mm
similarity index 94%
rename from ios/web/web_state/ui/wk_security_origin_util.mm
rename to ios/web/web_view/wk_security_origin_util.mm
index 136d073..f100eb0 100644
--- a/ios/web/web_state/ui/wk_security_origin_util.mm
+++ b/ios/web/web_view/wk_security_origin_util.mm
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#import "ios/web/web_state/ui/wk_security_origin_util.h"
+#import "ios/web/web_view/wk_security_origin_util.h"
 
 #import <WebKit/WebKit.h>
 
diff --git a/ios/web/web_state/ui/wk_security_origin_util_unittest.mm b/ios/web/web_view/wk_security_origin_util_unittest.mm
similarity index 97%
rename from ios/web/web_state/ui/wk_security_origin_util_unittest.mm
rename to ios/web/web_view/wk_security_origin_util_unittest.mm
index 6732663..73e2156e 100644
--- a/ios/web/web_state/ui/wk_security_origin_util_unittest.mm
+++ b/ios/web/web_view/wk_security_origin_util_unittest.mm
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#import "ios/web/web_state/ui/wk_security_origin_util.h"
+#import "ios/web/web_view/wk_security_origin_util.h"
 
 #import <WebKit/WebKit.h>
 
diff --git a/ios/web_view/internal/DEPS b/ios/web_view/internal/DEPS
index 8c4977435f..3bdfe0bb 100644
--- a/ios/web_view/internal/DEPS
+++ b/ios/web_view/internal/DEPS
@@ -23,8 +23,21 @@
   "+components/signin/core",
   # Use identity_manager.h instead of the below files;
   # see https://groups.google.com/a/chromium.org/d/msg/chromium-dev/dgFLuxqZt1o/iEqkyoQQBwAJ for help and info.
-  "!components/signin/core/browser/fake_profile_oauth2_token_service.h",
-  "!components/signin/core/browser/primary_account_manager.h",
+  "-components/signin/core/browser/account_fetcher_service.h",
+  "-components/signin/core/browser/account_info_fetcher.h",
+  "-components/signin/core/browser/account_tracker_service.h",
+  "-components/signin/core/browser/child_account_info_fetcher_android.h",
+  "-components/signin/core/browser/fake_profile_oauth2_token_service.h",
+  "-components/signin/core/browser/gaia_cookie_manager_service.h",
+  "-components/signin/core/browser/oauth2_token_service_delegate_android.h",
+  "-components/signin/core/browser/oauth2_multilogin_helper.h",
+  "-components/signin/core/browser/oauth2_multilogin_token_fetcher.h",
+  "-components/signin/core/browser/primary_account_manager.h",
+  "-components/signin/core/browser/primary_account_policy_manager.h",
+  "-components/signin/core/browser/profile_oauth2_token_service.h",
+  "-components/signin/core/browser/profile_oauth2_token_service_delegate_chromeos.h",
+  "-components/signin/core/browser/ubertoken_fetcher_impl.h",
+
   "+components/signin/ios",
   "+components/ssl_errors",
   "+components/strings/grit",
diff --git a/ios/web_view/internal/signin/DEPS b/ios/web_view/internal/signin/DEPS
new file mode 100644
index 0000000..dbd2379
--- /dev/null
+++ b/ios/web_view/internal/signin/DEPS
@@ -0,0 +1,13 @@
+specific_include_rules = {
+  # IdentityManagerFactory creates IdentityManager instances from internal
+  # dependencies. TODO(crbug.com/974198): Internalize this building and
+  # eliminate the need for these inclusions.
+  "web_view_identity_manager_factory.mm": [
+    "+components/signin/core/browser/account_fetcher_service.h",
+    "+components/signin/core/browser/account_tracker_service.h",
+    "+components/signin/core/browser/gaia_cookie_manager_service.h",
+    "+components/signin/core/browser/primary_account_manager.h",
+    "+components/signin/core/browser/primary_account_policy_manager.h",
+    "+components/signin/core/browser/profile_oauth2_token_service.h",
+  ],
+}
diff --git a/ios/web_view/internal/sync/cwv_sync_controller.mm b/ios/web_view/internal/sync/cwv_sync_controller.mm
index 8cf7eb2..a095b171 100644
--- a/ios/web_view/internal/sync/cwv_sync_controller.mm
+++ b/ios/web_view/internal/sync/cwv_sync_controller.mm
@@ -45,8 +45,6 @@
     case GoogleServiceAuthError::UNEXPECTED_SERVICE_RESPONSE:
       return CWVSyncErrorUnexpectedServiceResponse;
     // The following errors are unexpected on iOS.
-    case GoogleServiceAuthError::ACCOUNT_DELETED:
-    case GoogleServiceAuthError::ACCOUNT_DISABLED:
     case GoogleServiceAuthError::SERVICE_ERROR:
     case GoogleServiceAuthError::NUM_STATES:
       NOTREACHED();
diff --git a/media/capture/video/chromeos/camera_device_delegate.cc b/media/capture/video/chromeos/camera_device_delegate.cc
index 176cae3..01711828 100644
--- a/media/capture/video/chromeos/camera_device_delegate.cc
+++ b/media/capture/video/chromeos/camera_device_delegate.cc
@@ -447,6 +447,15 @@
 void CameraDeviceDelegate::OnOpenedDevice(int32_t result) {
   DCHECK(ipc_task_runner_->BelongsToCurrentThread());
 
+  if (device_context_ == nullptr) {
+    // The OnOpenedDevice() might be called after the camera device already
+    // closed by StopAndDeAllocate(), because |camera_hal_delegate_| and
+    // |device_ops_| are on different IPC channels. In such case,
+    // OnMojoConnectionError() might call OnClosed() and the
+    // |device_context_| is cleared, so we just return here.
+    return;
+  }
+
   if (device_context_->GetState() != CameraDeviceContext::State::kStarting) {
     if (device_context_->GetState() == CameraDeviceContext::State::kError) {
       // In case of camera open failed, the HAL can terminate the Mojo channel
diff --git a/media/capture/video/chromeos/request_manager.cc b/media/capture/video/chromeos/request_manager.cc
index a867e1d..91e4f22 100644
--- a/media/capture/video/chromeos/request_manager.cc
+++ b/media/capture/video/chromeos/request_manager.cc
@@ -34,10 +34,6 @@
     StreamType::kYUVInput, StreamType::kJpegOutput};
 }  // namespace
 
-ReprocessTasksInfo::ReprocessTasksInfo() = default;
-
-ReprocessTasksInfo::~ReprocessTasksInfo() = default;
-
 RequestManager::RequestManager(
     cros::mojom::Camera3CallbackOpsRequest callback_ops_request,
     std::unique_ptr<StreamCaptureInterface> capture_interface,
@@ -167,6 +163,21 @@
   AddOrUpdateMetadataEntry(settings, std::move(e));
 }
 
+void RequestManager::SetSensorTimestamp(
+    cros::mojom::CameraMetadataPtr* settings,
+    uint64_t shutter_timestamp) {
+  std::vector<uint8_t> sensor_timestamp(sizeof(int64_t));
+  *reinterpret_cast<int64_t*>(sensor_timestamp.data()) =
+      base::checked_cast<int64_t>(shutter_timestamp);
+  cros::mojom::CameraMetadataEntryPtr e =
+      cros::mojom::CameraMetadataEntry::New();
+  e->tag = cros::mojom::CameraMetadataTag::ANDROID_SENSOR_TIMESTAMP;
+  e->type = cros::mojom::EntryType::TYPE_INT64;
+  e->count = 1;
+  e->data = sensor_timestamp;
+  AddOrUpdateMetadataEntry(settings, std::move(e));
+}
+
 void RequestManager::PrepareCaptureRequest() {
   DCHECK(ipc_task_runner_->BelongsToCurrentThread());
 
@@ -250,17 +261,17 @@
     TakePhotoCallback* callback,
     base::Optional<uint64_t>* input_buffer_id,
     cros::mojom::Effect* reprocess_effect) {
-  if (buffer_id_reprocess_tasks_map_.empty() ||
+  if (buffer_id_reprocess_job_info_map_.empty() ||
       !stream_buffer_manager_->HasFreeBuffers(kYUVReprocessStreams)) {
     return false;
   }
 
   // Consume reprocess task.
-  ReprocessTaskQueue* reprocess_task_queue;
-  for (auto& it : buffer_id_reprocess_tasks_map_) {
+  ReprocessJobInfo* reprocess_job_info;
+  for (auto& it : buffer_id_reprocess_job_info_map_) {
     if (processing_buffer_ids_.count(it.first) == 0) {
       *input_buffer_id = it.first;
-      reprocess_task_queue = &it.second;
+      reprocess_job_info = &it.second;
       break;
     }
   }
@@ -269,12 +280,14 @@
     return false;
   }
 
+  ReprocessTaskQueue* reprocess_task_queue = &reprocess_job_info->task_queue;
   ReprocessTask task = std::move(reprocess_task_queue->front());
   reprocess_task_queue->pop();
 
   stream_types->insert(kYUVReprocessStreams);
   // Prepare metadata by adding extra metadata.
   *settings = repeating_request_settings_.Clone();
+  SetSensorTimestamp(settings, reprocess_job_info->shutter_timestamp);
   SetJpegOrientation(settings);
   for (auto& metadata : task.extra_metadata) {
     AddOrUpdateMetadataEntry(settings, std::move(metadata));
@@ -285,7 +298,7 @@
 
   // Remove the mapping from map if all tasks consumed.
   if (reprocess_task_queue->empty()) {
-    buffer_id_reprocess_tasks_map_.erase(**input_buffer_id);
+    buffer_id_reprocess_job_info_map_.erase(**input_buffer_id);
   }
   return true;
 }
@@ -536,6 +549,7 @@
       return;
     }
     CaptureResult& pending_result = pending_results_[frame_number];
+    pending_result.shutter_timestamp = shutter_time;
     // Shutter timestamp is in ns.
     base::TimeTicks reference_time =
         base::TimeTicks() +
@@ -704,15 +718,19 @@
         processing_buffer_ids_.erase(*pending_result.input_buffer_id);
 
         // If all reprocess tasks are done for this buffer, release the buffer.
-        if (!base::Contains(buffer_id_reprocess_tasks_map_,
+        if (!base::Contains(buffer_id_reprocess_job_info_map_,
                             *pending_result.input_buffer_id)) {
           stream_buffer_manager_->ReleaseBuffer(
               StreamType::kYUVOutput, *pending_result.input_buffer_id);
         }
       }
     } else if (stream_type == StreamType::kYUVOutput) {
-      buffer_id_reprocess_tasks_map_[buffer_id] =
-          std::move(frame_number_reprocess_tasks_map_[frame_number]);
+      DCHECK_GT(pending_result.shutter_timestamp, 0UL);
+      ReprocessJobInfo reprocess_job_info(
+          std::move(frame_number_reprocess_tasks_map_[frame_number]),
+          pending_result.shutter_timestamp);
+      buffer_id_reprocess_job_info_map_.emplace(buffer_id,
+                                                std::move(reprocess_job_info));
       frame_number_reprocess_tasks_map_.erase(frame_number);
 
       // Don't release the buffer since we will need it as input buffer for
@@ -825,4 +843,14 @@
 
 RequestManager::CaptureResult::~CaptureResult() = default;
 
+RequestManager::ReprocessJobInfo::ReprocessJobInfo(ReprocessTaskQueue queue,
+                                                   uint64_t timestamp)
+    : task_queue(std::move(queue)), shutter_timestamp(timestamp) {}
+
+RequestManager::ReprocessJobInfo::ReprocessJobInfo(ReprocessJobInfo&& info)
+    : task_queue(std::move(info.task_queue)),
+      shutter_timestamp(info.shutter_timestamp) {}
+
+RequestManager::ReprocessJobInfo::~ReprocessJobInfo() = default;
+
 }  // namespace media
diff --git a/media/capture/video/chromeos/request_manager.h b/media/capture/video/chromeos/request_manager.h
index d6532c7b..c9277f9a 100644
--- a/media/capture/video/chromeos/request_manager.h
+++ b/media/capture/video/chromeos/request_manager.h
@@ -42,13 +42,6 @@
 // Maximum configured streams could contain two optional YUV streams.
 constexpr int32_t kMaxConfiguredStreams = 4;
 
-struct ReprocessTasksInfo {
-  ReprocessTasksInfo();
-  ~ReprocessTasksInfo();
-  uint64_t input_buffer_id;
-  ReprocessTaskQueue task_queue;
-};
-
 // Interface that provides API to let Camera3AController to update the metadata
 // that will be sent with capture request.
 class CAPTURE_EXPORT CaptureMetadataDispatcher {
@@ -96,6 +89,8 @@
   struct CaptureResult {
     CaptureResult();
     ~CaptureResult();
+    // The shutter timestamp in nanoseconds.
+    uint64_t shutter_timestamp;
     // |reference_time| and |timestamp| are derived from the shutter time of
     // this frame.  They are be passed to |client_->OnIncomingCapturedData|
     // along with the |buffers| when the captured frame is submitted.
@@ -202,9 +197,24 @@
  private:
   friend class RequestManagerTest;
 
+  // ReprocessJobInfo holds the queued reprocess tasks and associated metadata
+  // for a given YUVInput buffer.
+  struct ReprocessJobInfo {
+    ReprocessJobInfo(ReprocessTaskQueue queue, uint64_t timestamp);
+    ReprocessJobInfo(ReprocessJobInfo&& info);
+    ~ReprocessJobInfo();
+
+    ReprocessTaskQueue task_queue;
+    uint64_t shutter_timestamp;
+  };
+
   // Puts Jpeg orientation information into the metadata.
   void SetJpegOrientation(cros::mojom::CameraMetadataPtr* settings);
 
+  // Puts sensor timestamp into the metadata for reprocess request.
+  void SetSensorTimestamp(cros::mojom::CameraMetadataPtr* settings,
+                          uint64_t shutter_timestamp);
+
   // Prepares a capture request by mixing repeating request with one-shot
   // request if it exists. If there are reprocess requests in the queue, just
   // build the reprocess capture request without mixing the repeating request.
@@ -327,9 +337,9 @@
   std::queue<base::OnceCallback<void(int, mojom::BlobPtr)>>
       take_photo_callback_queue_;
 
-  // Map that maps buffer id to reprocess task queue. If all reprocess tasks for
+  // Map that maps buffer id to reprocess task info. If all reprocess tasks for
   // specific buffer id are all consumed, release that buffer.
-  std::map<uint64_t, ReprocessTaskQueue> buffer_id_reprocess_tasks_map_;
+  std::map<uint64_t, ReprocessJobInfo> buffer_id_reprocess_job_info_map_;
 
   // Map that maps frame number to reprocess task queue. We should consume the
   // content inside this map when preparing capture request.
diff --git a/media/gpu/v4l2/v4l2_device.cc b/media/gpu/v4l2/v4l2_device.cc
index ff9efa7..58df305 100644
--- a/media/gpu/v4l2/v4l2_device.cc
+++ b/media/gpu/v4l2/v4l2_device.cc
@@ -1442,7 +1442,7 @@
     return base::nullopt;
   }
   if (num_buffers > num_color_planes) {
-    VLOG(1) << "pix_mp.um_planes: " << num_buffers
+    VLOG(1) << "pix_mp.num_planes: " << num_buffers
             << " should not be larger than NumPlanes("
             << VideoPixelFormatToString(video_format)
             << "): " << num_color_planes;
@@ -1470,7 +1470,7 @@
         // The height is half of Y plane.
         planes.emplace_back(y_stride, y_stride_abs * pix_mp.height,
                             y_stride_abs * pix_mp.height / 2);
-        DCHECK_EQ(3u, planes.size());
+        DCHECK_EQ(2u, planes.size());
         break;
       case V4L2_PIX_FMT_YUV420:
       case V4L2_PIX_FMT_YVU420: {
diff --git a/media/gpu/vaapi/vaapi_video_decoder.cc b/media/gpu/vaapi/vaapi_video_decoder.cc
index ab95061..716fbafa 100644
--- a/media/gpu/vaapi/vaapi_video_decoder.cc
+++ b/media/gpu/vaapi/vaapi_video_decoder.cc
@@ -85,22 +85,32 @@
 VaapiVideoDecoder::~VaapiVideoDecoder() {}
 
 std::string VaapiVideoDecoder::GetDisplayName() const {
+  DCHECK_CALLED_ON_VALID_SEQUENCE(client_sequence_checker_);
+
   return "VaapiVideoDecoder";
 }
 
 bool VaapiVideoDecoder::IsPlatformDecoder() const {
+  DCHECK_CALLED_ON_VALID_SEQUENCE(client_sequence_checker_);
+
   return true;
 }
 
 bool VaapiVideoDecoder::NeedsBitstreamConversion() const {
+  DCHECK_CALLED_ON_VALID_SEQUENCE(client_sequence_checker_);
+
   return needs_bitstream_conversion_;
 }
 
 bool VaapiVideoDecoder::CanReadWithoutStalling() const {
+  DCHECK_CALLED_ON_VALID_SEQUENCE(client_sequence_checker_);
+
   return frame_pool_ && !frame_pool_->IsExhausted();
 }
 
 int VaapiVideoDecoder::GetMaxDecodeRequests() const {
+  DCHECK_CALLED_ON_VALID_SEQUENCE(client_sequence_checker_);
+
   return kMaxDecodeRequests;
 }
 
diff --git a/media/midi/midi_manager.cc b/media/midi/midi_manager.cc
index 0029928..e568c3c6 100644
--- a/media/midi/midi_manager.cc
+++ b/media/midi/midi_manager.cc
@@ -20,10 +20,6 @@
 using midi::mojom::PortState;
 using midi::mojom::Result;
 
-// If many users have more devices, this number will be increased.
-// But the number is expected to be big enough for now.
-constexpr Sample kMaxUmaDevices = 31;
-
 // Used to count events for usage histogram. The item order should not be
 // changed, and new items should be just appended.
 enum class Usage {
@@ -34,9 +30,10 @@
   INITIALIZED,
   INPUT_PORT_ADDED,
   OUTPUT_PORT_ADDED,
+  ERROR_OBSERVED,
 
   // New items should be inserted here, and |MAX| should point the last item.
-  MAX = OUTPUT_PORT_ADDED,
+  MAX = ERROR_OBSERVED,
 };
 
 // Used to count events for transaction usage histogram. The item order should
@@ -71,8 +68,8 @@
     session_thread_runner_ = nullptr;
   }
 
-  UMA_HISTOGRAM_ENUMERATION("Media.Midi.ResultOnShutdown", result_,
-                            static_cast<Sample>(Result::MAX) + 1);
+  if (result_ == Result::INITIALIZATION_ERROR)
+    ReportUsage(Usage::ERROR_OBSERVED);
 
   UMA_HISTOGRAM_ENUMERATION(
       "Media.Midi.SendReceiveUsage",
@@ -203,11 +200,6 @@
     return;
   DCHECK(session_thread_runner_->BelongsToCurrentThread());
 
-  UMA_HISTOGRAM_ENUMERATION("Media.Midi.InputPorts", input_ports_.size(),
-                            kMaxUmaDevices + 1);
-  UMA_HISTOGRAM_ENUMERATION("Media.Midi.OutputPorts", output_ports_.size(),
-                            kMaxUmaDevices + 1);
-
   DCHECK(clients_.empty());
   initialization_state_ = InitializationState::COMPLETED;
   result_ = result;
diff --git a/media/midi/midi_service.mojom b/media/midi/midi_service.mojom
index 420f44aa..ab49b73 100644
--- a/media/midi/midi_service.mojom
+++ b/media/midi/midi_service.mojom
@@ -11,26 +11,12 @@
   OK,
   NOT_SUPPORTED,
   INITIALIZATION_ERROR,
-
-  // New code should be inserted here so that existing members keep the same
-  // assigned value. //tools/metrics/histograms/histograms.xml contains a enum
-  // entry that should be consistent with enum Result.
-
-  // |MAX| is used in content/common/media/midi_messages.h with
-  // IPC_ENUM_TRAITS_MAX_VALUE macro. Keep the value up to date. Otherwise
-  // a new value can not be passed to the renderer.
-  // TODO(toyoshim): Remove |MAX| once IPC is replaced with Mojo.
-  // http://crbug.com/582327
-  MAX = INITIALIZATION_ERROR,
 };
 
 enum PortState {
   DISCONNECTED,
   CONNECTED,
   OPENED,
-  // TODO(toyosim): Remove |LAST| once IPC is replaced with Mojo.
-  // http://crbug.com/582327
-  LAST = OPENED,
 };
 
 struct PortInfo {
diff --git a/sandbox/win/src/policy_target_test.cc b/sandbox/win/src/policy_target_test.cc
index 39b5afb4..e69ff4f 100644
--- a/sandbox/win/src/policy_target_test.cc
+++ b/sandbox/win/src/policy_target_test.cc
@@ -2,7 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "base/memory/shared_memory.h"
+#include "base/memory/read_only_shared_memory_region.h"
+#include "base/memory/writable_shared_memory_region.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/string_piece.h"
 #include "base/win/scoped_process_information.h"
@@ -404,31 +405,30 @@
   ASSERT_TRUE(broker);
 
   base::StringPiece contents = "Hello World";
-  std::string name = "TestSharedMemory";
-  base::SharedMemoryCreateOptions options;
-  options.size = contents.size();
-  options.share_read_only = true;
-  options.name_deprecated = &name;
-  base::SharedMemory writable_shmem;
-  ASSERT_TRUE(writable_shmem.Create(options));
-  ASSERT_TRUE(writable_shmem.Map(options.size));
-  memcpy(writable_shmem.memory(), contents.data(), contents.size());
-
-  base::SharedMemory read_only_view;
-  ASSERT_TRUE(read_only_view.Open(name, true));
+  base::WritableSharedMemoryRegion writable_region =
+      base::WritableSharedMemoryRegion::Create(contents.size());
+  ASSERT_TRUE(writable_region.IsValid());
+  base::WritableSharedMemoryMapping writable_mapping = writable_region.Map();
+  ASSERT_TRUE(writable_mapping.IsValid());
+  memcpy(writable_mapping.memory(), contents.data(), contents.size());
 
   // Get the path to the sandboxed app.
   wchar_t prog_name[MAX_PATH];
   GetModuleFileNameW(nullptr, prog_name, MAX_PATH);
 
+  base::ReadOnlySharedMemoryRegion read_only_region =
+      base::WritableSharedMemoryRegion::ConvertToReadOnly(
+          std::move(writable_region));
+  ASSERT_TRUE(read_only_region.IsValid());
+
   scoped_refptr<TargetPolicy> policy = broker->CreatePolicy();
-  policy->AddHandleToShare(read_only_view.handle().GetHandle());
+  policy->AddHandleToShare(read_only_region.GetPlatformHandle());
 
   base::string16 arguments(L"\"");
   arguments += prog_name;
   arguments += L"\" -child 0 shared_memory_handle ";
   arguments += base::NumberToString16(
-      base::win::HandleToUint32(read_only_view.handle().GetHandle()));
+      base::win::HandleToUint32(read_only_region.GetPlatformHandle()));
 
   // Launch the app.
   ResultCode result = SBOX_ALL_OK;
diff --git a/sandbox/win/src/process_mitigations_win32k_dispatcher.cc b/sandbox/win/src/process_mitigations_win32k_dispatcher.cc
index d37f5457..485c36d 100644
--- a/sandbox/win/src/process_mitigations_win32k_dispatcher.cc
+++ b/sandbox/win/src/process_mitigations_win32k_dispatcher.cc
@@ -6,7 +6,8 @@
 
 #include <algorithm>
 
-#include "base/memory/shared_memory.h"
+#include "base/memory/platform_shared_memory_region.h"
+#include "base/memory/unsafe_shared_memory_region.h"
 #include "base/strings/string16.h"
 #include "base/unguessable_token.h"
 #include "base/win/windows_version.h"
@@ -20,18 +21,27 @@
 
 namespace {
 
-base::SharedMemoryHandle GetSharedMemoryHandle(const ClientInfo& client_info,
-                                               HANDLE handle,
-                                               size_t size) {
-  HANDLE result_handle = nullptr;
+base::UnsafeSharedMemoryRegion GetSharedMemoryRegion(
+    const ClientInfo& client_info,
+    HANDLE handle,
+    size_t size) {
+  HANDLE dup_handle = nullptr;
   intptr_t handle_int = reinterpret_cast<intptr_t>(handle);
   if (handle_int <= 0 ||
       !::DuplicateHandle(client_info.process, handle, ::GetCurrentProcess(),
-                         &result_handle, 0, false, DUPLICATE_SAME_ACCESS)) {
-    result_handle = nullptr;
+                         &dup_handle, 0, false, DUPLICATE_SAME_ACCESS)) {
+    return {};
   }
-  return base::SharedMemoryHandle(result_handle, size,
-                                  base::UnguessableToken::Create());
+  // The raw handle returned from ::DuplicateHandle() must be wrapped in a
+  // base::PlatformSharedMemoryRegion.
+  base::subtle::PlatformSharedMemoryRegion platform_region =
+      base::subtle::PlatformSharedMemoryRegion::Take(
+          base::win::ScopedHandle(dup_handle),
+          base::subtle::PlatformSharedMemoryRegion::Mode::kUnsafe, size,
+          base::UnguessableToken::Create());
+  // |platform_region| can now be wrapped in a base::UnsafeSharedMemoryRegion.
+  return base::UnsafeSharedMemoryRegion::Deserialize(
+      std::move(platform_region));
 }
 
 }  // namespace
@@ -413,22 +423,22 @@
     ipc->return_info.nt_status = STATUS_ACCESS_DENIED;
     return true;
   }
-  base::SharedMemoryHandle handle = GetSharedMemoryHandle(
+  base::UnsafeSharedMemoryRegion region = GetSharedMemoryRegion(
       *ipc->client_info, shared_buffer_handle, shared_buffer_size);
-  if (!handle.IsValid()) {
+  if (!region.IsValid()) {
     ipc->return_info.nt_status = STATUS_ACCESS_DENIED;
     return true;
   }
-  base::SharedMemory cert_data(handle, false);
-  if (!cert_data.Map(shared_buffer_size)) {
+  base::WritableSharedMemoryMapping cert_data = region.Map();
+  if (!cert_data.IsValid()) {
     ipc->return_info.nt_status = STATUS_ACCESS_DENIED;
     return true;
   }
   NTSTATUS status = STATUS_INVALID_PARAMETER;
   if (device_name->size() > 0) {
     status = ProcessMitigationsWin32KLockdownPolicy::GetCertificateAction(
-        *ipc->client_info, *device_name, static_cast<BYTE*>(cert_data.memory()),
-        shared_buffer_size);
+        *ipc->client_info, *device_name,
+        cert_data.GetMemoryAsSpan<BYTE>().data(), shared_buffer_size);
   } else {
     scoped_refptr<ProtectedVideoOutput> output =
         GetProtectedVideoOutput(protected_output, false);
@@ -436,7 +446,7 @@
       status =
           ProcessMitigationsWin32KLockdownPolicy::GetCertificateByHandleAction(
               *ipc->client_info, output.get()->handle(),
-              static_cast<BYTE*>(cert_data.memory()), shared_buffer_size);
+              cert_data.GetMemoryAsSpan<BYTE>().data(), shared_buffer_size);
     }
   }
   ipc->return_info.nt_status = status;
@@ -517,15 +527,15 @@
     ipc->return_info.nt_status = STATUS_INVALID_HANDLE;
     return true;
   };
-  base::SharedMemoryHandle handle =
-      GetSharedMemoryHandle(*ipc->client_info, shared_buffer_handle,
+  base::UnsafeSharedMemoryRegion region =
+      GetSharedMemoryRegion(*ipc->client_info, shared_buffer_handle,
                             sizeof(DXGKMDT_OPM_CONFIGURE_PARAMETERS));
-  if (!handle.IsValid()) {
+  if (!region.IsValid()) {
     ipc->return_info.nt_status = STATUS_ACCESS_DENIED;
     return true;
   }
-  base::SharedMemory buffer(handle, false);
-  if (!buffer.Map(sizeof(DXGKMDT_OPM_CONFIGURE_PARAMETERS))) {
+  base::WritableSharedMemoryMapping buffer = region.Map();
+  if (!buffer.IsValid()) {
     ipc->return_info.nt_status = STATUS_ACCESS_DENIED;
     return true;
   }
@@ -554,15 +564,15 @@
       std::max(sizeof(DXGKMDT_OPM_GET_INFO_PARAMETERS),
                sizeof(DXGKMDT_OPM_REQUESTED_INFORMATION));
 
-  base::SharedMemoryHandle handle = GetSharedMemoryHandle(
+  base::UnsafeSharedMemoryRegion region = GetSharedMemoryRegion(
       *ipc->client_info, shared_buffer_handle, shared_buffer_size);
-  if (!handle.IsValid()) {
+  if (!region.IsValid()) {
     ipc->return_info.nt_status = STATUS_ACCESS_DENIED;
     return true;
   }
-  base::SharedMemory buffer(handle, false);
 
-  if (!buffer.Map(shared_buffer_size)) {
+  base::WritableSharedMemoryMapping buffer = region.Map();
+  if (!buffer.IsValid()) {
     ipc->return_info.nt_status = STATUS_ACCESS_DENIED;
     return true;
   }
diff --git a/sandbox/win/tests/common/controller.cc b/sandbox/win/tests/common/controller.cc
index b271c3f..0b1dec0 100644
--- a/sandbox/win/tests/common/controller.cc
+++ b/sandbox/win/tests/common/controller.cc
@@ -6,12 +6,14 @@
 
 #include <string>
 
-#include "base/memory/shared_memory.h"
+#include "base/memory/platform_shared_memory_region.h"
+#include "base/memory/read_only_shared_memory_region.h"
 #include "base/process/process.h"
 #include "base/process/process_handle.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/sys_string_conversions.h"
 #include "base/unguessable_token.h"
+#include "base/win/scoped_handle.h"
 #include "base/win/windows_version.h"
 #include "sandbox/win/src/app_container_profile.h"
 #include "sandbox/win/src/sandbox_factory.h"
@@ -302,16 +304,32 @@
   // in read only mode and sleep infinitely if we succeed.
   if (0 == _wcsicmp(argv[3], L"shared_memory_handle")) {
     HANDLE raw_handle = nullptr;
+    base::StringPiece test_contents = "Hello World";
     base::StringToUint(argv[4], reinterpret_cast<unsigned int*>(&raw_handle));
     if (raw_handle == nullptr)
       return SBOX_TEST_INVALID_PARAMETER;
-    base::SharedMemoryHandle shared_handle(raw_handle, 0u,
-                                           base::UnguessableToken::Create());
-    base::SharedMemory read_only_view(shared_handle, true);
-    if (!read_only_view.Map(0))
+    // First extract the handle to the platform-native ScopedHandle.
+    base::win::ScopedHandle scoped_handle(raw_handle);
+    if (!scoped_handle.IsValid())
       return SBOX_TEST_INVALID_PARAMETER;
-    std::string contents(reinterpret_cast<char*>(read_only_view.memory()));
-    if (contents != "Hello World")
+    // Then convert to the low-level chromium region.
+    base::subtle::PlatformSharedMemoryRegion platform_region =
+        base::subtle::PlatformSharedMemoryRegion::Take(
+            std::move(scoped_handle),
+            base::subtle::PlatformSharedMemoryRegion::Mode::kReadOnly,
+            test_contents.size(), base::UnguessableToken::Create());
+    // Finally wrap the low-level region in the shared memory API.
+    base::ReadOnlySharedMemoryRegion region =
+        base::ReadOnlySharedMemoryRegion::Deserialize(
+            std::move(platform_region));
+    if (!region.IsValid())
+      return SBOX_TEST_INVALID_PARAMETER;
+    base::ReadOnlySharedMemoryMapping view = region.Map();
+    if (!view.IsValid())
+      return SBOX_TEST_INVALID_PARAMETER;
+
+    const std::string contents(view.GetMemoryAsSpan<char>().data());
+    if (contents != test_contents)
       return SBOX_TEST_INVALID_PARAMETER;
     Sleep(INFINITE);
     return SBOX_TEST_TIMED_OUT;
diff --git a/services/audio/test/service_lifetime_connector_test.cc b/services/audio/test/service_lifetime_connector_test.cc
index 422ac8e..f8d82e4 100644
--- a/services/audio/test/service_lifetime_connector_test.cc
+++ b/services/audio/test/service_lifetime_connector_test.cc
@@ -70,8 +70,10 @@
 // For platforms where the standalone audio service has been launched, the
 // service should terminate after a default timeout if no specific timeout has
 // been set.
+// Disabled due to flakiness.
+// TODO(crbug.com/976841): Fix the flakiness and re-enable this.
 TEST_F(AudioServiceLifetimeConnectorTest,
-       StandaloneServiceTerminatesWhenNoTimeoutIsSet) {
+       DISABLED_StandaloneServiceTerminatesWhenNoTimeoutIsSet) {
   service_.reset();
   audio_manager_->Shutdown();
   audio_manager_.reset();
diff --git a/services/identity/public/cpp/identity_manager_unittest.cc b/services/identity/public/cpp/identity_manager_unittest.cc
index 84682c7..8ff3d28 100644
--- a/services/identity/public/cpp/identity_manager_unittest.cc
+++ b/services/identity/public/cpp/identity_manager_unittest.cc
@@ -845,21 +845,22 @@
   std::string account_id2 = account_info2.account_id;
   SetRefreshTokenForAccount(identity_manager(), account_id2);
 
-  GoogleServiceAuthError account_deleted_error =
-      GoogleServiceAuthError(GoogleServiceAuthError::State::ACCOUNT_DELETED);
-  GoogleServiceAuthError account_disabled_error =
-      GoogleServiceAuthError(GoogleServiceAuthError::State::ACCOUNT_DISABLED);
+  GoogleServiceAuthError user_not_signed_up_error =
+      GoogleServiceAuthError(GoogleServiceAuthError::State::USER_NOT_SIGNED_UP);
+  GoogleServiceAuthError invalid_gaia_credentials_error =
+      GoogleServiceAuthError(
+          GoogleServiceAuthError::State::INVALID_GAIA_CREDENTIALS);
   GoogleServiceAuthError transient_error = GoogleServiceAuthError(
       GoogleServiceAuthError::State::SERVICE_UNAVAILABLE);
 
   // Set a persistent error for |account_id2| and check that it's reflected.
   token_service()->UpdateAuthErrorForTesting(account_id2,
-                                             account_deleted_error);
+                                             user_not_signed_up_error);
   EXPECT_EQ(account_id2,
             identity_manager_observer()
                 ->AccountFromErrorStateOfRefreshTokenUpdatedCallback()
                 .account_id);
-  EXPECT_EQ(account_deleted_error,
+  EXPECT_EQ(user_not_signed_up_error,
             identity_manager_observer()
                 ->ErrorFromErrorStateOfRefreshTokenUpdatedCallback());
 
@@ -870,19 +871,19 @@
             identity_manager_observer()
                 ->AccountFromErrorStateOfRefreshTokenUpdatedCallback()
                 .account_id);
-  EXPECT_EQ(account_deleted_error,
+  EXPECT_EQ(user_not_signed_up_error,
             identity_manager_observer()
                 ->ErrorFromErrorStateOfRefreshTokenUpdatedCallback());
 
   // Set a different persistent error for the primary account and check that
   // it's reflected.
   token_service()->UpdateAuthErrorForTesting(primary_account_id,
-                                             account_disabled_error);
+                                             invalid_gaia_credentials_error);
   EXPECT_EQ(primary_account_id,
             identity_manager_observer()
                 ->AccountFromErrorStateOfRefreshTokenUpdatedCallback()
                 .account_id);
-  EXPECT_EQ(account_disabled_error,
+  EXPECT_EQ(invalid_gaia_credentials_error,
             identity_manager_observer()
                 ->ErrorFromErrorStateOfRefreshTokenUpdatedCallback());
 }
@@ -930,18 +931,19 @@
       identity_manager()->HasAccountWithRefreshTokenInPersistentErrorState(
           account_id2));
 
-  GoogleServiceAuthError account_deleted_error =
-      GoogleServiceAuthError(GoogleServiceAuthError::State::ACCOUNT_DELETED);
-  GoogleServiceAuthError account_disabled_error =
-      GoogleServiceAuthError(GoogleServiceAuthError::State::ACCOUNT_DISABLED);
+  GoogleServiceAuthError user_not_signed_up_error =
+      GoogleServiceAuthError(GoogleServiceAuthError::State::USER_NOT_SIGNED_UP);
+  GoogleServiceAuthError invalid_gaia_credentials_error =
+      GoogleServiceAuthError(
+          GoogleServiceAuthError::State::INVALID_GAIA_CREDENTIALS);
   GoogleServiceAuthError transient_error = GoogleServiceAuthError(
       GoogleServiceAuthError::State::SERVICE_UNAVAILABLE);
 
   // Set a persistent error for |account_id2| and check that it's reflected.
   token_service()->UpdateAuthErrorForTesting(account_id2,
-                                             account_deleted_error);
+                                             user_not_signed_up_error);
   EXPECT_EQ(
-      account_deleted_error,
+      user_not_signed_up_error,
       identity_manager()->GetErrorStateOfRefreshTokenForAccount(account_id2));
   EXPECT_TRUE(
       identity_manager()->HasAccountWithRefreshTokenInPersistentErrorState(
@@ -966,14 +968,14 @@
   // Set a different persistent error for the primary account and check that
   // it's reflected.
   token_service()->UpdateAuthErrorForTesting(primary_account_id,
-                                             account_disabled_error);
+                                             invalid_gaia_credentials_error);
   EXPECT_EQ(
-      account_deleted_error,
+      user_not_signed_up_error,
       identity_manager()->GetErrorStateOfRefreshTokenForAccount(account_id2));
   EXPECT_TRUE(
       identity_manager()->HasAccountWithRefreshTokenInPersistentErrorState(
           account_id2));
-  EXPECT_EQ(account_disabled_error,
+  EXPECT_EQ(invalid_gaia_credentials_error,
             identity_manager()->GetErrorStateOfRefreshTokenForAccount(
                 primary_account_id));
   EXPECT_TRUE(
@@ -989,7 +991,7 @@
   EXPECT_FALSE(
       identity_manager()->HasAccountWithRefreshTokenInPersistentErrorState(
           account_id2));
-  EXPECT_EQ(account_disabled_error,
+  EXPECT_EQ(invalid_gaia_credentials_error,
             identity_manager()->GetErrorStateOfRefreshTokenForAccount(
                 primary_account_id));
   EXPECT_TRUE(
diff --git a/testing/buildbot/filters/gpu.skiarenderer_vulkan_content_browsertests.filter b/testing/buildbot/filters/gpu.skiarenderer_vulkan_content_browsertests.filter
index b04beb0..f475fd7 100644
--- a/testing/buildbot/filters/gpu.skiarenderer_vulkan_content_browsertests.filter
+++ b/testing/buildbot/filters/gpu.skiarenderer_vulkan_content_browsertests.filter
@@ -9,6 +9,7 @@
 -File/MediaTest.VideoBearMp4/0
 -File/MediaTest.VideoTulipWebm/0
 -Http/MediaTest.VideoBearMp4/0
+-Http/MediaTest.VideoBearSilentMp4/0
 -Http/MediaTest.VideoTulipWebm/0
 -MediaColorTest.Yuv420pTheora
 -MediaColorTest.Yuv420pVp8
diff --git a/testing/scripts/run_wpt_tests.py b/testing/scripts/run_wpt_tests.py
new file mode 100755
index 0000000..f9ebf74e
--- /dev/null
+++ b/testing/scripts/run_wpt_tests.py
@@ -0,0 +1,72 @@
+#!/usr/bin/env vpython
+# 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.
+
+"""Runs WPT as an isolate bundle.
+
+This script maps flags supported by run_isolate_script_test.py to flags that are
+understood by WPT.
+
+Here's the mapping [isolate script flag] : [wpt flag]
+--isolated-script-test-output : --log-chromium
+--total-shards : --total-chunks
+--shard-index : -- this-chunk
+"""
+
+import json
+import os
+import sys
+
+import common
+
+
+class WPTTestAdapter(common.BaseIsolatedScriptArgsAdapter):
+
+    def generate_test_output_args(self, output):
+        return ['--log-chromium', output]
+
+    def generate_sharding_args(self, total_shards, shard_index):
+        return ['--total-chunks=%d' % total_shards,
+                # shard_index is 0-based but WPT's this-chunk to be 1-based
+                '--this-chunk=%d' % (shard_index + 1)]
+
+    def add_extra_arguments(self, parser):
+        # These args are used to rewrite the output generated by WPT to include
+        # missing features, such as flakineess expectations.
+        parser.add_argument("--old-json-output-file-path")
+        parser.add_argument("--new-json-output-dir")
+        parser.add_argument("--new-json-output-filename")
+
+    def clean_up_after_test_run(self):
+        common.run_command([
+            sys.executable,
+            os.path.join(common.SRC_DIR, 'third_party', 'blink', 'tools',
+                         'update_wpt_output.py'),
+            '--old-json-output-file-path',
+            self.options.old_json_output_file_path,
+            '--new-json-output-dir', self.options.new_json_output_dir,
+            '--new-json-output-filename', self.options.new_json_output_filename,
+        ])
+
+
+def main():
+    adapter = WPTTestAdapter()
+    return adapter.run_test()
+
+
+# This is not really a "script test" so does not need to manually add
+# any additional compile targets.
+def main_compile_targets(args):
+    json.dump([], args.output)
+
+
+if __name__ == '__main__':
+    # Conform minimally to the protocol defined by ScriptTest.
+    if 'compile_targets' in sys.argv:
+        funcs = {
+            'run': None,
+            'compile_targets': main_compile_targets,
+        }
+        sys.exit(common.run_script(sys.argv[1:], funcs))
+    sys.exit(main())
diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json
index 255bb01..d13c0fb8 100644
--- a/testing/variations/fieldtrial_testing_config.json
+++ b/testing/variations/fieldtrial_testing_config.json
@@ -1943,25 +1943,6 @@
             ]
         }
     ],
-    "EmitGoogleSearchDomainMixingMetrics": [
-        {
-            "platforms": [
-                "android",
-                "chromeos",
-                "linux",
-                "mac",
-                "windows"
-            ],
-            "experiments": [
-                {
-                    "name": "Enabled",
-                    "enable_features": [
-                        "EmitGoogleSearchDomainMixingMetrics"
-                    ]
-                }
-            ]
-        }
-    ],
     "EnableAppContainer": [
         {
             "platforms": [
@@ -3358,25 +3339,6 @@
             ]
         }
     ],
-    "NoSearchDomainCheck": [
-        {
-            "platforms": [
-                "android",
-                "chromeos",
-                "linux",
-                "mac",
-                "windows"
-            ],
-            "experiments": [
-                {
-                    "name": "Enabled",
-                    "enable_features": [
-                        "NoSearchDomainCheck"
-                    ]
-                }
-            ]
-        }
-    ],
     "OfferUploadCreditCards": [
         {
             "platforms": [
diff --git a/third_party/blink/perf_tests/websocket/receive-arraybuffer-1MBx100.html b/third_party/blink/perf_tests/websocket/receive-arraybuffer-1MBx100.html
index 563cd327..28841cc 100644
--- a/third_party/blink/perf_tests/websocket/receive-arraybuffer-1MBx100.html
+++ b/third_party/blink/perf_tests/websocket/receive-arraybuffer-1MBx100.html
@@ -11,8 +11,13 @@
 // $ npm start
 // $ python ../../../../tools/perf/run_benchmark run blink_perf --browser=canary --test-path=websocket\receive-arraybuffer-1MBx100.html
 
+const params = (new URL(document.location)).searchParams;
+const server = params.get("server") || "ws://127.0.0.1:8001/";
+PerfTestRunner.log("Connect to " + server);
+const iteration = params.get("iteration") || 6;
+
 async function runTestCase() {
-  const ws = new WebSocket("ws://127.0.0.1:8001/");
+  const ws = new WebSocket(server);
   ws.binaryType = "arraybuffer";
   const onOpen = new Promise(resolve => {
     ws.onopen = () => {
@@ -42,7 +47,7 @@
   run: async function() {
     while (!isDone) await runTestCase();
   },
-  iterationCount: 6,
+  iterationCount: iteration,
 });
 </script>
 </body>
diff --git a/third_party/blink/public/platform/web_url_response.h b/third_party/blink/public/platform/web_url_response.h
index 6216e93..53b36d19 100644
--- a/third_party/blink/public/platform/web_url_response.h
+++ b/third_party/blink/public/platform/web_url_response.h
@@ -33,6 +33,7 @@
 
 #include <memory>
 
+#include "base/optional.h"
 #include "base/time/time.h"
 #include "net/cert/ct_policy_status.h"
 #include "net/http/http_response_info.h"
@@ -215,7 +216,8 @@
   BLINK_PLATFORM_EXPORT void SetSecurityStyle(WebSecurityStyle);
 
   BLINK_PLATFORM_EXPORT void SetSecurityDetails(const WebSecurityDetails&);
-  BLINK_PLATFORM_EXPORT WebSecurityDetails SecurityDetailsForTesting();
+  BLINK_PLATFORM_EXPORT base::Optional<WebSecurityDetails>
+  SecurityDetailsForTesting();
 
   BLINK_PLATFORM_EXPORT void SetAsyncRevalidationRequested(bool);
   BLINK_PLATFORM_EXPORT void SetNetworkAccessed(bool);
diff --git a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
index 6868139..59af62ec 100644
--- a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
+++ b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
@@ -232,9 +232,7 @@
           V8Window::DomTemplate(isolate, World())->InstanceTemplate();
       CHECK(!global_template.IsEmpty());
       context = v8::Context::New(isolate, &extension_configuration,
-                                 global_template, global_proxy,
-                                 v8::DeserializeInternalFieldsCallback(),
-                                 document->GetMicrotaskQueue());
+                                 global_template, global_proxy);
       VLOG(1) << "A context is created NOT from snapshot";
     }
   }
diff --git a/third_party/blink/renderer/bindings/core/v8/referrer_script_info.h b/third_party/blink/renderer/bindings/core/v8/referrer_script_info.h
index 84ed3667..6d001b6 100644
--- a/third_party/blink/renderer/bindings/core/v8/referrer_script_info.h
+++ b/third_party/blink/renderer/bindings/core/v8/referrer_script_info.h
@@ -6,7 +6,7 @@
 #define THIRD_PARTY_BLINK_RENDERER_BINDINGS_CORE_V8_REFERRER_SCRIPT_INFO_H_
 
 #include "services/network/public/mojom/fetch_api.mojom-blink.h"
-#include "services/network/public/mojom/referrer_policy.mojom-blink.h"
+#include "services/network/public/mojom/referrer_policy.mojom-shared.h"
 #include "third_party/blink/renderer/core/core_export.h"
 #include "third_party/blink/renderer/platform/loader/fetch/script_fetch_options.h"
 #include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
diff --git a/third_party/blink/renderer/bindings/modules/v8/v8_binding_for_modules.cc b/third_party/blink/renderer/bindings/modules/v8/v8_binding_for_modules.cc
index 751033f..af3a05cd 100644
--- a/third_party/blink/renderer/bindings/modules/v8/v8_binding_for_modules.cc
+++ b/third_party/blink/renderer/bindings/modules/v8/v8_binding_for_modules.cc
@@ -25,7 +25,7 @@
 
 #include "third_party/blink/renderer/bindings/modules/v8/v8_binding_for_modules.h"
 
-#include "third_party/blink/public/mojom/indexeddb/indexeddb.mojom-blink.h"
+#include "third_party/blink/public/mojom/indexeddb/indexeddb.mojom-shared.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_array_buffer.h"
diff --git a/third_party/blink/renderer/core/DEPS b/third_party/blink/renderer/core/DEPS
index 3317554..cd89e5b 100644
--- a/third_party/blink/renderer/core/DEPS
+++ b/third_party/blink/renderer/core/DEPS
@@ -76,7 +76,7 @@
     "+third_party/blink/renderer/core",
     "-third_party/blink/renderer/modules",
     "+third_party/skia/include",
-    "+ui/base/ime/mojo/ime_types.mojom-blink.h",
+    "+ui/base/ime/mojo/ime_types.mojom-shared.h",
     "+ui/gfx/geometry",
     "+ui/gfx/skia_util.h",
     "-web",
diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink/renderer/core/dom/document.cc
index fa6a279..7510ef47 100644
--- a/third_party/blink/renderer/core/dom/document.cc
+++ b/third_party/blink/renderer/core/dom/document.cc
@@ -40,7 +40,7 @@
 #include "services/metrics/public/cpp/mojo_ukm_recorder.h"
 #include "services/metrics/public/cpp/ukm_builders.h"
 #include "services/metrics/public/cpp/ukm_source_id.h"
-#include "services/metrics/public/mojom/ukm_interface.mojom-blink.h"
+#include "services/metrics/public/mojom/ukm_interface.mojom-shared.h"
 #include "services/resource_coordinator/public/mojom/coordination_unit.mojom-blink.h"
 #include "services/service_manager/public/cpp/interface_provider.h"
 #include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
diff --git a/third_party/blink/renderer/core/dom/document.h b/third_party/blink/renderer/core/dom/document.h
index 430ca56..adee584 100644
--- a/third_party/blink/renderer/core/dom/document.h
+++ b/third_party/blink/renderer/core/dom/document.h
@@ -39,7 +39,7 @@
 #include "services/metrics/public/cpp/ukm_source_id.h"
 #include "third_party/blink/public/mojom/feature_policy/feature_policy.mojom-blink.h"
 #include "third_party/blink/public/mojom/frame/navigation_initiator.mojom-blink.h"
-#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-blink.h"
+#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-shared.h"
 #include "third_party/blink/public/platform/web_focus_type.h"
 #include "third_party/blink/public/platform/web_insecure_request_policy.h"
 #include "third_party/blink/renderer/core/accessibility/axid.h"
diff --git a/third_party/blink/renderer/core/dom/document_test.cc b/third_party/blink/renderer/core/dom/document_test.cc
index 9c022cef..520c41c 100644
--- a/third_party/blink/renderer/core/dom/document_test.cc
+++ b/third_party/blink/renderer/core/dom/document_test.cc
@@ -34,7 +34,7 @@
 
 #include "base/strings/stringprintf.h"
 #include "build/build_config.h"
-#include "services/network/public/mojom/referrer_policy.mojom-blink.h"
+#include "services/network/public/mojom/referrer_policy.mojom-shared.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/blink/renderer/bindings/core/v8/isolated_world_csp.h"
diff --git a/third_party/blink/renderer/core/editing/ime/ime_text_span.h b/third_party/blink/renderer/core/editing/ime/ime_text_span.h
index b99f960..878be9e 100644
--- a/third_party/blink/renderer/core/editing/ime/ime_text_span.h
+++ b/third_party/blink/renderer/core/editing/ime/ime_text_span.h
@@ -31,7 +31,7 @@
 #include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
 #include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
 #include "third_party/blink/renderer/platform/wtf/vector.h"
-#include "ui/base/ime/mojo/ime_types.mojom-blink.h"
+#include "ui/base/ime/mojo/ime_types.mojom-shared.h"
 
 namespace blink {
 
diff --git a/third_party/blink/renderer/core/editing/markers/styleable_marker.h b/third_party/blink/renderer/core/editing/markers/styleable_marker.h
index 6d78e8d6..86294a6 100644
--- a/third_party/blink/renderer/core/editing/markers/styleable_marker.h
+++ b/third_party/blink/renderer/core/editing/markers/styleable_marker.h
@@ -7,7 +7,7 @@
 
 #include "third_party/blink/renderer/core/editing/markers/document_marker.h"
 #include "third_party/blink/renderer/platform/wtf/casting.h"
-#include "ui/base/ime/mojo/ime_types.mojom-blink.h"
+#include "ui/base/ime/mojo/ime_types.mojom-shared.h"
 
 namespace blink {
 
diff --git a/third_party/blink/renderer/core/exported/web_document_loader_impl.cc b/third_party/blink/renderer/core/exported/web_document_loader_impl.cc
index ce29235..9f45470 100644
--- a/third_party/blink/renderer/core/exported/web_document_loader_impl.cc
+++ b/third_party/blink/renderer/core/exported/web_document_loader_impl.cc
@@ -34,7 +34,7 @@
 #include <utility>
 
 #include "base/memory/ptr_util.h"
-#include "third_party/blink/public/mojom/loader/mhtml_load_result.mojom-blink.h"
+#include "third_party/blink/public/mojom/loader/mhtml_load_result.mojom-shared.h"
 #include "third_party/blink/public/platform/modules/service_worker/web_service_worker_network_provider.h"
 #include "third_party/blink/public/platform/web_document_subresource_filter.h"
 #include "third_party/blink/public/platform/web_url.h"
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 a3ab9ca0..3142050 100644
--- a/third_party/blink/renderer/core/exported/web_frame_test.cc
+++ b/third_party/blink/renderer/core/exported/web_frame_test.cc
@@ -44,8 +44,8 @@
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/blink/public/common/frame/frame_owner_element_type.h"
 #include "third_party/blink/public/common/page/launching_process_state.h"
-#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-blink.h"
-#include "third_party/blink/public/mojom/frame/find_in_page.mojom-blink.h"
+#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-shared.h"
+#include "third_party/blink/public/mojom/frame/find_in_page.mojom-shared.h"
 #include "third_party/blink/public/platform/platform.h"
 #include "third_party/blink/public/platform/web_cache.h"
 #include "third_party/blink/public/platform/web_coalesced_input_event.h"
diff --git a/third_party/blink/renderer/core/exported/web_shared_worker_impl.h b/third_party/blink/renderer/core/exported/web_shared_worker_impl.h
index 05d1ed7..c8d9a7f 100644
--- a/third_party/blink/renderer/core/exported/web_shared_worker_impl.h
+++ b/third_party/blink/renderer/core/exported/web_shared_worker_impl.h
@@ -40,7 +40,7 @@
 #include "services/service_manager/public/mojom/interface_provider.mojom-blink.h"
 #include "third_party/blink/public/common/privacy_preferences.h"
 #include "third_party/blink/public/mojom/csp/content_security_policy.mojom-blink.h"
-#include "third_party/blink/public/mojom/net/ip_address_space.mojom-blink.h"
+#include "third_party/blink/public/mojom/net/ip_address_space.mojom-shared.h"
 #include "third_party/blink/public/mojom/worker/worker_content_settings_proxy.mojom-blink.h"
 #include "third_party/blink/public/web/web_shared_worker_client.h"
 #include "third_party/blink/renderer/core/core_export.h"
diff --git a/third_party/blink/renderer/core/exported/worker_shadow_page.cc b/third_party/blink/renderer/core/exported/worker_shadow_page.cc
index 6b8a4b07..2f8854a3 100644
--- a/third_party/blink/renderer/core/exported/worker_shadow_page.cc
+++ b/third_party/blink/renderer/core/exported/worker_shadow_page.cc
@@ -4,7 +4,7 @@
 
 #include "third_party/blink/renderer/core/exported/worker_shadow_page.h"
 
-#include "services/network/public/mojom/referrer_policy.mojom-blink.h"
+#include "services/network/public/mojom/referrer_policy.mojom-shared.h"
 #include "third_party/blink/public/mojom/frame/document_interface_broker.mojom-blink.h"
 #include "third_party/blink/public/platform/platform.h"
 #include "third_party/blink/renderer/core/exported/web_view_impl.h"
diff --git a/third_party/blink/renderer/core/fetch/fetch_request_data.h b/third_party/blink/renderer/core/fetch/fetch_request_data.h
index 86b6f85..63fc46b 100644
--- a/third_party/blink/renderer/core/fetch/fetch_request_data.h
+++ b/third_party/blink/renderer/core/fetch/fetch_request_data.h
@@ -9,7 +9,7 @@
 #include "base/memory/scoped_refptr.h"
 #include "base/unguessable_token.h"
 #include "services/network/public/mojom/fetch_api.mojom-blink.h"
-#include "services/network/public/mojom/referrer_policy.mojom-blink.h"
+#include "services/network/public/mojom/referrer_policy.mojom-shared.h"
 #include "services/network/public/mojom/url_loader_factory.mojom-blink.h"
 #include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-blink.h"
 #include "third_party/blink/public/platform/web_url_request.h"
diff --git a/third_party/blink/renderer/core/fetch/request.h b/third_party/blink/renderer/core/fetch/request.h
index 0f1cf26..4f070be3 100644
--- a/third_party/blink/renderer/core/fetch/request.h
+++ b/third_party/blink/renderer/core/fetch/request.h
@@ -5,7 +5,7 @@
 #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_FETCH_REQUEST_H_
 #define THIRD_PARTY_BLINK_RENDERER_CORE_FETCH_REQUEST_H_
 
-#include "services/network/public/mojom/fetch_api.mojom-blink.h"
+#include "services/network/public/mojom/fetch_api.mojom-shared.h"
 #include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-blink.h"
 #include "third_party/blink/public/platform/web_url_request.h"
 #include "third_party/blink/renderer/bindings/core/v8/dictionary.h"
diff --git a/third_party/blink/renderer/core/frame/csp/content_security_policy.h b/third_party/blink/renderer/core/frame/csp/content_security_policy.h
index 616556f..7a2d6bd 100644
--- a/third_party/blink/renderer/core/frame/csp/content_security_policy.h
+++ b/third_party/blink/renderer/core/frame/csp/content_security_policy.h
@@ -29,7 +29,7 @@
 #include <memory>
 #include <utility>
 
-#include "third_party/blink/public/mojom/devtools/console_message.mojom-blink.h"
+#include "third_party/blink/public/mojom/devtools/console_message.mojom-shared.h"
 #include "third_party/blink/public/platform/web_content_security_policy_struct.h"
 #include "third_party/blink/public/platform/web_insecure_request_policy.h"
 #include "third_party/blink/renderer/bindings/core/v8/source_location.h"
diff --git a/third_party/blink/renderer/core/frame/frame_console.h b/third_party/blink/renderer/core/frame/frame_console.h
index 720cd843..bf284df 100644
--- a/third_party/blink/renderer/core/frame/frame_console.h
+++ b/third_party/blink/renderer/core/frame/frame_console.h
@@ -29,7 +29,7 @@
 #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_FRAME_FRAME_CONSOLE_H_
 #define THIRD_PARTY_BLINK_RENDERER_CORE_FRAME_FRAME_CONSOLE_H_
 
-#include "third_party/blink/public/mojom/devtools/console_message.mojom-blink.h"
+#include "third_party/blink/public/mojom/devtools/console_message.mojom-shared.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/wtf/forward.h"
diff --git a/third_party/blink/renderer/core/frame/frame_test_helpers.h b/third_party/blink/renderer/core/frame/frame_test_helpers.h
index 7bae591..8001ae6 100644
--- a/third_party/blink/renderer/core/frame/frame_test_helpers.h
+++ b/third_party/blink/renderer/core/frame/frame_test_helpers.h
@@ -43,7 +43,7 @@
 #include "content/test/stub_layer_tree_view_delegate.h"
 #include "services/service_manager/public/cpp/interface_provider.h"
 #include "third_party/blink/public/common/frame/frame_owner_element_type.h"
-#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-blink.h"
+#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-shared.h"
 #include "third_party/blink/public/platform/platform.h"
 #include "third_party/blink/public/platform/scheduler/test/web_fake_thread_scheduler.h"
 #include "third_party/blink/public/platform/web_mouse_event.h"
diff --git a/third_party/blink/renderer/core/frame/visual_viewport_test.cc b/third_party/blink/renderer/core/frame/visual_viewport_test.cc
index 4a48109..7ecc2ce 100644
--- a/third_party/blink/renderer/core/frame/visual_viewport_test.cc
+++ b/third_party/blink/renderer/core/frame/visual_viewport_test.cc
@@ -9,7 +9,7 @@
 #include "cc/layers/picture_layer.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
-#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-blink.h"
+#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-shared.h"
 #include "third_party/blink/public/platform/platform.h"
 #include "third_party/blink/public/platform/web_coalesced_input_event.h"
 #include "third_party/blink/public/platform/web_input_event.h"
diff --git a/third_party/blink/renderer/core/html/forms/external_date_time_chooser.cc b/third_party/blink/renderer/core/html/forms/external_date_time_chooser.cc
index 0221f293..142944f 100644
--- a/third_party/blink/renderer/core/html/forms/external_date_time_chooser.cc
+++ b/third_party/blink/renderer/core/html/forms/external_date_time_chooser.cc
@@ -33,7 +33,7 @@
 #include "third_party/blink/renderer/platform/runtime_enabled_features.h"
 #include "third_party/blink/renderer/platform/wtf/functional.h"
 #include "third_party/blink/renderer/platform/wtf/text/atomic_string.h"
-#include "ui/base/ime/mojo/ime_types.mojom-blink.h"
+#include "ui/base/ime/mojo/ime_types.mojom-shared.h"
 
 namespace blink {
 
diff --git a/third_party/blink/renderer/core/html/html_frame_owner_element.cc b/third_party/blink/renderer/core/html/html_frame_owner_element.cc
index b30d1a1..b95ebe78 100644
--- a/third_party/blink/renderer/core/html/html_frame_owner_element.cc
+++ b/third_party/blink/renderer/core/html/html_frame_owner_element.cc
@@ -20,7 +20,7 @@
 
 #include "third_party/blink/renderer/core/html/html_frame_owner_element.h"
 
-#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-blink.h"
+#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-shared.h"
 #include "third_party/blink/renderer/core/accessibility/ax_object_cache.h"
 #include "third_party/blink/renderer/core/css/style_change_reason.h"
 #include "third_party/blink/renderer/core/dom/events/event.h"
diff --git a/third_party/blink/renderer/core/html/imports/link_import.cc b/third_party/blink/renderer/core/html/imports/link_import.cc
index 73df690..c5fc72d 100644
--- a/third_party/blink/renderer/core/html/imports/link_import.cc
+++ b/third_party/blink/renderer/core/html/imports/link_import.cc
@@ -30,7 +30,7 @@
 
 #include "third_party/blink/renderer/core/html/imports/link_import.h"
 
-#include "services/network/public/mojom/referrer_policy.mojom-blink.h"
+#include "services/network/public/mojom/referrer_policy.mojom-shared.h"
 #include "third_party/blink/renderer/core/dom/document.h"
 #include "third_party/blink/renderer/core/html/html_link_element.h"
 #include "third_party/blink/renderer/core/html/imports/html_import_child.h"
diff --git a/third_party/blink/renderer/core/html/link_style.cc b/third_party/blink/renderer/core/html/link_style.cc
index 665911dc..e9be1ac 100644
--- a/third_party/blink/renderer/core/html/link_style.cc
+++ b/third_party/blink/renderer/core/html/link_style.cc
@@ -4,7 +4,7 @@
 
 #include "third_party/blink/renderer/core/html/link_style.h"
 
-#include "services/network/public/mojom/referrer_policy.mojom-blink.h"
+#include "services/network/public/mojom/referrer_policy.mojom-shared.h"
 #include "third_party/blink/renderer/core/css/style_sheet_contents.h"
 #include "third_party/blink/renderer/core/dom/document.h"
 #include "third_party/blink/renderer/core/frame/csp/content_security_policy.h"
diff --git a/third_party/blink/renderer/core/html/parser/html_preload_scanner.cc b/third_party/blink/renderer/core/html/parser/html_preload_scanner.cc
index 3b2b8f14..da197da 100644
--- a/third_party/blink/renderer/core/html/parser/html_preload_scanner.cc
+++ b/third_party/blink/renderer/core/html/parser/html_preload_scanner.cc
@@ -29,7 +29,7 @@
 
 #include <memory>
 #include "base/optional.h"
-#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-blink.h"
+#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-shared.h"
 #include "third_party/blink/public/mojom/script/script_type.mojom-blink.h"
 #include "third_party/blink/renderer/core/css/css_primitive_value.h"
 #include "third_party/blink/renderer/core/css/css_property_name.h"
diff --git a/third_party/blink/renderer/core/html/parser/preload_request.h b/third_party/blink/renderer/core/html/parser/preload_request.h
index 81fa048..d5e88d4c 100644
--- a/third_party/blink/renderer/core/html/parser/preload_request.h
+++ b/third_party/blink/renderer/core/html/parser/preload_request.h
@@ -8,7 +8,7 @@
 #include <memory>
 
 #include "base/memory/ptr_util.h"
-#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-blink.h"
+#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-shared.h"
 #include "third_party/blink/public/mojom/script/script_type.mojom-blink.h"
 #include "third_party/blink/renderer/core/core_export.h"
 #include "third_party/blink/renderer/core/script/script.h"
diff --git a/third_party/blink/renderer/core/inspector/console_message.h b/third_party/blink/renderer/core/inspector/console_message.h
index ecaf42b..2d9eaf6 100644
--- a/third_party/blink/renderer/core/inspector/console_message.h
+++ b/third_party/blink/renderer/core/inspector/console_message.h
@@ -5,7 +5,7 @@
 #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_INSPECTOR_CONSOLE_MESSAGE_H_
 #define THIRD_PARTY_BLINK_RENDERER_CORE_INSPECTOR_CONSOLE_MESSAGE_H_
 
-#include "third_party/blink/public/mojom/devtools/console_message.mojom-blink.h"
+#include "third_party/blink/public/mojom/devtools/console_message.mojom-shared.h"
 #include "third_party/blink/renderer/core/core_export.h"
 #include "third_party/blink/renderer/core/dom/dom_node_ids.h"
 #include "third_party/blink/renderer/platform/heap/handle.h"
diff --git a/third_party/blink/renderer/core/inspector/inspector_network_agent.cc b/third_party/blink/renderer/core/inspector/inspector_network_agent.cc
index d5c6b982..31c899e 100644
--- a/third_party/blink/renderer/core/inspector/inspector_network_agent.cc
+++ b/third_party/blink/renderer/core/inspector/inspector_network_agent.cc
@@ -37,9 +37,9 @@
 #include "base/macros.h"
 #include "base/memory/scoped_refptr.h"
 #include "build/build_config.h"
-#include "services/network/public/mojom/referrer_policy.mojom-blink.h"
+#include "services/network/public/mojom/referrer_policy.mojom-shared.h"
 #include "services/network/public/mojom/websocket.mojom-blink.h"
-#include "third_party/blink/public/mojom/loader/request_context_frame_type.mojom-blink.h"
+#include "third_party/blink/public/mojom/loader/request_context_frame_type.mojom-shared.h"
 #include "third_party/blink/public/platform/task_type.h"
 #include "third_party/blink/public/platform/web_effective_connection_type.h"
 #include "third_party/blink/public/platform/web_mixed_content_context_type.h"
@@ -623,12 +623,9 @@
   }
   response_object->setProtocol(protocol);
 
-  if (response.GetSecurityStyle() != ResourceResponse::kSecurityStyleUnknown &&
-      response.GetSecurityStyle() !=
-          ResourceResponse::kSecurityStyleUnauthenticated) {
-    const ResourceResponse::SecurityDetails* response_security_details =
-        response.GetSecurityDetails();
-
+  const base::Optional<ResourceResponse::SecurityDetails>&
+      response_security_details = response.GetSecurityDetails();
+  if (response_security_details.has_value()) {
     auto san_list = std::make_unique<protocol::Array<String>>(
         response_security_details->san_list.begin(),
         response_security_details->san_list.end());
@@ -959,11 +956,9 @@
   resources_data_->ResponseReceived(request_id, frame_id, response);
   resources_data_->SetResourceType(request_id, type);
 
-  if (response.GetSecurityStyle() != ResourceResponse::kSecurityStyleUnknown &&
-      response.GetSecurityStyle() !=
-          ResourceResponse::kSecurityStyleUnauthenticated) {
-    const ResourceResponse::SecurityDetails* response_security_details =
-        response.GetSecurityDetails();
+  const base::Optional<ResourceResponse::SecurityDetails>&
+      response_security_details = response.GetSecurityDetails();
+  if (response_security_details.has_value()) {
     resources_data_->SetCertificate(request_id,
                                     response_security_details->certificate);
   }
diff --git a/third_party/blink/renderer/core/inspector/inspector_resource_content_loader.cc b/third_party/blink/renderer/core/inspector/inspector_resource_content_loader.cc
index ba9eb28..057e35ea 100644
--- a/third_party/blink/renderer/core/inspector/inspector_resource_content_loader.cc
+++ b/third_party/blink/renderer/core/inspector/inspector_resource_content_loader.cc
@@ -4,7 +4,7 @@
 
 #include "third_party/blink/renderer/core/inspector/inspector_resource_content_loader.h"
 
-#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-blink.h"
+#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-shared.h"
 #include "third_party/blink/public/platform/web_url_request.h"
 #include "third_party/blink/renderer/core/css/css_style_sheet.h"
 #include "third_party/blink/renderer/core/css/style_sheet_contents.h"
diff --git a/third_party/blink/renderer/core/inspector/inspector_trace_events.cc b/third_party/blink/renderer/core/inspector/inspector_trace_events.cc
index c11673d..daf6c80 100644
--- a/third_party/blink/renderer/core/inspector/inspector_trace_events.cc
+++ b/third_party/blink/renderer/core/inspector/inspector_trace_events.cc
@@ -9,7 +9,7 @@
 #include <memory>
 
 #include "cc/layers/picture_layer.h"
-#include "third_party/blink/public/mojom/loader/request_context_frame_type.mojom-blink.h"
+#include "third_party/blink/public/mojom/loader/request_context_frame_type.mojom-shared.h"
 #include "third_party/blink/public/platform/web_layer_tree_view.h"
 #include "third_party/blink/renderer/bindings/core/v8/script_source_code.h"
 #include "third_party/blink/renderer/bindings/core/v8/source_location.h"
diff --git a/third_party/blink/renderer/core/inspector/thread_debugger.h b/third_party/blink/renderer/core/inspector/thread_debugger.h
index 7adb02f..38e3407 100644
--- a/third_party/blink/renderer/core/inspector/thread_debugger.h
+++ b/third_party/blink/renderer/core/inspector/thread_debugger.h
@@ -7,7 +7,7 @@
 
 #include <memory>
 #include "base/macros.h"
-#include "third_party/blink/public/mojom/devtools/console_message.mojom-blink.h"
+#include "third_party/blink/public/mojom/devtools/console_message.mojom-shared.h"
 #include "third_party/blink/renderer/core/core_export.h"
 #include "third_party/blink/renderer/core/dom/user_gesture_indicator.h"
 #include "third_party/blink/renderer/platform/bindings/v8_per_isolate_data.h"
diff --git a/third_party/blink/renderer/core/layout/ng/inline/ng_physical_text_fragment.cc b/third_party/blink/renderer/core/layout/ng/inline/ng_physical_text_fragment.cc
index 384bb00..2bd71ca 100644
--- a/third_party/blink/renderer/core/layout/ng/inline/ng_physical_text_fragment.cc
+++ b/third_party/blink/renderer/core/layout/ng/inline/ng_physical_text_fragment.cc
@@ -65,7 +65,7 @@
       shape_result_(shape_result) {
   DCHECK_GE(start_offset_, source.StartOffset());
   DCHECK_LE(end_offset_, source.EndOffset());
-  DCHECK(shape_result_ || IsFlowControl()) << ToString();
+  DCHECK(shape_result_ || IsFlowControl()) << *this;
   line_orientation_ = source.line_orientation_;
   is_generated_text_ = source.is_generated_text_;
   ink_overflow_computed_ = false;
@@ -77,7 +77,7 @@
       start_offset_(builder->start_offset_),
       end_offset_(builder->end_offset_),
       shape_result_(std::move(builder->shape_result_)) {
-  DCHECK(shape_result_ || IsFlowControl()) << ToString();
+  DCHECK(shape_result_ || IsFlowControl()) << *this;
   line_orientation_ =
       static_cast<unsigned>(ToLineOrientation(builder->GetWritingMode()));
   is_generated_text_ = builder->IsGeneratedText();
diff --git a/third_party/blink/renderer/core/layout/ng/ng_physical_fragment.cc b/third_party/blink/renderer/core/layout/ng/ng_physical_fragment.cc
index 5fbf64f7..374f33a0 100644
--- a/third_party/blink/renderer/core/layout/ng/ng_physical_fragment.cc
+++ b/third_party/blink/renderer/core/layout/ng/ng_physical_fragment.cc
@@ -565,4 +565,16 @@
   return {offset_to_container_box, fragment->Size()};
 }
 
+std::ostream& operator<<(std::ostream& out,
+                         const NGPhysicalFragment& fragment) {
+  return out << fragment.ToString();
+}
+
+std::ostream& operator<<(std::ostream& out,
+                         const NGPhysicalFragment* fragment) {
+  if (!fragment)
+    return out << "<null>";
+  return out << *fragment;
+}
+
 }  // namespace blink
diff --git a/third_party/blink/renderer/core/layout/ng/ng_physical_fragment.h b/third_party/blink/renderer/core/layout/ng/ng_physical_fragment.h
index 3e9fe50..48120a1 100644
--- a/third_party/blink/renderer/core/layout/ng/ng_physical_fragment.h
+++ b/third_party/blink/renderer/core/layout/ng/ng_physical_fragment.h
@@ -335,6 +335,9 @@
   PhysicalRect RectInContainerBox() const;
 };
 
+CORE_EXPORT std::ostream& operator<<(std::ostream&, const NGPhysicalFragment*);
+CORE_EXPORT std::ostream& operator<<(std::ostream&, const NGPhysicalFragment&);
+
 #if !DCHECK_IS_ON()
 inline void NGPhysicalFragment::CheckType() const {}
 inline void NGPhysicalFragment::CheckCanUpdateInkOverflow() const {}
diff --git a/third_party/blink/renderer/core/loader/base_fetch_context.h b/third_party/blink/renderer/core/loader/base_fetch_context.h
index 1f3fc31..c8117e9 100644
--- a/third_party/blink/renderer/core/loader/base_fetch_context.h
+++ b/third_party/blink/renderer/core/loader/base_fetch_context.h
@@ -6,7 +6,7 @@
 #define THIRD_PARTY_BLINK_RENDERER_CORE_LOADER_BASE_FETCH_CONTEXT_H_
 
 #include "base/optional.h"
-#include "services/network/public/mojom/referrer_policy.mojom-blink.h"
+#include "services/network/public/mojom/referrer_policy.mojom-shared.h"
 #include "third_party/blink/public/platform/web_url_request.h"
 #include "third_party/blink/renderer/core/core_export.h"
 #include "third_party/blink/renderer/core/frame/csp/content_security_policy.h"
diff --git a/third_party/blink/renderer/core/loader/document_loader.cc b/third_party/blink/renderer/core/loader/document_loader.cc
index c4b55a5..68600318 100644
--- a/third_party/blink/renderer/core/loader/document_loader.cc
+++ b/third_party/blink/renderer/core/loader/document_loader.cc
@@ -37,7 +37,7 @@
 #include "services/metrics/public/cpp/ukm_builders.h"
 #include "services/metrics/public/cpp/ukm_recorder.h"
 #include "third_party/blink/public/common/origin_policy/origin_policy.h"
-#include "third_party/blink/public/mojom/commit_result/commit_result.mojom-blink.h"
+#include "third_party/blink/public/mojom/commit_result/commit_result.mojom-shared.h"
 #include "third_party/blink/public/platform/modules/service_worker/web_service_worker_network_provider.h"
 #include "third_party/blink/public/platform/web_url_request.h"
 #include "third_party/blink/public/web/web_history_commit_type.h"
diff --git a/third_party/blink/renderer/core/loader/document_loader.h b/third_party/blink/renderer/core/loader/document_loader.h
index be60065c..57d37d53 100644
--- a/third_party/blink/renderer/core/loader/document_loader.h
+++ b/third_party/blink/renderer/core/loader/document_loader.h
@@ -34,7 +34,7 @@
 #include "base/memory/scoped_refptr.h"
 #include "base/optional.h"
 #include "base/unguessable_token.h"
-#include "third_party/blink/public/mojom/loader/mhtml_load_result.mojom-blink.h"
+#include "third_party/blink/public/mojom/loader/mhtml_load_result.mojom-shared.h"
 #include "third_party/blink/public/platform/scheduler/web_scoped_virtual_time_pauser.h"
 #include "third_party/blink/public/platform/web_loading_behavior_flag.h"
 #include "third_party/blink/public/platform/web_navigation_body_loader.h"
diff --git a/third_party/blink/renderer/core/loader/frame_fetch_context.cc b/third_party/blink/renderer/core/loader/frame_fetch_context.cc
index d60d57e..d7f912d 100644
--- a/third_party/blink/renderer/core/loader/frame_fetch_context.cc
+++ b/third_party/blink/renderer/core/loader/frame_fetch_context.cc
@@ -38,7 +38,7 @@
 #include "build/build_config.h"
 #include "third_party/blink/public/common/client_hints/client_hints.h"
 #include "third_party/blink/public/common/device_memory/approximated_device_memory.h"
-#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-blink.h"
+#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-shared.h"
 #include "third_party/blink/public/mojom/loader/request_context_frame_type.mojom-blink.h"
 #include "third_party/blink/public/platform/modules/service_worker/web_service_worker_network_provider.h"
 #include "third_party/blink/public/platform/scheduler/web_scoped_virtual_time_pauser.h"
diff --git a/third_party/blink/renderer/core/loader/frame_fetch_context_test.cc b/third_party/blink/renderer/core/loader/frame_fetch_context_test.cc
index a7666e4..cd22cb7 100644
--- a/third_party/blink/renderer/core/loader/frame_fetch_context_test.cc
+++ b/third_party/blink/renderer/core/loader/frame_fetch_context_test.cc
@@ -38,7 +38,7 @@
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/blink/public/common/device_memory/approximated_device_memory.h"
 #include "third_party/blink/public/common/features.h"
-#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-blink.h"
+#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-shared.h"
 #include "third_party/blink/public/mojom/loader/request_context_frame_type.mojom-blink.h"
 #include "third_party/blink/public/mojom/net/ip_address_space.mojom-blink.h"
 #include "third_party/blink/public/platform/scheduler/web_scoped_virtual_time_pauser.h"
diff --git a/third_party/blink/renderer/core/loader/frame_load_request.h b/third_party/blink/renderer/core/loader/frame_load_request.h
index c56168f8..9d98e85 100644
--- a/third_party/blink/renderer/core/loader/frame_load_request.h
+++ b/third_party/blink/renderer/core/loader/frame_load_request.h
@@ -27,7 +27,7 @@
 #define THIRD_PARTY_BLINK_RENDERER_CORE_LOADER_FRAME_LOAD_REQUEST_H_
 
 #include "third_party/blink/public/mojom/blob/blob_url_store.mojom-blink.h"
-#include "third_party/blink/public/mojom/loader/request_context_frame_type.mojom-blink.h"
+#include "third_party/blink/public/mojom/loader/request_context_frame_type.mojom-shared.h"
 #include "third_party/blink/public/web/web_triggering_event_info.h"
 #include "third_party/blink/public/web/web_window_features.h"
 #include "third_party/blink/renderer/core/dom/document.h"
diff --git a/third_party/blink/renderer/core/loader/frame_loader.cc b/third_party/blink/renderer/core/loader/frame_loader.cc
index 3e36506..e6b9e11 100644
--- a/third_party/blink/renderer/core/loader/frame_loader.cc
+++ b/third_party/blink/renderer/core/loader/frame_loader.cc
@@ -42,7 +42,7 @@
 #include "base/auto_reset.h"
 #include "base/unguessable_token.h"
 #include "third_party/blink/public/common/features.h"
-#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-blink.h"
+#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-shared.h"
 #include "third_party/blink/public/mojom/frame/navigation_initiator.mojom-blink.h"
 #include "third_party/blink/public/mojom/loader/request_context_frame_type.mojom-blink.h"
 #include "third_party/blink/public/platform/modules/service_worker/web_service_worker_network_provider.h"
diff --git a/third_party/blink/renderer/core/loader/frame_loader.h b/third_party/blink/renderer/core/loader/frame_loader.h
index 0a53fae3..ebf0c0166 100644
--- a/third_party/blink/renderer/core/loader/frame_loader.h
+++ b/third_party/blink/renderer/core/loader/frame_loader.h
@@ -35,7 +35,7 @@
 
 #include "base/macros.h"
 #include "third_party/blink/public/common/user_agent/user_agent_metadata.h"
-#include "third_party/blink/public/mojom/loader/request_context_frame_type.mojom-blink.h"
+#include "third_party/blink/public/mojom/loader/request_context_frame_type.mojom-shared.h"
 #include "third_party/blink/public/platform/scheduler/web_scoped_virtual_time_pauser.h"
 #include "third_party/blink/public/web/web_document_loader.h"
 #include "third_party/blink/public/web/web_frame_load_type.h"
diff --git a/third_party/blink/renderer/core/loader/image_loader.cc b/third_party/blink/renderer/core/loader/image_loader.cc
index b173bbe..a67a609 100644
--- a/third_party/blink/renderer/core/loader/image_loader.cc
+++ b/third_party/blink/renderer/core/loader/image_loader.cc
@@ -25,7 +25,7 @@
 #include <memory>
 #include <utility>
 
-#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-blink.h"
+#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-shared.h"
 #include "third_party/blink/public/platform/web_client_hints_type.h"
 #include "third_party/blink/public/platform/web_url_request.h"
 #include "third_party/blink/renderer/bindings/core/v8/script_controller.h"
diff --git a/third_party/blink/renderer/core/loader/importance_attribute.h b/third_party/blink/renderer/core/loader/importance_attribute.h
index 92f8aa2..859102e 100644
--- a/third_party/blink/renderer/core/loader/importance_attribute.h
+++ b/third_party/blink/renderer/core/loader/importance_attribute.h
@@ -5,7 +5,7 @@
 #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_LOADER_IMPORTANCE_ATTRIBUTE_H_
 #define THIRD_PARTY_BLINK_RENDERER_CORE_LOADER_IMPORTANCE_ATTRIBUTE_H_
 
-#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-blink.h"
+#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-shared.h"
 #include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
 
 namespace blink {
diff --git a/third_party/blink/renderer/core/loader/link_load_parameters.h b/third_party/blink/renderer/core/loader/link_load_parameters.h
index ce2c3a00d..d64c125 100644
--- a/third_party/blink/renderer/core/loader/link_load_parameters.h
+++ b/third_party/blink/renderer/core/loader/link_load_parameters.h
@@ -5,7 +5,7 @@
 #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_LOADER_LINK_LOAD_PARAMETERS_H_
 #define THIRD_PARTY_BLINK_RENDERER_CORE_LOADER_LINK_LOAD_PARAMETERS_H_
 
-#include "services/network/public/mojom/referrer_policy.mojom-blink.h"
+#include "services/network/public/mojom/referrer_policy.mojom-shared.h"
 #include "third_party/blink/renderer/core/core_export.h"
 #include "third_party/blink/renderer/core/html/cross_origin_attribute.h"
 #include "third_party/blink/renderer/core/html/link_rel_attribute.h"
diff --git a/third_party/blink/renderer/core/loader/modulescript/worker_module_script_fetcher.cc b/third_party/blink/renderer/core/loader/modulescript/worker_module_script_fetcher.cc
index 7e2b9e6..eb8a42a6 100644
--- a/third_party/blink/renderer/core/loader/modulescript/worker_module_script_fetcher.cc
+++ b/third_party/blink/renderer/core/loader/modulescript/worker_module_script_fetcher.cc
@@ -4,7 +4,7 @@
 
 #include "third_party/blink/renderer/core/loader/modulescript/worker_module_script_fetcher.h"
 
-#include "services/network/public/mojom/referrer_policy.mojom-blink.h"
+#include "services/network/public/mojom/referrer_policy.mojom-shared.h"
 #include "third_party/blink/renderer/core/inspector/console_message.h"
 #include "third_party/blink/renderer/core/origin_trials/origin_trial_context.h"
 #include "third_party/blink/renderer/core/workers/worker_global_scope.h"
diff --git a/third_party/blink/renderer/core/loader/prefetched_signed_exchange_manager.cc b/third_party/blink/renderer/core/loader/prefetched_signed_exchange_manager.cc
index aefb33c..2e5bb1f 100644
--- a/third_party/blink/renderer/core/loader/prefetched_signed_exchange_manager.cc
+++ b/third_party/blink/renderer/core/loader/prefetched_signed_exchange_manager.cc
@@ -7,7 +7,7 @@
 #include "base/callback.h"
 #include "base/memory/weak_ptr.h"
 #include "base/optional.h"
-#include "third_party/blink/public/mojom/devtools/console_message.mojom-blink.h"
+#include "third_party/blink/public/mojom/devtools/console_message.mojom-shared.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_url_load_timing.h"
diff --git a/third_party/blink/renderer/core/loader/prefetched_signed_exchange_manager.h b/third_party/blink/renderer/core/loader/prefetched_signed_exchange_manager.h
index 9cad373..834a906 100644
--- a/third_party/blink/renderer/core/loader/prefetched_signed_exchange_manager.h
+++ b/third_party/blink/renderer/core/loader/prefetched_signed_exchange_manager.h
@@ -6,7 +6,7 @@
 #define THIRD_PARTY_BLINK_RENDERER_CORE_LOADER_PREFETCHED_SIGNED_EXCHANGE_MANAGER_H_
 
 #include "base/macros.h"
-#include "services/network/public/mojom/url_loader_factory.mojom-blink.h"
+#include "services/network/public/mojom/url_loader_factory.mojom-shared.h"
 #include "third_party/blink/public/web/web_navigation_params.h"
 #include "third_party/blink/renderer/core/loader/preload_helper.h"
 #include "third_party/blink/renderer/platform/heap/garbage_collected.h"
diff --git a/third_party/blink/renderer/core/loader/previews_resource_loading_hints.cc b/third_party/blink/renderer/core/loader/previews_resource_loading_hints.cc
index 90606882..923532c 100644
--- a/third_party/blink/renderer/core/loader/previews_resource_loading_hints.cc
+++ b/third_party/blink/renderer/core/loader/previews_resource_loading_hints.cc
@@ -9,7 +9,7 @@
 #include "services/metrics/public/cpp/ukm_builders.h"
 #include "services/metrics/public/cpp/ukm_recorder.h"
 #include "third_party/blink/public/common/features.h"
-#include "third_party/blink/public/mojom/devtools/console_message.mojom-blink.h"
+#include "third_party/blink/public/mojom/devtools/console_message.mojom-shared.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/inspector/console_message.h"
diff --git a/third_party/blink/renderer/core/loader/private/prerender_handle.cc b/third_party/blink/renderer/core/loader/private/prerender_handle.cc
index 490c0d6..dfc2381 100644
--- a/third_party/blink/renderer/core/loader/private/prerender_handle.cc
+++ b/third_party/blink/renderer/core/loader/private/prerender_handle.cc
@@ -30,7 +30,7 @@
 
 #include "third_party/blink/renderer/core/loader/private/prerender_handle.h"
 
-#include "services/network/public/mojom/referrer_policy.mojom-blink.h"
+#include "services/network/public/mojom/referrer_policy.mojom-shared.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/loader/frame_loader.h"
diff --git a/third_party/blink/renderer/core/loader/resource/font_resource_test.cc b/third_party/blink/renderer/core/loader/resource/font_resource_test.cc
index c03c194..85b72c95 100644
--- a/third_party/blink/renderer/core/loader/resource/font_resource_test.cc
+++ b/third_party/blink/renderer/core/loader/resource/font_resource_test.cc
@@ -7,7 +7,7 @@
 #include "base/test/scoped_feature_list.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/blink/public/common/features.h"
-#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-blink.h"
+#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-shared.h"
 #include "third_party/blink/public/platform/platform.h"
 #include "third_party/blink/public/platform/web_url_loader_mock_factory.h"
 #include "third_party/blink/renderer/core/css/css_font_face_src_value.h"
diff --git a/third_party/blink/renderer/core/loader/resource/image_resource_test.cc b/third_party/blink/renderer/core/loader/resource/image_resource_test.cc
index 99fe809..67d1a28 100644
--- a/third_party/blink/renderer/core/loader/resource/image_resource_test.cc
+++ b/third_party/blink/renderer/core/loader/resource/image_resource_test.cc
@@ -33,7 +33,7 @@
 #include <memory>
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
-#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-blink.h"
+#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-shared.h"
 #include "third_party/blink/public/platform/platform.h"
 #include "third_party/blink/public/platform/web_url.h"
 #include "third_party/blink/public/platform/web_url_loader_mock_factory.h"
diff --git a/third_party/blink/renderer/core/loader/subresource_integrity_helper.cc b/third_party/blink/renderer/core/loader/subresource_integrity_helper.cc
index ccb865d14e..01782e6 100644
--- a/third_party/blink/renderer/core/loader/subresource_integrity_helper.cc
+++ b/third_party/blink/renderer/core/loader/subresource_integrity_helper.cc
@@ -4,7 +4,7 @@
 
 #include "third_party/blink/renderer/core/loader/subresource_integrity_helper.h"
 
-#include "third_party/blink/public/mojom/devtools/console_message.mojom-blink.h"
+#include "third_party/blink/public/mojom/devtools/console_message.mojom-shared.h"
 #include "third_party/blink/renderer/core/execution_context/execution_context.h"
 #include "third_party/blink/renderer/platform/instrumentation/use_counter.h"
 #include "third_party/blink/renderer/platform/runtime_enabled_features.h"
diff --git a/third_party/blink/renderer/core/loader/text_track_loader.cc b/third_party/blink/renderer/core/loader/text_track_loader.cc
index 0c16de8..48a27ed 100644
--- a/third_party/blink/renderer/core/loader/text_track_loader.cc
+++ b/third_party/blink/renderer/core/loader/text_track_loader.cc
@@ -25,7 +25,7 @@
 
 #include "third_party/blink/renderer/core/loader/text_track_loader.h"
 
-#include "services/network/public/mojom/fetch_api.mojom-blink.h"
+#include "services/network/public/mojom/fetch_api.mojom-shared.h"
 #include "third_party/blink/public/platform/task_type.h"
 #include "third_party/blink/renderer/core/dom/document.h"
 #include "third_party/blink/renderer/core/inspector/console_message.h"
diff --git a/third_party/blink/renderer/core/page/chrome_client.h b/third_party/blink/renderer/core/page/chrome_client.h
index 17be769..53baa47 100644
--- a/third_party/blink/renderer/core/page/chrome_client.h
+++ b/third_party/blink/renderer/core/page/chrome_client.h
@@ -32,7 +32,7 @@
 #include "cc/trees/paint_holding_commit_trigger.h"
 #include "third_party/blink/public/common/dom_storage/session_storage_namespace_id.h"
 #include "third_party/blink/public/common/feature_policy/feature_policy.h"
-#include "third_party/blink/public/mojom/devtools/console_message.mojom-blink.h"
+#include "third_party/blink/public/mojom/devtools/console_message.mojom-shared.h"
 #include "third_party/blink/public/platform/blame_context.h"
 #include "third_party/blink/public/platform/web_drag_operation.h"
 #include "third_party/blink/public/platform/web_focus_type.h"
diff --git a/third_party/blink/renderer/core/paint/ng/ng_box_fragment_painter.cc b/third_party/blink/renderer/core/paint/ng/ng_box_fragment_painter.cc
index 6d2285ec..ed73f2e 100644
--- a/third_party/blink/renderer/core/paint/ng/ng_box_fragment_painter.cc
+++ b/third_party/blink/renderer/core/paint/ng/ng_box_fragment_painter.cc
@@ -358,7 +358,7 @@
         NGBoxFragmentPainter(*child).Paint(paint_info);
     } else {
       DCHECK(fragment.Type() == NGPhysicalFragment::kFragmentRenderedLegend)
-          << fragment.ToString();
+          << fragment;
     }
   }
 }
diff --git a/third_party/blink/renderer/core/paint/ng/ng_text_fragment_painter.cc b/third_party/blink/renderer/core/paint/ng/ng_text_fragment_painter.cc
index 711f7e66..573e9de 100644
--- a/third_party/blink/renderer/core/paint/ng/ng_text_fragment_painter.cc
+++ b/third_party/blink/renderer/core/paint/ng/ng_text_fragment_painter.cc
@@ -105,8 +105,10 @@
     return;
   if (rect.size.IsEmpty())
     return;
-  const PhysicalRect global_rect(rect.offset + location, rect.size);
-  context.FillRect(FloatRect(global_rect), color);
+  const IntRect pixel_snapped_rect =
+      PixelSnappedIntRect(PhysicalRect(rect.offset + location, rect.size));
+  if (!pixel_snapped_rect.IsEmpty())
+    context.FillRect(pixel_snapped_rect, color);
 }
 
 PhysicalRect MarkerRectForForeground(
diff --git a/third_party/blink/renderer/core/script/document_write_intervention.cc b/third_party/blink/renderer/core/script/document_write_intervention.cc
index e4bb7522..c2df36e 100644
--- a/third_party/blink/renderer/core/script/document_write_intervention.cc
+++ b/third_party/blink/renderer/core/script/document_write_intervention.cc
@@ -4,7 +4,7 @@
 
 #include "third_party/blink/renderer/core/script/document_write_intervention.h"
 
-#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-blink.h"
+#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-shared.h"
 #include "third_party/blink/public/platform/web_effective_connection_type.h"
 #include "third_party/blink/renderer/core/frame/local_frame.h"
 #include "third_party/blink/renderer/core/frame/local_frame_client.h"
diff --git a/third_party/blink/renderer/core/script/fetch_client_settings_object_impl.h b/third_party/blink/renderer/core/script/fetch_client_settings_object_impl.h
index a01b4a1..c4df60f1 100644
--- a/third_party/blink/renderer/core/script/fetch_client_settings_object_impl.h
+++ b/third_party/blink/renderer/core/script/fetch_client_settings_object_impl.h
@@ -5,7 +5,7 @@
 #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_SCRIPT_FETCH_CLIENT_SETTINGS_OBJECT_IMPL_H_
 #define THIRD_PARTY_BLINK_RENDERER_CORE_SCRIPT_FETCH_CLIENT_SETTINGS_OBJECT_IMPL_H_
 
-#include "services/network/public/mojom/referrer_policy.mojom-blink.h"
+#include "services/network/public/mojom/referrer_policy.mojom-shared.h"
 #include "third_party/blink/renderer/core/core_export.h"
 #include "third_party/blink/renderer/platform/heap/member.h"
 #include "third_party/blink/renderer/platform/loader/fetch/fetch_client_settings_object.h"
diff --git a/third_party/blink/renderer/core/script/modulator.h b/third_party/blink/renderer/core/script/modulator.h
index 9f67b4e..6024d69f 100644
--- a/third_party/blink/renderer/core/script/modulator.h
+++ b/third_party/blink/renderer/core/script/modulator.h
@@ -6,7 +6,7 @@
 #define THIRD_PARTY_BLINK_RENDERER_CORE_SCRIPT_MODULATOR_H_
 
 #include "base/single_thread_task_runner.h"
-#include "services/network/public/mojom/referrer_policy.mojom-blink.h"
+#include "services/network/public/mojom/referrer_policy.mojom-shared.h"
 #include "third_party/blink/public/platform/web_url_request.h"
 #include "third_party/blink/renderer/bindings/core/v8/module_record.h"
 #include "third_party/blink/renderer/bindings/core/v8/sanitize_script_errors.h"
diff --git a/third_party/blink/renderer/core/script/pending_script.cc b/third_party/blink/renderer/core/script/pending_script.cc
index 4eaebf8..a549f857 100644
--- a/third_party/blink/renderer/core/script/pending_script.cc
+++ b/third_party/blink/renderer/core/script/pending_script.cc
@@ -25,7 +25,7 @@
 
 #include "third_party/blink/renderer/core/script/pending_script.h"
 
-#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-blink.h"
+#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-shared.h"
 #include "third_party/blink/renderer/bindings/core/v8/script_controller.h"
 #include "third_party/blink/renderer/core/dom/document.h"
 #include "third_party/blink/renderer/core/dom/document_parser_timing.h"
diff --git a/third_party/blink/renderer/core/script/resources/layered_api/elements/switch/index.mjs b/third_party/blink/renderer/core/script/resources/layered_api/elements/switch/index.mjs
index 7a75560..9996059 100644
--- a/third_party/blink/renderer/core/script/resources/layered_api/elements/switch/index.mjs
+++ b/third_party/blink/renderer/core/script/resources/layered_api/elements/switch/index.mjs
@@ -27,6 +27,10 @@
 
   constructor() {
     super();
+    if (new.target !== StdSwitchElement) {
+      throw new TypeError('Illegal constructor: StdSwitchElement is not ' +
+                          'extensible for now');
+    }
     this[_internals] = this.attachInternals();
     this._initializeDOM();
   }
diff --git a/third_party/blink/renderer/core/script/resources/layered_api/elements/toast/index.mjs b/third_party/blink/renderer/core/script/resources/layered_api/elements/toast/index.mjs
index 36d24e5e..e9c0bb4 100644
--- a/third_party/blink/renderer/core/script/resources/layered_api/elements/toast/index.mjs
+++ b/third_party/blink/renderer/core/script/resources/layered_api/elements/toast/index.mjs
@@ -10,7 +10,7 @@
  * @package
  */
 
-const DEFAULT_DURATION = 2000;
+const DEFAULT_DURATION = 3000;
 
 function stylesheetFactory() {
   let stylesheet;
diff --git a/third_party/blink/renderer/core/script/resources/layered_api/kv-storage/async_iterator.mjs b/third_party/blink/renderer/core/script/resources/layered_api/kv-storage/async_iterator.mjs
index 0da4854..a83dba4 100644
--- a/third_party/blink/renderer/core/script/resources/layered_api/kv-storage/async_iterator.mjs
+++ b/third_party/blink/renderer/core/script/resources/layered_api/kv-storage/async_iterator.mjs
@@ -16,6 +16,8 @@
 const StorageAreaAsyncIteratorPrototype = {
   __proto__: AsyncIteratorPrototype,
 
+  [Symbol.toStringTag]: 'StorageArea AsyncIterator',
+
   next() {
     const performDatabaseOperation = _performDatabaseOperation.get(this);
     if (!performDatabaseOperation) {
@@ -42,6 +44,12 @@
   },
 };
 
+Object.defineProperty(
+  StorageAreaAsyncIteratorPrototype,
+  Symbol.toStringTag,
+  {writable: false, enumerable: false}
+);
+
 function getNextIterResult(iter, performDatabaseOperation) {
   return performDatabaseOperation(async (transaction, store) => {
     const lastKey = _lastKey.get(iter);
diff --git a/third_party/blink/renderer/core/script/resources/layered_api/kv-storage/index.mjs b/third_party/blink/renderer/core/script/resources/layered_api/kv-storage/index.mjs
index 9bf5ca5..69bc850 100644
--- a/third_party/blink/renderer/core/script/resources/layered_api/kv-storage/index.mjs
+++ b/third_party/blink/renderer/core/script/resources/layered_api/kv-storage/index.mjs
@@ -132,6 +132,23 @@
 }
 
 StorageArea.prototype[Symbol.asyncIterator] = StorageArea.prototype.entries;
+StorageArea.prototype[Symbol.toStringTag] = 'StorageArea';
+
+// Override the defaults that are implied by using class declarations and
+// assignment, to be more Web IDL-ey.
+// https://github.com/heycam/webidl/issues/738 may modify these a bit.
+Object.defineProperties(StorageArea.prototype, {
+  set: {enumerable: true},
+  get: {enumerable: true},
+  delete: {enumerable: true},
+  clear: {enumerable: true},
+  keys: {enumerable: true},
+  values: {enumerable: true},
+  entries: {enumerable: true},
+  backingStore: {enumerable: true},
+  [Symbol.asyncIterator]: {enumerable: false},
+  [Symbol.toStringTag]: {writable: false, enumerable: false}
+});
 
 export const storage = new StorageArea(DEFAULT_STORAGE_AREA_NAME);
 
diff --git a/third_party/blink/renderer/core/trustedtypes/trusted_type_policy_factory.cc b/third_party/blink/renderer/core/trustedtypes/trusted_type_policy_factory.cc
index 2574683..d087bdc 100644
--- a/third_party/blink/renderer/core/trustedtypes/trusted_type_policy_factory.cc
+++ b/third_party/blink/renderer/core/trustedtypes/trusted_type_policy_factory.cc
@@ -4,7 +4,7 @@
 
 #include "third_party/blink/renderer/core/trustedtypes/trusted_type_policy_factory.h"
 
-#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-blink.h"
+#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-shared.h"
 #include "third_party/blink/renderer/bindings/core/v8/script_value.h"
 #include "third_party/blink/renderer/bindings/core/v8/v8_trusted_html.h"
 #include "third_party/blink/renderer/bindings/core/v8/v8_trusted_script.h"
diff --git a/third_party/blink/renderer/core/workers/dedicated_worker_messaging_proxy.cc b/third_party/blink/renderer/core/workers/dedicated_worker_messaging_proxy.cc
index 03063be..12bd236 100644
--- a/third_party/blink/renderer/core/workers/dedicated_worker_messaging_proxy.cc
+++ b/third_party/blink/renderer/core/workers/dedicated_worker_messaging_proxy.cc
@@ -5,7 +5,7 @@
 #include "third_party/blink/renderer/core/workers/dedicated_worker_messaging_proxy.h"
 
 #include <memory>
-#include "services/network/public/mojom/fetch_api.mojom-blink.h"
+#include "services/network/public/mojom/fetch_api.mojom-shared.h"
 #include "third_party/blink/public/platform/task_type.h"
 #include "third_party/blink/renderer/bindings/core/v8/sanitize_script_errors.h"
 #include "third_party/blink/renderer/bindings/core/v8/v8_cache_options.h"
diff --git a/third_party/blink/renderer/core/workers/dedicated_worker_messaging_proxy.h b/third_party/blink/renderer/core/workers/dedicated_worker_messaging_proxy.h
index 0347fe0d..4e963e8 100644
--- a/third_party/blink/renderer/core/workers/dedicated_worker_messaging_proxy.h
+++ b/third_party/blink/renderer/core/workers/dedicated_worker_messaging_proxy.h
@@ -9,7 +9,7 @@
 #include "base/macros.h"
 #include "base/memory/scoped_refptr.h"
 #include "base/optional.h"
-#include "services/network/public/mojom/referrer_policy.mojom-blink.h"
+#include "services/network/public/mojom/referrer_policy.mojom-shared.h"
 #include "third_party/blink/public/mojom/messaging/transferable_message.mojom-blink.h"
 #include "third_party/blink/renderer/core/core_export.h"
 #include "third_party/blink/renderer/core/messaging/message_port.h"
diff --git a/third_party/blink/renderer/core/workers/global_scope_creation_params.h b/third_party/blink/renderer/core/workers/global_scope_creation_params.h
index 1e844d51..0a1aad3 100644
--- a/third_party/blink/renderer/core/workers/global_scope_creation_params.h
+++ b/third_party/blink/renderer/core/workers/global_scope_creation_params.h
@@ -9,7 +9,7 @@
 #include "base/macros.h"
 #include "base/optional.h"
 #include "base/unguessable_token.h"
-#include "services/network/public/mojom/referrer_policy.mojom-blink.h"
+#include "services/network/public/mojom/referrer_policy.mojom-shared.h"
 #include "services/service_manager/public/mojom/interface_provider.mojom-blink.h"
 #include "third_party/blink/public/common/feature_policy/feature_policy.h"
 #include "third_party/blink/public/mojom/net/ip_address_space.mojom-blink.h"
diff --git a/third_party/blink/renderer/core/workers/threaded_messaging_proxy_base.h b/third_party/blink/renderer/core/workers/threaded_messaging_proxy_base.h
index b5c0674..a1a7417 100644
--- a/third_party/blink/renderer/core/workers/threaded_messaging_proxy_base.h
+++ b/third_party/blink/renderer/core/workers/threaded_messaging_proxy_base.h
@@ -6,7 +6,7 @@
 #define THIRD_PARTY_BLINK_RENDERER_CORE_WORKERS_THREADED_MESSAGING_PROXY_BASE_H_
 
 #include "base/optional.h"
-#include "third_party/blink/public/mojom/devtools/console_message.mojom-blink.h"
+#include "third_party/blink/public/mojom/devtools/console_message.mojom-shared.h"
 #include "third_party/blink/renderer/core/core_export.h"
 #include "third_party/blink/renderer/core/frame/web_feature_forward.h"
 #include "third_party/blink/renderer/core/workers/parent_execution_context_task_runners.h"
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 4a8ad69..4a2b32fb 100644
--- a/third_party/blink/renderer/core/workers/worker_global_scope.h
+++ b/third_party/blink/renderer/core/workers/worker_global_scope.h
@@ -28,7 +28,7 @@
 #define THIRD_PARTY_BLINK_RENDERER_CORE_WORKERS_WORKER_GLOBAL_SCOPE_H_
 
 #include <memory>
-#include "services/network/public/mojom/fetch_api.mojom-blink.h"
+#include "services/network/public/mojom/fetch_api.mojom-shared.h"
 #include "services/service_manager/public/cpp/interface_provider.h"
 #include "services/service_manager/public/mojom/interface_provider.mojom-blink.h"
 #include "third_party/blink/public/mojom/net/ip_address_space.mojom-blink.h"
diff --git a/third_party/blink/renderer/core/workers/worker_or_worklet_global_scope.h b/third_party/blink/renderer/core/workers/worker_or_worklet_global_scope.h
index 2184df6..7d69a20 100644
--- a/third_party/blink/renderer/core/workers/worker_or_worklet_global_scope.h
+++ b/third_party/blink/renderer/core/workers/worker_or_worklet_global_scope.h
@@ -7,7 +7,7 @@
 
 #include <bitset>
 #include "base/single_thread_task_runner.h"
-#include "services/network/public/mojom/fetch_api.mojom-blink.h"
+#include "services/network/public/mojom/fetch_api.mojom-shared.h"
 #include "third_party/blink/public/platform/web_url_request.h"
 #include "third_party/blink/renderer/bindings/core/v8/v8_cache_options.h"
 #include "third_party/blink/renderer/core/core_export.h"
diff --git a/third_party/blink/renderer/core/workers/worker_reporting_proxy.h b/third_party/blink/renderer/core/workers/worker_reporting_proxy.h
index d1ecd27..239d436 100644
--- a/third_party/blink/renderer/core/workers/worker_reporting_proxy.h
+++ b/third_party/blink/renderer/core/workers/worker_reporting_proxy.h
@@ -32,7 +32,7 @@
 #define THIRD_PARTY_BLINK_RENDERER_CORE_WORKERS_WORKER_REPORTING_PROXY_H_
 
 #include <memory>
-#include "third_party/blink/public/mojom/devtools/console_message.mojom-blink.h"
+#include "third_party/blink/public/mojom/devtools/console_message.mojom-shared.h"
 #include "third_party/blink/renderer/bindings/core/v8/source_location.h"
 #include "third_party/blink/renderer/core/core_export.h"
 #include "third_party/blink/renderer/core/frame/web_feature_forward.h"
diff --git a/third_party/blink/renderer/core/workers/worker_thread.h b/third_party/blink/renderer/core/workers/worker_thread.h
index 45790f6..d6cddf3f 100644
--- a/third_party/blink/renderer/core/workers/worker_thread.h
+++ b/third_party/blink/renderer/core/workers/worker_thread.h
@@ -35,7 +35,7 @@
 #include "base/synchronization/waitable_event.h"
 #include "base/thread_annotations.h"
 #include "base/unguessable_token.h"
-#include "services/network/public/mojom/fetch_api.mojom-blink.h"
+#include "services/network/public/mojom/fetch_api.mojom-shared.h"
 #include "third_party/blink/public/platform/platform.h"
 #include "third_party/blink/public/platform/web_thread_type.h"
 #include "third_party/blink/renderer/core/core_export.h"
diff --git a/third_party/blink/renderer/core/workers/worklet.cc b/third_party/blink/renderer/core/workers/worklet.cc
index 7dde393..f8aff6c5 100644
--- a/third_party/blink/renderer/core/workers/worklet.cc
+++ b/third_party/blink/renderer/core/workers/worklet.cc
@@ -5,8 +5,8 @@
 #include "third_party/blink/renderer/core/workers/worklet.h"
 
 #include "base/single_thread_task_runner.h"
-#include "services/network/public/mojom/fetch_api.mojom-blink.h"
-#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-blink.h"
+#include "services/network/public/mojom/fetch_api.mojom-shared.h"
+#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-shared.h"
 #include "third_party/blink/public/platform/task_type.h"
 #include "third_party/blink/public/platform/web_url_request.h"
 #include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h"
diff --git a/third_party/blink/renderer/devtools/front_end/color_picker/ContrastDetails.js b/third_party/blink/renderer/devtools/front_end/color_picker/ContrastDetails.js
index 77e5086..ff20719b 100644
--- a/third_party/blink/renderer/devtools/front_end/color_picker/ContrastDetails.js
+++ b/third_party/blink/renderer/devtools/front_end/color_picker/ContrastDetails.js
@@ -61,7 +61,6 @@
     expandToolbar.appendToolbarItem(this._expandButton);
 
     this._expandedDetails = this._element.createChild('div', 'expanded-details');
-    this._expandedDetails.id = 'expanded-contrast-details';
     UI.ARIAUtils.setControls(this._expandButton.element, this._expandedDetails);
 
     this._contrastThresholds = this._expandedDetails.createChild('div', 'contrast-thresholds');
diff --git a/third_party/blink/renderer/devtools/front_end/dom_extension/DOMExtension.js b/third_party/blink/renderer/devtools/front_end/dom_extension/DOMExtension.js
index 708adc2d..2574dec4 100644
--- a/third_party/blink/renderer/devtools/front_end/dom_extension/DOMExtension.js
+++ b/third_party/blink/renderer/devtools/front_end/dom_extension/DOMExtension.js
@@ -229,6 +229,27 @@
 };
 
 /**
+ * @return {?Node}
+ */
+Node.prototype.enclosingShadowRoot = function() {
+  let parentNode = this.parentNodeOrShadowHost();
+  while (parentNode) {
+    if (parentNode instanceof ShadowRoot)
+      return parentNode;
+    parentNode = parentNode.parentNodeOrShadowHost();
+  }
+  return null;
+};
+
+/**
+ * @param {!Node} node
+ * @return {boolean}
+ */
+Node.prototype.hasSameShadowRoot = function(node) {
+  return this.enclosingShadowRoot() === node.enclosingShadowRoot();
+};
+
+/**
  * @return {?Element}
  */
 Node.prototype.parentElementOrShadowHost = function() {
diff --git a/third_party/blink/renderer/devtools/front_end/perf_ui/PieChart.js b/third_party/blink/renderer/devtools/front_end/perf_ui/PieChart.js
index 4ce73b2..a10c394 100644
--- a/third_party/blink/renderer/devtools/front_end/perf_ui/PieChart.js
+++ b/third_party/blink/renderer/devtools/front_end/perf_ui/PieChart.js
@@ -88,7 +88,7 @@
     if (this._legend) {
       this._legend.removeChildren();
       const legendItem = this._addLegendItem(totalValue, ls`Total`);
-      UI.ARIAUtils.setLabelledBy(this._totalElement, legendItem);
+      UI.ARIAUtils.setLabelledBy(this._totalElement, [legendItem]);
     }
   }
 
@@ -130,7 +130,7 @@
     this._slices.push(path);
     if (this._legend) {
       const legendItem = this._addLegendItem(value, name, color);
-      UI.ARIAUtils.setLabelledBy(path, legendItem);
+      UI.ARIAUtils.setLabelledBy(path, [legendItem]);
     }
   }
 
diff --git a/third_party/blink/renderer/devtools/front_end/profiler/HeapSnapshotView.js b/third_party/blink/renderer/devtools/front_end/profiler/HeapSnapshotView.js
index 6bedd8e..8cad326 100644
--- a/third_party/blink/renderer/devtools/front_end/profiler/HeapSnapshotView.js
+++ b/third_party/blink/renderer/devtools/front_end/profiler/HeapSnapshotView.js
@@ -1167,6 +1167,8 @@
   constructor() {
     super(Profiler.TrackingHeapSnapshotProfileType.TypeId, ls`Allocation instrumentation on timeline`);
     this._recordAllocationStacksSetting = Common.settings.createSetting('recordAllocationStacks', false);
+    /** @type {?UI.CheckboxLabel} */
+    this._customContent = null;
   }
 
   /**
@@ -1269,8 +1271,18 @@
    * @return {?Element}
    */
   customContent() {
-    return UI.SettingsUI.createSettingCheckbox(
+    const checkboxSetting = UI.SettingsUI.createSettingCheckbox(
         ls`Record allocation stacks (extra performance overhead)`, this._recordAllocationStacksSetting, true);
+    this._customContent = /** @type {!UI.CheckboxLabel} */ (checkboxSetting);
+    return checkboxSetting;
+  }
+
+  /**
+   * @override
+   * @param {boolean} enable
+   */
+  setCustomContentEnabled(enable) {
+    this._customContent.checkboxElement.disabled = !enable;
   }
 
   /**
diff --git a/third_party/blink/renderer/devtools/front_end/profiler/IsolateSelector.js b/third_party/blink/renderer/devtools/front_end/profiler/IsolateSelector.js
index e32dd0f8..ac7b71d 100644
--- a/third_party/blink/renderer/devtools/front_end/profiler/IsolateSelector.js
+++ b/third_party/blink/renderer/devtools/front_end/profiler/IsolateSelector.js
@@ -14,6 +14,9 @@
     this._items = new UI.ListModel();
     /** @type {!UI.ListControl<!Profiler.IsolateSelector.ListItem>} */
     this._list = new UI.ListControl(this._items, this, UI.ListMode.NonViewport);
+    UI.ARIAUtils.markAsListBox(this._list.element);
+    this._list.element.tabIndex = 0;
+    UI.ARIAUtils.setAccessibleName(this._list.element, ls`JavaScript VM instances`);
     this.contentElement.appendChild(this._list.element);
 
     /** @type {!Map<!SDK.IsolateManager.Isolate, !Profiler.IsolateSelector.ListItem>} */
@@ -196,11 +199,14 @@
     this._isolate = isolate;
     const trendIntervalMinutes = Math.round(SDK.IsolateManager.MemoryTrendWindowMs / 60e3);
     this.element = createElementWithClass('div', 'profile-memory-usage-item hbox');
+    UI.ARIAUtils.markAsOption(this.element);
     this._heapDiv = this.element.createChild('div', 'profile-memory-usage-item-size');
-    this._trendDiv = this.element.createChild('div', 'profile-memory-usage-item-trend');
-    this._nameDiv = this.element.createChild('div', 'profile-memory-usage-item-name');
     this._heapDiv.title = ls`Heap size in use by live JS objects.`;
+    this._trendDiv = this.element.createChild('div', 'profile-memory-usage-item-trend');
     this._trendDiv.title = ls`Heap size change trend over the last ${trendIntervalMinutes} minutes.`;
+    this._nameDiv = this.element.createChild('div', 'profile-memory-usage-item-name');
+    UI.ARIAUtils.setLabelledBy(this.element, [this._nameDiv]);
+    UI.ARIAUtils.setDescribedBy(this.element, [this._heapDiv, this._trendDiv]);
     this.updateTitle();
   }
 
diff --git a/third_party/blink/renderer/devtools/front_end/profiler/ProfileLauncherView.js b/third_party/blink/renderer/devtools/front_end/profiler/ProfileLauncherView.js
index f0787a717..0c78dcd 100644
--- a/third_party/blink/renderer/devtools/front_end/profiler/ProfileLauncherView.js
+++ b/third_party/blink/renderer/devtools/front_end/profiler/ProfileLauncherView.js
@@ -47,6 +47,8 @@
     this._selectedProfileTypeSetting = Common.settings.createSetting('selectedProfileType', 'CPU');
     this._profileTypeHeaderElement = profileTypeSelectorElement.createChild('h1');
     this._profileTypeSelectorForm = profileTypeSelectorElement.createChild('form');
+    UI.ARIAUtils.markAsRadioGroup(this._profileTypeSelectorForm);
+    UI.ARIAUtils.setLabelledBy(this._profileTypeSelectorForm, [this._profileTypeHeaderElement]);
 
     const isolateSelectorElement = this._contentElement.createChild('div', 'vbox profile-isolate-selector-block');
     isolateSelectorElement.createChild('h1').textContent = ls`Select JavaScript VM instance`;
@@ -126,9 +128,12 @@
     optionElement.addEventListener('change', this._profileTypeChanged.bind(this, profileType), false);
     const descriptionElement = this._profileTypeSelectorForm.createChild('p');
     descriptionElement.textContent = profileType.description;
+    UI.ARIAUtils.setDescribedBy(optionElement, [descriptionElement]);
     const customContent = profileType.customContent();
-    if (customContent)
+    if (customContent) {
       this._profileTypeSelectorForm.createChild('p').appendChild(customContent);
+      profileType.setCustomContentEnabled(false);
+    }
     if (this._typeIdToOptionElement.size > 1)
       this._profileTypeHeaderElement.textContent = ls`Select profiling type`;
     else
@@ -137,10 +142,16 @@
 
   restoreSelectedProfileType() {
     let typeId = this._selectedProfileTypeSetting.get();
-    if (!this._typeIdToOptionElement.has(typeId))
+    if (!this._typeIdToOptionElement.has(typeId)) {
       typeId = this._typeIdToOptionElement.keys().next().value;
+      this._selectedProfileTypeSetting.set(typeId);
+    }
     this._typeIdToOptionElement.get(typeId).checked = true;
     const type = this._typeIdToOptionElement.get(typeId)._profileType;
+    for (const [id, element] of this._typeIdToOptionElement) {
+      const enabled = (id === typeId);
+      element._profileType.setCustomContentEnabled(enabled);
+    }
     this.dispatchEventToListeners(Profiler.ProfileLauncherView.Events.ProfileTypeSelected, type);
   }
 
@@ -152,6 +163,10 @@
    * @param {!Profiler.ProfileType} profileType
    */
   _profileTypeChanged(profileType) {
+    const typeId = this._selectedProfileTypeSetting.get();
+    const type = this._typeIdToOptionElement.get(typeId)._profileType;
+    type.setCustomContentEnabled(false);
+    profileType.setCustomContentEnabled(true);
     this.dispatchEventToListeners(Profiler.ProfileLauncherView.Events.ProfileTypeSelected, profileType);
     this._isInstantProfile = profileType.isInstantProfile();
     this._isEnabled = profileType.isEnabled();
diff --git a/third_party/blink/renderer/devtools/front_end/profiler/ProfileType.js b/third_party/blink/renderer/devtools/front_end/profiler/ProfileType.js
index da6ce76..9bba187 100644
--- a/third_party/blink/renderer/devtools/front_end/profiler/ProfileType.js
+++ b/third_party/blink/renderer/devtools/front_end/profiler/ProfileType.js
@@ -124,6 +124,12 @@
   }
 
   /**
+   * @param {boolean} enable
+   */
+  setCustomContentEnabled(enable) {
+  }
+
+  /**
    * @param {number} uid
    * @return {?Profiler.ProfileHeader}
    */
diff --git a/third_party/blink/renderer/devtools/front_end/profiler/profileLauncherView.css b/third_party/blink/renderer/devtools/front_end/profiler/profileLauncherView.css
index 24824af..34552519 100644
--- a/third_party/blink/renderer/devtools/front_end/profiler/profileLauncherView.css
+++ b/third_party/blink/renderer/devtools/front_end/profiler/profileLauncherView.css
@@ -24,7 +24,7 @@
 }
 
 .profile-launcher-view-content p {
-    color: grey;
+    color: hsl(0, 0%, 45%);
     margin-top: 1px;
     margin-left: 22px;
 }
diff --git a/third_party/blink/renderer/devtools/front_end/profiler/profiler_strings.grdp b/third_party/blink/renderer/devtools/front_end/profiler/profiler_strings.grdp
index bbbc04f..de5de36 100644
--- a/third_party/blink/renderer/devtools/front_end/profiler/profiler_strings.grdp
+++ b/third_party/blink/renderer/devtools/front_end/profiler/profiler_strings.grdp
@@ -81,6 +81,9 @@
   <message name="IDS_DEVTOOLS_2f318b400ebcb22420251535452efef0" desc="">
     Containment
   </message>
+  <message name="IDS_DEVTOOLS_30f4a219667bb46c6fc92f3d665a866c" desc="aria label for javascript VM instances target list in heap profiler">
+    JavaScript VM instances
+  </message>
   <message name="IDS_DEVTOOLS_32e679bdbd5dd7a0bacf024bc30e8a75" desc="">
     Recording…
   </message>
diff --git a/third_party/blink/renderer/devtools/front_end/settings/SettingsScreen.js b/third_party/blink/renderer/devtools/front_end/settings/SettingsScreen.js
index 9516d00..3e2b551 100644
--- a/third_party/blink/renderer/devtools/front_end/settings/SettingsScreen.js
+++ b/third_party/blink/renderer/devtools/front_end/settings/SettingsScreen.js
@@ -135,7 +135,7 @@
       const title = block.createChild('div', 'settings-section-title');
       title.textContent = name;
       UI.ARIAUtils.markAsHeading(title, 2);
-      UI.ARIAUtils.setLabelledBy(block, title);
+      UI.ARIAUtils.setLabelledBy(block, [title]);
     }
     return block;
   }
diff --git a/third_party/blink/renderer/devtools/front_end/ui/ARIAUtils.js b/third_party/blink/renderer/devtools/front_end/ui/ARIAUtils.js
index d1aaeaf..1fa34a3 100644
--- a/third_party/blink/renderer/devtools/front_end/ui/ARIAUtils.js
+++ b/third_party/blink/renderer/devtools/front_end/ui/ARIAUtils.js
@@ -96,6 +96,29 @@
 };
 
 /**
+ * Must contain children whose role is option.
+ * @param {!Element} element
+ */
+UI.ARIAUtils.markAsListBox = function(element) {
+  element.setAttribute('role', 'listbox');
+};
+
+/**
+ * Must be contained in, or owned by, an element with the role listbox.
+ * @param {!Element} element
+ */
+UI.ARIAUtils.markAsOption = function(element) {
+  element.setAttribute('role', 'option');
+};
+
+/**
+ * @param {!Element} element
+ */
+UI.ARIAUtils.markAsRadioGroup = function(element) {
+  element.setAttribute('role', 'radiogroup');
+};
+
+/**
  * @param {!Element} element
  */
 UI.ARIAUtils.markAsHidden = function(element) {
@@ -155,9 +178,7 @@
     return;
   }
 
-  if (controlledElement.id === '')
-    throw new Error('Controlled element must have ID');
-
+  UI.ARIAUtils.ensureId(controlledElement);
   element.setAttribute('aria-controls', controlledElement.id);
 };
 
@@ -216,11 +237,50 @@
 
 /**
  * @param {!Element} element
- * @param {!Element} labelElement
+ * @param {!Array<!Element>} labelElements
  */
-UI.ARIAUtils.setLabelledBy = function(element, labelElement) {
-  UI.ARIAUtils.ensureId(labelElement);
-  element.setAttribute('aria-labelledby', labelElement.id);
+UI.ARIAUtils.setLabelledBy = function(element, labelElements) {
+  let labelledby = '';
+  for (const labelElement of labelElements) {
+    console.assert(element.hasSameShadowRoot(labelElement), 'elements are not in the same shadow dom');
+
+    UI.ARIAUtils.ensureId(labelElement);
+    labelledby += labelElement.id + ' ';
+  }
+
+  element.setAttribute('aria-labelledby', labelledby);
+};
+
+/**
+ * @param {!Element} element
+ * @param {!Array<!Element>} descriptionElements
+ */
+UI.ARIAUtils.setDescribedBy = function(element, descriptionElements) {
+  let describedby = '';
+  for (const descriptionElement of descriptionElements) {
+    console.assert(element.hasSameShadowRoot(descriptionElement), 'elements are not in the same shadow dom');
+
+    UI.ARIAUtils.ensureId(descriptionElement);
+    describedby += descriptionElement.id + ' ';
+  }
+
+  element.setAttribute('aria-describedby', describedby);
+};
+
+/**
+ * @param {!Element} element
+ * @param {?Element} activedescendant
+ */
+UI.ARIAUtils.setActiveDescendant = function(element, activedescendant) {
+  if (!activedescendant) {
+    element.removeAttribute('aria-activedescendant');
+    return;
+  }
+
+  console.assert(element.hasSameShadowRoot(activedescendant), 'elements are not in the same shadow dom');
+
+  UI.ARIAUtils.ensureId(activedescendant);
+  element.setAttribute('aria-activedescendant', activedescendant.id);
 };
 
 /**
diff --git a/third_party/blink/renderer/devtools/front_end/ui/ListControl.js b/third_party/blink/renderer/devtools/front_end/ui/ListControl.js
index f30619c0..239e094 100644
--- a/third_party/blink/renderer/devtools/front_end/ui/ListControl.js
+++ b/third_party/blink/renderer/devtools/front_end/ui/ListControl.js
@@ -448,6 +448,11 @@
     this._selectedItem = index === -1 ? null : this._model.at(index);
     const newItem = this._selectedItem;
     const newElement = this._selectedIndex !== -1 ? this._elementAtIndex(index) : null;
+    if (oldElement)
+      UI.ARIAUtils.setSelected(oldElement, false);
+    if (newElement)
+      UI.ARIAUtils.setSelected(newElement, true);
+    UI.ARIAUtils.setActiveDescendant(this.element, newElement);
     this._delegate.selectedItemChanged(oldItem, newItem, /** @type {?Element} */ (oldElement), newElement);
   }
 
diff --git a/third_party/blink/renderer/modules/accessibility/ax_layout_object.cc b/third_party/blink/renderer/modules/accessibility/ax_layout_object.cc
index 93c66b5..fc15734 100644
--- a/third_party/blink/renderer/modules/accessibility/ax_layout_object.cc
+++ b/third_party/blink/renderer/modules/accessibility/ax_layout_object.cc
@@ -2780,8 +2780,11 @@
   if (!parent)
     return ax::mojom::Role::kGenericContainer;
 
-  if (parent->RoleValue() == ax::mojom::Role::kGroup)
+  if (parent->RoleValue() == ax::mojom::Role::kGroup) {
     parent = parent->ParentObjectUnignored();
+    if (!parent)
+      return ax::mojom::Role::kGenericContainer;
+  }
 
   if (parent->RoleValue() == ax::mojom::Role::kLayoutTable)
     return ax::mojom::Role::kLayoutTableRow;
diff --git a/third_party/blink/renderer/modules/exported/web_embedded_worker_impl.cc b/third_party/blink/renderer/modules/exported/web_embedded_worker_impl.cc
index 9b20712d..442dbd1 100644
--- a/third_party/blink/renderer/modules/exported/web_embedded_worker_impl.cc
+++ b/third_party/blink/renderer/modules/exported/web_embedded_worker_impl.cc
@@ -34,7 +34,7 @@
 #include <utility>
 #include "base/feature_list.h"
 #include "services/network/public/cpp/shared_url_loader_factory.h"
-#include "services/network/public/mojom/referrer_policy.mojom-blink.h"
+#include "services/network/public/mojom/referrer_policy.mojom-shared.h"
 #include "third_party/blink/public/common/features.h"
 #include "third_party/blink/public/mojom/service_worker/service_worker_installed_scripts_manager.mojom-blink.h"
 #include "third_party/blink/public/platform/modules/service_worker/web_service_worker_network_provider.h"
diff --git a/third_party/blink/renderer/modules/launch/dom_window_launch_params.cc b/third_party/blink/renderer/modules/launch/dom_window_launch_params.cc
index a574964..66edc6f4 100644
--- a/third_party/blink/renderer/modules/launch/dom_window_launch_params.cc
+++ b/third_party/blink/renderer/modules/launch/dom_window_launch_params.cc
@@ -80,7 +80,7 @@
     // params from the browser process, use that instead of hard coding the
     // launch params.
     supplement->launch_params_ = MakeGarbageCollected<LaunchParams>(
-        "default", HeapVector<Member<NativeFileSystemHandle>>());
+        HeapVector<Member<NativeFileSystemHandle>>());
   }
   return supplement;
 }
diff --git a/third_party/blink/renderer/modules/launch/launch_params.cc b/third_party/blink/renderer/modules/launch/launch_params.cc
index e04084f..6c0e963 100644
--- a/third_party/blink/renderer/modules/launch/launch_params.cc
+++ b/third_party/blink/renderer/modules/launch/launch_params.cc
@@ -9,9 +9,8 @@
 
 namespace blink {
 
-LaunchParams::LaunchParams(String cause,
-                           HeapVector<Member<NativeFileSystemHandle>> files)
-    : cause_(cause), files_(files) {}
+LaunchParams::LaunchParams(HeapVector<Member<NativeFileSystemHandle>> files)
+    : files_(files) {}
 
 LaunchParams::~LaunchParams() = default;
 
diff --git a/third_party/blink/renderer/modules/launch/launch_params.h b/third_party/blink/renderer/modules/launch/launch_params.h
index e3104da0..5b678ad 100644
--- a/third_party/blink/renderer/modules/launch/launch_params.h
+++ b/third_party/blink/renderer/modules/launch/launch_params.h
@@ -19,17 +19,15 @@
   DEFINE_WRAPPERTYPEINFO();
 
  public:
-  LaunchParams(String cause, HeapVector<Member<NativeFileSystemHandle>> files);
+  LaunchParams(HeapVector<Member<NativeFileSystemHandle>> files);
   ~LaunchParams() override;
 
   // LaunchParams IDL interface.
-  const String& cause() { return cause_; }
   const HeapVector<Member<NativeFileSystemHandle>>& files() { return files_; }
 
   void Trace(blink::Visitor*) override;
 
  private:
-  String cause_;
   HeapVector<Member<NativeFileSystemHandle>> files_;
 };
 
diff --git a/third_party/blink/renderer/modules/launch/launch_params.idl b/third_party/blink/renderer/modules/launch/launch_params.idl
index 5053541..8ed58ff93 100644
--- a/third_party/blink/renderer/modules/launch/launch_params.idl
+++ b/third_party/blink/renderer/modules/launch/launch_params.idl
@@ -6,8 +6,6 @@
 // Explainer: https://github.com/WICG/file-handling/blob/master/explainer.md
 
 [RuntimeEnabled=FileHandling] interface LaunchParams {
-  readonly attribute DOMString cause;
-
   [SameObject]
   readonly attribute FrozenArray<FileSystemBaseHandle> files;
 };
diff --git a/third_party/blink/renderer/modules/media_controls/media_controls_shared_helper.cc b/third_party/blink/renderer/modules/media_controls/media_controls_shared_helper.cc
index 752f81e..2fe44542 100644
--- a/third_party/blink/renderer/modules/media_controls/media_controls_shared_helper.cc
+++ b/third_party/blink/renderer/modules/media_controls/media_controls_shared_helper.cc
@@ -5,7 +5,7 @@
 #include "third_party/blink/renderer/modules/media_controls/media_controls_shared_helper.h"
 
 #include <cmath>
-#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-blink.h"
+#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-shared.h"
 #include "third_party/blink/renderer/core/dom/events/event.h"
 #include "third_party/blink/renderer/core/fullscreen/fullscreen.h"
 #include "third_party/blink/renderer/core/html/media/html_media_element.h"
diff --git a/third_party/blink/renderer/modules/netinfo/network_information.cc b/third_party/blink/renderer/modules/netinfo/network_information.cc
index fe023d9..58335db 100644
--- a/third_party/blink/renderer/modules/netinfo/network_information.cc
+++ b/third_party/blink/renderer/modules/netinfo/network_information.cc
@@ -6,7 +6,7 @@
 
 #include <algorithm>
 
-#include "third_party/blink/public/mojom/devtools/console_message.mojom-blink.h"
+#include "third_party/blink/public/mojom/devtools/console_message.mojom-shared.h"
 #include "third_party/blink/public/platform/task_type.h"
 #include "third_party/blink/renderer/core/dom/document.h"
 #include "third_party/blink/renderer/core/dom/events/event.h"
diff --git a/third_party/blink/renderer/modules/payments/payment_request.cc b/third_party/blink/renderer/modules/payments/payment_request.cc
index eb983d3..92dee9d 100644
--- a/third_party/blink/renderer/modules/payments/payment_request.cc
+++ b/third_party/blink/renderer/modules/payments/payment_request.cc
@@ -11,7 +11,7 @@
 #include "base/stl_util.h"
 #include "mojo/public/cpp/bindings/interface_request.h"
 #include "services/service_manager/public/cpp/interface_provider.h"
-#include "third_party/blink/public/mojom/devtools/console_message.mojom-blink.h"
+#include "third_party/blink/public/mojom/devtools/console_message.mojom-shared.h"
 #include "third_party/blink/public/mojom/feature_policy/feature_policy.mojom-blink.h"
 #include "third_party/blink/public/mojom/web_feature/web_feature.mojom-blink.h"
 #include "third_party/blink/public/platform/platform.h"
diff --git a/third_party/blink/renderer/modules/service_worker/fetch_respond_with_observer.cc b/third_party/blink/renderer/modules/service_worker/fetch_respond_with_observer.cc
index d91687c..080438f 100644
--- a/third_party/blink/renderer/modules/service_worker/fetch_respond_with_observer.cc
+++ b/third_party/blink/renderer/modules/service_worker/fetch_respond_with_observer.cc
@@ -11,7 +11,7 @@
 #include "base/macros.h"
 #include "base/metrics/histogram_macros.h"
 #include "services/network/public/mojom/fetch_api.mojom-blink.h"
-#include "third_party/blink/public/mojom/devtools/console_message.mojom-blink.h"
+#include "third_party/blink/public/mojom/devtools/console_message.mojom-shared.h"
 #include "third_party/blink/public/mojom/loader/request_context_frame_type.mojom-blink.h"
 #include "third_party/blink/public/platform/task_type.h"
 #include "third_party/blink/renderer/bindings/core/v8/script_value.h"
diff --git a/third_party/blink/renderer/modules/service_worker/respond_with_observer.h b/third_party/blink/renderer/modules/service_worker/respond_with_observer.h
index 4b9f8aff..eacf6c7 100644
--- a/third_party/blink/renderer/modules/service_worker/respond_with_observer.h
+++ b/third_party/blink/renderer/modules/service_worker/respond_with_observer.h
@@ -5,7 +5,7 @@
 #ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_SERVICE_WORKER_RESPOND_WITH_OBSERVER_H_
 #define THIRD_PARTY_BLINK_RENDERER_MODULES_SERVICE_WORKER_RESPOND_WITH_OBSERVER_H_
 
-#include "third_party/blink/public/mojom/service_worker/service_worker_error_type.mojom-blink.h"
+#include "third_party/blink/public/mojom/service_worker/service_worker_error_type.mojom-shared.h"
 #include "third_party/blink/renderer/core/dom/events/event_target.h"
 #include "third_party/blink/renderer/core/execution_context/context_lifecycle_observer.h"
 #include "third_party/blink/renderer/modules/modules_export.h"
diff --git a/third_party/blink/renderer/modules/shapedetection/detected_barcode.h b/third_party/blink/renderer/modules/shapedetection/detected_barcode.h
index d4eaeef..6c213af5 100644
--- a/third_party/blink/renderer/modules/shapedetection/detected_barcode.h
+++ b/third_party/blink/renderer/modules/shapedetection/detected_barcode.h
@@ -5,7 +5,7 @@
 #ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_SHAPEDETECTION_DETECTED_BARCODE_H_
 #define THIRD_PARTY_BLINK_RENDERER_MODULES_SHAPEDETECTION_DETECTED_BARCODE_H_
 
-#include "services/shape_detection/public/mojom/barcodedetection_provider.mojom-blink.h"
+#include "services/shape_detection/public/mojom/barcodedetection_provider.mojom-shared.h"
 #include "third_party/blink/public/platform/web_string.h"
 #include "third_party/blink/renderer/bindings/core/v8/script_value.h"
 #include "third_party/blink/renderer/modules/imagecapture/point_2d.h"
diff --git a/third_party/blink/renderer/modules/webaudio/base_audio_context.cc b/third_party/blink/renderer/modules/webaudio/base_audio_context.cc
index 60407bad..66b1c3e2 100644
--- a/third_party/blink/renderer/modules/webaudio/base_audio_context.cc
+++ b/third_party/blink/renderer/modules/webaudio/base_audio_context.cc
@@ -26,7 +26,7 @@
 #include "third_party/blink/renderer/modules/webaudio/base_audio_context.h"
 
 #include "build/build_config.h"
-#include "third_party/blink/public/mojom/devtools/console_message.mojom-blink.h"
+#include "third_party/blink/public/mojom/devtools/console_message.mojom-shared.h"
 #include "third_party/blink/public/platform/platform.h"
 #include "third_party/blink/public/platform/task_type.h"
 #include "third_party/blink/renderer/bindings/core/v8/dictionary.h"
diff --git a/third_party/blink/renderer/modules/webgpu/gpu_rasterization_state_descriptor.idl b/third_party/blink/renderer/modules/webgpu/gpu_rasterization_state_descriptor.idl
index 59e1767..d246337 100644
--- a/third_party/blink/renderer/modules/webgpu/gpu_rasterization_state_descriptor.idl
+++ b/third_party/blink/renderer/modules/webgpu/gpu_rasterization_state_descriptor.idl
@@ -5,7 +5,7 @@
 // https://github.com/gpuweb/gpuweb/blob/master/design/sketch.webidl
 
 dictionary GPURasterizationStateDescriptor {
-    required GPUFrontFace frontFace;
+    GPUFrontFace frontFace = "ccw";
     GPUCullMode cullMode = "none";
 
     long depthBias = 0;
diff --git a/third_party/blink/renderer/modules/websockets/dom_websocket_test.cc b/third_party/blink/renderer/modules/websockets/dom_websocket_test.cc
index ebdb112..7210df4 100644
--- a/third_party/blink/renderer/modules/websockets/dom_websocket_test.cc
+++ b/third_party/blink/renderer/modules/websockets/dom_websocket_test.cc
@@ -10,7 +10,7 @@
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/blink/public/common/features.h"
-#include "third_party/blink/public/mojom/devtools/console_message.mojom-blink.h"
+#include "third_party/blink/public/mojom/devtools/console_message.mojom-shared.h"
 #include "third_party/blink/public/platform/web_insecure_request_policy.h"
 #include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.h"
 #include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_testing.h"
diff --git a/third_party/blink/renderer/modules/websockets/web_pepper_socket_impl.cc b/third_party/blink/renderer/modules/websockets/web_pepper_socket_impl.cc
index bcb0037ee..75baf21 100644
--- a/third_party/blink/renderer/modules/websockets/web_pepper_socket_impl.cc
+++ b/third_party/blink/renderer/modules/websockets/web_pepper_socket_impl.cc
@@ -32,7 +32,7 @@
 
 #include <stddef.h>
 #include <memory>
-#include "third_party/blink/public/mojom/devtools/console_message.mojom-blink.h"
+#include "third_party/blink/public/mojom/devtools/console_message.mojom-shared.h"
 #include "third_party/blink/public/platform/web_url.h"
 #include "third_party/blink/public/web/web_array_buffer.h"
 #include "third_party/blink/public/web/web_document.h"
diff --git a/third_party/blink/renderer/modules/websockets/websocket_channel.h b/third_party/blink/renderer/modules/websockets/websocket_channel.h
index 6a8d6948..546e4aa 100644
--- a/third_party/blink/renderer/modules/websockets/websocket_channel.h
+++ b/third_party/blink/renderer/modules/websockets/websocket_channel.h
@@ -33,7 +33,7 @@
 
 #include <memory>
 #include "base/macros.h"
-#include "third_party/blink/public/mojom/devtools/console_message.mojom-blink.h"
+#include "third_party/blink/public/mojom/devtools/console_message.mojom-shared.h"
 #include "third_party/blink/renderer/bindings/core/v8/source_location.h"
 #include "third_party/blink/renderer/modules/modules_export.h"
 #include "third_party/blink/renderer/platform/heap/handle.h"
diff --git a/third_party/blink/renderer/platform/exported/web_url_request.cc b/third_party/blink/renderer/platform/exported/web_url_request.cc
index aceed95..6053b3d3 100644
--- a/third_party/blink/renderer/platform/exported/web_url_request.cc
+++ b/third_party/blink/renderer/platform/exported/web_url_request.cc
@@ -34,7 +34,7 @@
 
 #include "base/time/time.h"
 #include "net/base/load_flags.h"
-#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-blink.h"
+#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-shared.h"
 #include "third_party/blink/public/platform/web_http_body.h"
 #include "third_party/blink/public/platform/web_http_header_visitor.h"
 #include "third_party/blink/public/platform/web_security_origin.h"
diff --git a/third_party/blink/renderer/platform/exported/web_url_response.cc b/third_party/blink/renderer/platform/exported/web_url_response.cc
index 5b0f59cf..d640461 100644
--- a/third_party/blink/renderer/platform/exported/web_url_response.cc
+++ b/third_party/blink/renderer/platform/exported/web_url_response.cc
@@ -273,9 +273,12 @@
       sct_list);
 }
 
-WebURLResponse::WebSecurityDetails WebURLResponse::SecurityDetailsForTesting() {
-  const blink::ResourceResponse::SecurityDetails* security_details =
+base::Optional<WebURLResponse::WebSecurityDetails>
+WebURLResponse::SecurityDetailsForTesting() {
+  const base::Optional<ResourceResponse::SecurityDetails>& security_details =
       resource_response_->GetSecurityDetails();
+  if (!security_details.has_value())
+    return base::nullopt;
   std::vector<SignedCertificateTimestamp> sct_list;
   for (const auto& iter : security_details->sct_list) {
     sct_list.push_back(SignedCertificateTimestamp(
diff --git a/third_party/blink/renderer/platform/instrumentation/use_counter.h b/third_party/blink/renderer/platform/instrumentation/use_counter.h
index 3581df6..cc9e6ec 100644
--- a/third_party/blink/renderer/platform/instrumentation/use_counter.h
+++ b/third_party/blink/renderer/platform/instrumentation/use_counter.h
@@ -5,7 +5,7 @@
 #ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_INSTRUMENTATION_USE_COUNTER_H_
 #define THIRD_PARTY_BLINK_RENDERER_PLATFORM_INSTRUMENTATION_USE_COUNTER_H_
 
-#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-blink.h"
+#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-shared.h"
 #include "third_party/blink/renderer/platform/heap/handle.h"
 
 namespace blink {
diff --git a/third_party/blink/renderer/platform/loader/cors/cors.h b/third_party/blink/renderer/platform/loader/cors/cors.h
index 6544bf1..db3b05c 100644
--- a/third_party/blink/renderer/platform/loader/cors/cors.h
+++ b/third_party/blink/renderer/platform/loader/cors/cors.h
@@ -7,9 +7,9 @@
 
 #include "base/optional.h"
 #include "services/network/public/cpp/cors/cors_error_status.h"
-#include "services/network/public/mojom/cors.mojom-blink.h"
-#include "services/network/public/mojom/fetch_api.mojom-blink.h"
-#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-blink.h"
+#include "services/network/public/mojom/cors.mojom-shared.h"
+#include "services/network/public/mojom/fetch_api.mojom-shared.h"
+#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-shared.h"
 #include "third_party/blink/public/platform/web_http_header_set.h"
 #include "third_party/blink/renderer/platform/platform_export.h"
 #include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
diff --git a/third_party/blink/renderer/platform/loader/cors/cors_error_string.h b/third_party/blink/renderer/platform/loader/cors/cors_error_string.h
index fa80650..f9e8664f1 100644
--- a/third_party/blink/renderer/platform/loader/cors/cors_error_string.h
+++ b/third_party/blink/renderer/platform/loader/cors/cors_error_string.h
@@ -7,7 +7,7 @@
 
 #include "base/macros.h"
 #include "services/network/public/cpp/cors/cors_error_status.h"
-#include "services/network/public/mojom/cors.mojom-blink.h"
+#include "services/network/public/mojom/cors.mojom-shared.h"
 #include "third_party/blink/public/platform/web_url_request.h"
 #include "third_party/blink/renderer/platform/platform_export.h"
 #include "third_party/blink/renderer/platform/wtf/forward.h"
diff --git a/third_party/blink/renderer/platform/loader/fetch/cached_metadata_handler.h b/third_party/blink/renderer/platform/loader/fetch/cached_metadata_handler.h
index 8320f8b..c292c1dc 100644
--- a/third_party/blink/renderer/platform/loader/fetch/cached_metadata_handler.h
+++ b/third_party/blink/renderer/platform/loader/fetch/cached_metadata_handler.h
@@ -6,8 +6,8 @@
 #define THIRD_PARTY_BLINK_RENDERER_PLATFORM_LOADER_FETCH_CACHED_METADATA_HANDLER_H_
 
 #include <stdint.h>
-#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-blink.h"
-#include "third_party/blink/public/mojom/loader/code_cache.mojom-blink.h"
+#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-shared.h"
+#include "third_party/blink/public/mojom/loader/code_cache.mojom-shared.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/weborigin/security_origin.h"
diff --git a/third_party/blink/renderer/platform/loader/fetch/console_logger.h b/third_party/blink/renderer/platform/loader/fetch/console_logger.h
index 37d935fa..34de420 100644
--- a/third_party/blink/renderer/platform/loader/fetch/console_logger.h
+++ b/third_party/blink/renderer/platform/loader/fetch/console_logger.h
@@ -5,7 +5,7 @@
 #ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_LOADER_FETCH_CONSOLE_LOGGER_H_
 #define THIRD_PARTY_BLINK_RENDERER_PLATFORM_LOADER_FETCH_CONSOLE_LOGGER_H_
 
-#include "third_party/blink/public/mojom/devtools/console_message.mojom-blink.h"
+#include "third_party/blink/public/mojom/devtools/console_message.mojom-shared.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/wtf/forward.h"
diff --git a/third_party/blink/renderer/platform/loader/fetch/fetch_client_settings_object.h b/third_party/blink/renderer/platform/loader/fetch/fetch_client_settings_object.h
index 1ebddbf0..2a5ab53 100644
--- a/third_party/blink/renderer/platform/loader/fetch/fetch_client_settings_object.h
+++ b/third_party/blink/renderer/platform/loader/fetch/fetch_client_settings_object.h
@@ -6,7 +6,7 @@
 #define THIRD_PARTY_BLINK_RENDERER_PLATFORM_LOADER_FETCH_FETCH_CLIENT_SETTINGS_OBJECT_H_
 
 #include "base/optional.h"
-#include "services/network/public/mojom/referrer_policy.mojom-blink.h"
+#include "services/network/public/mojom/referrer_policy.mojom-shared.h"
 #include "third_party/blink/public/mojom/net/ip_address_space.mojom-blink.h"
 #include "third_party/blink/public/platform/web_insecure_request_policy.h"
 #include "third_party/blink/renderer/platform/heap/garbage_collected.h"
diff --git a/third_party/blink/renderer/platform/loader/fetch/fetch_client_settings_object_snapshot.h b/third_party/blink/renderer/platform/loader/fetch/fetch_client_settings_object_snapshot.h
index 82fedc9..8c9075c2 100644
--- a/third_party/blink/renderer/platform/loader/fetch/fetch_client_settings_object_snapshot.h
+++ b/third_party/blink/renderer/platform/loader/fetch/fetch_client_settings_object_snapshot.h
@@ -5,7 +5,7 @@
 #ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_LOADER_FETCH_FETCH_CLIENT_SETTINGS_OBJECT_SNAPSHOT_H_
 #define THIRD_PARTY_BLINK_RENDERER_PLATFORM_LOADER_FETCH_FETCH_CLIENT_SETTINGS_OBJECT_SNAPSHOT_H_
 
-#include "services/network/public/mojom/referrer_policy.mojom-blink.h"
+#include "services/network/public/mojom/referrer_policy.mojom-shared.h"
 #include "third_party/blink/renderer/platform/loader/fetch/fetch_client_settings_object.h"
 #include "third_party/blink/renderer/platform/platform_export.h"
 #include "third_party/blink/renderer/platform/weborigin/kurl.h"
diff --git a/third_party/blink/renderer/platform/loader/fetch/fetch_context.h b/third_party/blink/renderer/platform/loader/fetch/fetch_context.h
index f298e32..8302973 100644
--- a/third_party/blink/renderer/platform/loader/fetch/fetch_context.h
+++ b/third_party/blink/renderer/platform/loader/fetch/fetch_context.h
@@ -36,8 +36,8 @@
 #include "base/macros.h"
 #include "base/optional.h"
 #include "base/single_thread_task_runner.h"
-#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-blink.h"
-#include "third_party/blink/public/mojom/loader/request_context_frame_type.mojom-blink.h"
+#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-shared.h"
+#include "third_party/blink/public/mojom/loader/request_context_frame_type.mojom-shared.h"
 #include "third_party/blink/public/platform/resource_request_blocked_reason.h"
 #include "third_party/blink/renderer/platform/heap/handle.h"
 #include "third_party/blink/renderer/platform/loader/fetch/fetch_initiator_info.h"
diff --git a/third_party/blink/renderer/platform/loader/fetch/null_resource_fetcher_properties.cc b/third_party/blink/renderer/platform/loader/fetch/null_resource_fetcher_properties.cc
index e9b7611..6a00438 100644
--- a/third_party/blink/renderer/platform/loader/fetch/null_resource_fetcher_properties.cc
+++ b/third_party/blink/renderer/platform/loader/fetch/null_resource_fetcher_properties.cc
@@ -4,7 +4,7 @@
 
 #include "third_party/blink/renderer/platform/loader/fetch/null_resource_fetcher_properties.h"
 
-#include "services/network/public/mojom/referrer_policy.mojom-blink.h"
+#include "services/network/public/mojom/referrer_policy.mojom-shared.h"
 #include "third_party/blink/renderer/platform/loader/allowed_by_nosniff.h"
 #include "third_party/blink/renderer/platform/loader/fetch/fetch_client_settings_object_snapshot.h"
 #include "third_party/blink/renderer/platform/loader/fetch/https_state.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 4acc782..1f1d3377 100644
--- a/third_party/blink/renderer/platform/loader/fetch/raw_resource.cc
+++ b/third_party/blink/renderer/platform/loader/fetch/raw_resource.cc
@@ -26,7 +26,7 @@
 #include "third_party/blink/renderer/platform/loader/fetch/raw_resource.h"
 
 #include <memory>
-#include "third_party/blink/public/mojom/loader/request_context_frame_type.mojom-blink.h"
+#include "third_party/blink/public/mojom/loader/request_context_frame_type.mojom-shared.h"
 #include "third_party/blink/public/platform/platform.h"
 #include "third_party/blink/renderer/platform/loader/fetch/buffering_bytes_consumer.h"
 #include "third_party/blink/renderer/platform/loader/fetch/fetch_parameters.h"
diff --git a/third_party/blink/renderer/platform/loader/fetch/resource.h b/third_party/blink/renderer/platform/loader/fetch/resource.h
index 953701c..c0bd313e 100644
--- a/third_party/blink/renderer/platform/loader/fetch/resource.h
+++ b/third_party/blink/renderer/platform/loader/fetch/resource.h
@@ -29,7 +29,7 @@
 #include "base/callback.h"
 #include "base/optional.h"
 #include "base/single_thread_task_runner.h"
-#include "third_party/blink/public/mojom/loader/code_cache.mojom-blink.h"
+#include "third_party/blink/public/mojom/loader/code_cache.mojom-shared.h"
 #include "third_party/blink/public/platform/scheduler/web_scoped_virtual_time_pauser.h"
 #include "third_party/blink/renderer/platform/instrumentation/tracing/web_process_memory_dump.h"
 #include "third_party/blink/renderer/platform/loader/fetch/cached_metadata_handler.h"
diff --git a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher_test.cc b/third_party/blink/renderer/platform/loader/fetch/resource_fetcher_test.cc
index 59f9ef0..80d17614 100644
--- a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher_test.cc
+++ b/third_party/blink/renderer/platform/loader/fetch/resource_fetcher_test.cc
@@ -34,8 +34,8 @@
 #include "base/optional.h"
 #include "build/build_config.h"
 #include "testing/gtest/include/gtest/gtest.h"
-#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-blink.h"
-#include "third_party/blink/public/mojom/loader/request_context_frame_type.mojom-blink.h"
+#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-shared.h"
+#include "third_party/blink/public/mojom/loader/request_context_frame_type.mojom-shared.h"
 #include "third_party/blink/public/platform/platform.h"
 #include "third_party/blink/public/platform/web_url_loader.h"
 #include "third_party/blink/public/platform/web_url_loader_mock_factory.h"
diff --git a/third_party/blink/renderer/platform/loader/fetch/resource_loader.cc b/third_party/blink/renderer/platform/loader/fetch/resource_loader.cc
index c412596..a046523 100644
--- a/third_party/blink/renderer/platform/loader/fetch/resource_loader.cc
+++ b/third_party/blink/renderer/platform/loader/fetch/resource_loader.cc
@@ -39,7 +39,7 @@
 #include "services/metrics/public/cpp/ukm_builders.h"
 #include "services/network/public/mojom/fetch_api.mojom-blink.h"
 #include "third_party/blink/public/mojom/blob/blob_registry.mojom-blink.h"
-#include "third_party/blink/public/mojom/devtools/console_message.mojom-blink.h"
+#include "third_party/blink/public/mojom/devtools/console_message.mojom-shared.h"
 #include "third_party/blink/public/platform/code_cache_loader.h"
 #include "third_party/blink/public/platform/platform.h"
 #include "third_party/blink/public/platform/web_data.h"
diff --git a/third_party/blink/renderer/platform/loader/fetch/resource_loader.h b/third_party/blink/renderer/platform/loader/fetch/resource_loader.h
index 2e4833e..c76e448c 100644
--- a/third_party/blink/renderer/platform/loader/fetch/resource_loader.h
+++ b/third_party/blink/renderer/platform/loader/fetch/resource_loader.h
@@ -35,7 +35,7 @@
 #include "base/gtest_prod_util.h"
 #include "base/single_thread_task_runner.h"
 #include "mojo/public/cpp/bindings/associated_binding.h"
-#include "services/network/public/mojom/fetch_api.mojom-blink.h"
+#include "services/network/public/mojom/fetch_api.mojom-shared.h"
 #include "third_party/blink/public/mojom/blob/blob_registry.mojom-blink.h"
 #include "third_party/blink/public/platform/web_url_loader.h"
 #include "third_party/blink/public/platform/web_url_loader_client.h"
diff --git a/third_party/blink/renderer/platform/loader/fetch/resource_loader_test.cc b/third_party/blink/renderer/platform/loader/fetch/resource_loader_test.cc
index d4a63c1f..67c41b4 100644
--- a/third_party/blink/renderer/platform/loader/fetch/resource_loader_test.cc
+++ b/third_party/blink/renderer/platform/loader/fetch/resource_loader_test.cc
@@ -8,7 +8,7 @@
 #include <utility>
 
 #include "mojo/public/c/system/data_pipe.h"
-#include "services/network/public/mojom/fetch_api.mojom-blink.h"
+#include "services/network/public/mojom/fetch_api.mojom-shared.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/blink/public/platform/web_runtime_features.h"
 #include "third_party/blink/public/platform/web_url_loader.h"
diff --git a/third_party/blink/renderer/platform/loader/fetch/resource_request.h b/third_party/blink/renderer/platform/loader/fetch/resource_request.h
index 0cc04b6..060b722 100644
--- a/third_party/blink/renderer/platform/loader/fetch/resource_request.h
+++ b/third_party/blink/renderer/platform/loader/fetch/resource_request.h
@@ -37,7 +37,7 @@
 #include "services/metrics/public/cpp/ukm_source_id.h"
 #include "services/network/public/mojom/cors.mojom-blink.h"
 #include "services/network/public/mojom/fetch_api.mojom-blink.h"
-#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-blink.h"
+#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-shared.h"
 #include "third_party/blink/public/mojom/net/ip_address_space.mojom-blink.h"
 #include "third_party/blink/public/platform/resource_request_blocked_reason.h"
 #include "third_party/blink/public/platform/web_url_request.h"
diff --git a/third_party/blink/renderer/platform/loader/fetch/resource_response.cc b/third_party/blink/renderer/platform/loader/fetch/resource_response.cc
index 1868ef1a..f4272c6 100644
--- a/third_party/blink/renderer/platform/loader/fetch/resource_response.cc
+++ b/third_party/blink/renderer/platform/loader/fetch/resource_response.cc
@@ -223,18 +223,11 @@
     time_t valid_to,
     const Vector<AtomicString>& certificate,
     const SignedCertificateTimestampList& sct_list) {
-  security_details_.protocol = protocol;
-  security_details_.key_exchange = key_exchange;
-  security_details_.key_exchange_group = key_exchange_group;
-  security_details_.cipher = cipher;
-  security_details_.mac = mac;
-  security_details_.subject_name = subject_name;
-  security_details_.san_list = san_list;
-  security_details_.issuer = issuer;
-  security_details_.valid_from = valid_from;
-  security_details_.valid_to = valid_to;
-  security_details_.certificate = certificate;
-  security_details_.sct_list = sct_list;
+  DCHECK_NE(security_style_, kSecurityStyleUnknown);
+  DCHECK_NE(security_style_, kSecurityStyleUnauthenticated);
+  security_details_ = SecurityDetails(
+      protocol, key_exchange, key_exchange_group, cipher, mac, subject_name,
+      san_list, issuer, valid_from, valid_to, certificate, sct_list);
 }
 
 void ResourceResponse::SetHttpHeaderField(const AtomicString& name,
diff --git a/third_party/blink/renderer/platform/loader/fetch/resource_response.h b/third_party/blink/renderer/platform/loader/fetch/resource_response.h
index edb97c3..c7d4e8a2 100644
--- a/third_party/blink/renderer/platform/loader/fetch/resource_response.h
+++ b/third_party/blink/renderer/platform/loader/fetch/resource_response.h
@@ -31,6 +31,7 @@
 #include <utility>
 
 #include "base/memory/scoped_refptr.h"
+#include "base/optional.h"
 #include "base/time/time.h"
 #include "services/network/public/cpp/cors/cors.h"
 #include "services/network/public/mojom/fetch_api.mojom-blink.h"
@@ -118,7 +119,30 @@
 
   struct SecurityDetails {
     DISALLOW_NEW();
-    SecurityDetails() : valid_from(0), valid_to(0) {}
+    SecurityDetails(const String& protocol,
+                    const String& key_exchange,
+                    const String& key_exchange_group,
+                    const String& cipher,
+                    const String& mac,
+                    const String& subject_name,
+                    const Vector<String>& san_list,
+                    const String& issuer,
+                    time_t valid_from,
+                    time_t valid_to,
+                    const Vector<AtomicString>& certificate,
+                    const SignedCertificateTimestampList& sct_list)
+        : protocol(protocol),
+          key_exchange(key_exchange),
+          key_exchange_group(key_exchange_group),
+          cipher(cipher),
+          mac(mac),
+          subject_name(subject_name),
+          san_list(san_list),
+          issuer(issuer),
+          valid_from(valid_from),
+          valid_to(valid_to),
+          certificate(certificate),
+          sct_list(sct_list) {}
     // All strings are human-readable values.
     String protocol;
     // keyExchange is the empty string if not applicable for the connection's
@@ -268,8 +292,8 @@
     security_style_ = security_style;
   }
 
-  const SecurityDetails* GetSecurityDetails() const {
-    return &security_details_;
+  const base::Optional<SecurityDetails>& GetSecurityDetails() const {
+    return security_details_;
   }
   void SetSecurityDetails(const String& protocol,
                           const String& key_exchange,
@@ -511,9 +535,7 @@
   SecurityStyle security_style_ = kSecurityStyleUnknown;
 
   // Security details of this request's connection.
-  // If m_securityStyle is Unknown or Unauthenticated, this does not contain
-  // valid data.
-  SecurityDetails security_details_;
+  base::Optional<SecurityDetails> security_details_;
 
   scoped_refptr<ResourceLoadTiming> resource_load_timing_;
   scoped_refptr<ResourceLoadInfo> resource_load_info_;
diff --git a/third_party/blink/renderer/platform/loader/fetch/script_fetch_options.h b/third_party/blink/renderer/platform/loader/fetch/script_fetch_options.h
index 1dbb457..17ab66d 100644
--- a/third_party/blink/renderer/platform/loader/fetch/script_fetch_options.h
+++ b/third_party/blink/renderer/platform/loader/fetch/script_fetch_options.h
@@ -5,7 +5,7 @@
 #ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_LOADER_FETCH_SCRIPT_FETCH_OPTIONS_H_
 #define THIRD_PARTY_BLINK_RENDERER_PLATFORM_LOADER_FETCH_SCRIPT_FETCH_OPTIONS_H_
 
-#include "services/network/public/mojom/referrer_policy.mojom-blink.h"
+#include "services/network/public/mojom/referrer_policy.mojom-shared.h"
 #include "third_party/blink/public/platform/web_url_request.h"
 #include "third_party/blink/renderer/platform/loader/fetch/cross_origin_attribute_value.h"
 #include "third_party/blink/renderer/platform/loader/fetch/fetch_parameters.h"
diff --git a/third_party/blink/renderer/platform/loader/testing/test_resource_fetcher_properties.cc b/third_party/blink/renderer/platform/loader/testing/test_resource_fetcher_properties.cc
index f0682f4..251c345 100644
--- a/third_party/blink/renderer/platform/loader/testing/test_resource_fetcher_properties.cc
+++ b/third_party/blink/renderer/platform/loader/testing/test_resource_fetcher_properties.cc
@@ -4,7 +4,7 @@
 
 #include "third_party/blink/renderer/platform/loader/testing/test_resource_fetcher_properties.h"
 
-#include "services/network/public/mojom/referrer_policy.mojom-blink.h"
+#include "services/network/public/mojom/referrer_policy.mojom-shared.h"
 #include "third_party/blink/renderer/platform/loader/allowed_by_nosniff.h"
 #include "third_party/blink/renderer/platform/loader/fetch/fetch_client_settings_object_snapshot.h"
 #include "third_party/blink/renderer/platform/loader/fetch/https_state.h"
diff --git a/third_party/blink/renderer/platform/mhtml/mhtml_archive.h b/third_party/blink/renderer/platform/mhtml/mhtml_archive.h
index a7690a2a..a2a011e9 100644
--- a/third_party/blink/renderer/platform/mhtml/mhtml_archive.h
+++ b/third_party/blink/renderer/platform/mhtml/mhtml_archive.h
@@ -31,7 +31,7 @@
 #ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_MHTML_MHTML_ARCHIVE_H_
 #define THIRD_PARTY_BLINK_RENDERER_PLATFORM_MHTML_MHTML_ARCHIVE_H_
 
-#include "third_party/blink/public/mojom/loader/mhtml_load_result.mojom-blink.h"
+#include "third_party/blink/public/mojom/loader/mhtml_load_result.mojom-shared.h"
 #include "third_party/blink/renderer/platform/heap/handle.h"
 #include "third_party/blink/renderer/platform/wtf/hash_map.h"
 #include "third_party/blink/renderer/platform/wtf/text/string_hash.h"
diff --git a/third_party/blink/renderer/platform/mojo/BUILD.gn b/third_party/blink/renderer/platform/mojo/BUILD.gn
index c4f7e396..8b2683a 100644
--- a/third_party/blink/renderer/platform/mojo/BUILD.gn
+++ b/third_party/blink/renderer/platform/mojo/BUILD.gn
@@ -10,6 +10,6 @@
   public_deps = [
     "//third_party/blink/public:blink_headers",
     "//ui/gfx/geometry",
-    "//ui/gfx/geometry/mojo:mojo_shared_cpp_sources",
+    "//ui/gfx/geometry/mojo:mojo_blink_headers",
   ]
 }
diff --git a/third_party/blink/renderer/platform/mojo/geometry_struct_traits.h b/third_party/blink/renderer/platform/mojo/geometry_struct_traits.h
index 796bf53..9dda7b8 100644
--- a/third_party/blink/renderer/platform/mojo/geometry_struct_traits.h
+++ b/third_party/blink/renderer/platform/mojo/geometry_struct_traits.h
@@ -10,7 +10,7 @@
 #include "third_party/blink/public/platform/web_point.h"
 #include "third_party/blink/public/platform/web_rect.h"
 #include "third_party/blink/public/platform/web_size.h"
-#include "ui/gfx/geometry/mojo/geometry.mojom-blink.h"
+#include "ui/gfx/geometry/mojo/geometry.mojom-shared.h"
 
 namespace mojo {
 
diff --git a/third_party/blink/renderer/platform/scheduler/public/worker_scheduler.h b/third_party/blink/renderer/platform/scheduler/public/worker_scheduler.h
index 133a113..2c2ab72 100644
--- a/third_party/blink/renderer/platform/scheduler/public/worker_scheduler.h
+++ b/third_party/blink/renderer/platform/scheduler/public/worker_scheduler.h
@@ -7,6 +7,7 @@
 
 #include "base/memory/weak_ptr.h"
 #include "base/single_thread_task_runner.h"
+#include "base/task/sequence_manager/task_queue.h"
 #include "third_party/blink/public/platform/task_type.h"
 #include "third_party/blink/renderer/platform/scheduler/public/frame_or_worker_scheduler.h"
 #include "third_party/blink/renderer/platform/scheduler/public/frame_scheduler.h"
@@ -94,6 +95,12 @@
   scoped_refptr<NonMainThreadTaskQueue> pausable_task_queue_;
   scoped_refptr<NonMainThreadTaskQueue> unpausable_task_queue_;
 
+  using TaskQueueVoterMap = std::map<
+      scoped_refptr<NonMainThreadTaskQueue>,
+      std::unique_ptr<base::sequence_manager::TaskQueue::QueueEnabledVoter>>;
+
+  TaskQueueVoterMap task_runners_;
+
   SchedulingLifecycleState lifecycle_state_ =
       SchedulingLifecycleState::kNotThrottled;
 
diff --git a/third_party/blink/renderer/platform/scheduler/worker/non_main_thread_task_queue.cc b/third_party/blink/renderer/platform/scheduler/worker/non_main_thread_task_queue.cc
index 1e51ab6..0659860 100644
--- a/third_party/blink/renderer/platform/scheduler/worker/non_main_thread_task_queue.cc
+++ b/third_party/blink/renderer/platform/scheduler/worker/non_main_thread_task_queue.cc
@@ -38,11 +38,5 @@
   }
 }
 
-void NonMainThreadTaskQueue::SetPaused(bool paused) {
-  if (!task_queue_voter_)
-    task_queue_voter_ = CreateQueueEnabledVoter();
-  task_queue_voter_->SetVoteToEnable(!paused);
-}
-
 }  // namespace scheduler
 }  // namespace blink
diff --git a/third_party/blink/renderer/platform/scheduler/worker/non_main_thread_task_queue.h b/third_party/blink/renderer/platform/scheduler/worker/non_main_thread_task_queue.h
index 3b25d44..dcadb3a0 100644
--- a/third_party/blink/renderer/platform/scheduler/worker/non_main_thread_task_queue.h
+++ b/third_party/blink/renderer/platform/scheduler/worker/non_main_thread_task_queue.h
@@ -34,11 +34,7 @@
     return TaskQueue::CreateTaskRunner(static_cast<int>(task_type));
   }
 
-  void SetPaused(bool paused);
-
  private:
-  std::unique_ptr<QueueEnabledVoter> task_queue_voter_;
-
   // Not owned.
   NonMainThreadSchedulerImpl* non_main_thread_scheduler_;
 };
diff --git a/third_party/blink/renderer/platform/scheduler/worker/worker_scheduler.cc b/third_party/blink/renderer/platform/scheduler/worker/worker_scheduler.cc
index 75869ef..8792794 100644
--- a/third_party/blink/renderer/platform/scheduler/worker/worker_scheduler.cc
+++ b/third_party/blink/renderer/platform/scheduler/worker/worker_scheduler.cc
@@ -33,6 +33,13 @@
           worker_thread_scheduler->CreateTaskQueue("worker_unpausable_tq")),
       thread_scheduler_(worker_thread_scheduler),
       weak_factory_(this) {
+  task_runners_.insert(
+      std::make_pair(throttleable_task_queue_,
+                     throttleable_task_queue_->CreateQueueEnabledVoter()));
+  task_runners_.insert(std::make_pair(
+      pausable_task_queue_, pausable_task_queue_->CreateQueueEnabledVoter()));
+  task_runners_.insert(std::make_pair(unpausable_task_queue_, nullptr));
+
   thread_scheduler_->RegisterWorkerScheduler(this);
 
   SetUpThrottling();
@@ -62,8 +69,11 @@
   thread_scheduler_->helper()->CheckOnValidThread();
   paused_count_++;
   if (paused_count_ == 1) {
-    throttleable_task_queue_->SetPaused(true);
-    pausable_task_queue_->SetPaused(true);
+    for (const auto& pair : task_runners_) {
+      if (pair.second) {
+        pair.second->SetVoteToEnable(false);
+      }
+    }
   }
 }
 
@@ -71,8 +81,11 @@
   thread_scheduler_->helper()->CheckOnValidThread();
   paused_count_--;
   if (paused_count_ == 0 && !is_disposed_) {
-    throttleable_task_queue_->SetPaused(false);
-    pausable_task_queue_->SetPaused(false);
+    for (const auto& pair : task_runners_) {
+      if (pair.second) {
+        pair.second->SetVoteToEnable(true);
+      }
+    }
   }
 }
 
@@ -110,9 +123,11 @@
 
   thread_scheduler_->UnregisterWorkerScheduler(this);
 
-  unpausable_task_queue_->ShutdownTaskQueue();
-  pausable_task_queue_->ShutdownTaskQueue();
-  throttleable_task_queue_->ShutdownTaskQueue();
+  for (const auto& pair : task_runners_) {
+    pair.first->ShutdownTaskQueue();
+  }
+
+  task_runners_.clear();
 
   is_disposed_ = true;
 }
diff --git a/third_party/blink/renderer/platform/weborigin/origin_access_entry.cc b/third_party/blink/renderer/platform/weborigin/origin_access_entry.cc
index c9d777e7..5a040c61 100644
--- a/third_party/blink/renderer/platform/weborigin/origin_access_entry.cc
+++ b/third_party/blink/renderer/platform/weborigin/origin_access_entry.cc
@@ -30,7 +30,7 @@
 
 #include "third_party/blink/renderer/platform/weborigin/origin_access_entry.h"
 
-#include "services/network/public/mojom/cors.mojom-blink.h"
+#include "services/network/public/mojom/cors.mojom-shared.h"
 #include "third_party/blink/renderer/platform/weborigin/known_ports.h"
 #include "third_party/blink/renderer/platform/weborigin/kurl.h"
 #include "third_party/blink/renderer/platform/weborigin/security_origin.h"
diff --git a/third_party/blink/renderer/platform/weborigin/referrer.h b/third_party/blink/renderer/platform/weborigin/referrer.h
index 2a647708..98fe744 100644
--- a/third_party/blink/renderer/platform/weborigin/referrer.h
+++ b/third_party/blink/renderer/platform/weborigin/referrer.h
@@ -31,7 +31,7 @@
 #ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_WEBORIGIN_REFERRER_H_
 #define THIRD_PARTY_BLINK_RENDERER_PLATFORM_WEBORIGIN_REFERRER_H_
 
-#include "services/network/public/mojom/referrer_policy.mojom-blink.h"
+#include "services/network/public/mojom/referrer_policy.mojom-shared.h"
 #include "third_party/blink/renderer/platform/weborigin/kurl.h"
 #include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
 #include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
diff --git a/third_party/blink/renderer/platform/weborigin/security_origin_test.cc b/third_party/blink/renderer/platform/weborigin/security_origin_test.cc
index 1acaaf1..215c7b71a 100644
--- a/third_party/blink/renderer/platform/weborigin/security_origin_test.cc
+++ b/third_party/blink/renderer/platform/weborigin/security_origin_test.cc
@@ -33,7 +33,7 @@
 #include <stdint.h>
 
 #include "base/stl_util.h"
-#include "services/network/public/mojom/cors.mojom-blink.h"
+#include "services/network/public/mojom/cors.mojom-shared.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/blink/renderer/platform/blob/blob_url.h"
 #include "third_party/blink/renderer/platform/testing/runtime_enabled_features_test_helpers.h"
diff --git a/third_party/blink/renderer/platform/weborigin/security_policy.h b/third_party/blink/renderer/platform/weborigin/security_policy.h
index d041d1d9..a6c2e0a0 100644
--- a/third_party/blink/renderer/platform/weborigin/security_policy.h
+++ b/third_party/blink/renderer/platform/weborigin/security_policy.h
@@ -29,8 +29,8 @@
 #ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_WEBORIGIN_SECURITY_POLICY_H_
 #define THIRD_PARTY_BLINK_RENDERER_PLATFORM_WEBORIGIN_SECURITY_POLICY_H_
 
-#include "services/network/public/mojom/cors_origin_pattern.mojom-blink.h"
-#include "services/network/public/mojom/referrer_policy.mojom-blink.h"
+#include "services/network/public/mojom/cors_origin_pattern.mojom-shared.h"
+#include "services/network/public/mojom/referrer_policy.mojom-shared.h"
 #include "third_party/blink/renderer/platform/platform_export.h"
 #include "third_party/blink/renderer/platform/weborigin/referrer.h"
 #include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
diff --git a/third_party/blink/renderer/platform/weborigin/security_policy_test.cc b/third_party/blink/renderer/platform/weborigin/security_policy_test.cc
index 32414fa..baea980 100644
--- a/third_party/blink/renderer/platform/weborigin/security_policy_test.cc
+++ b/third_party/blink/renderer/platform/weborigin/security_policy_test.cc
@@ -30,7 +30,7 @@
 
 #include "third_party/blink/renderer/platform/weborigin/security_policy.h"
 
-#include "services/network/public/mojom/cors.mojom-blink.h"
+#include "services/network/public/mojom/cors.mojom-shared.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/blink/renderer/platform/weborigin/kurl.h"
 #include "third_party/blink/renderer/platform/weborigin/scheme_registry.h"
diff --git a/third_party/blink/tools/blinkpy/w3c/wpt_metadata_builder.py b/third_party/blink/tools/blinkpy/w3c/wpt_metadata_builder.py
new file mode 100644
index 0000000..66c72fab
--- /dev/null
+++ b/third_party/blink/tools/blinkpy/w3c/wpt_metadata_builder.py
@@ -0,0 +1,127 @@
+# Copyright 2019 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+"""Converts Chromium Test Expectations into WPT Metadata ini files.
+
+This script loads TestExpectations for any WPT test and creates the metadata
+files corresponding to the expectation. This script runs as a BUILD action rule.
+The output is then bundled into the WPT isolate package to be shipped to bots
+running the WPT test suite.
+"""
+
+import argparse
+import logging
+import os
+
+from blinkpy.common.system.log_utils import configure_logging
+from blinkpy.web_tests.models import test_expectations
+
+_log = logging.getLogger(__name__)
+
+
+class WPTMetadataBuilder(object):
+    def __init__(self, expectations):
+        """
+        Args:
+            expectations: a blinkpy.web_tests.models.test_expectations.TestExpectations object
+        """
+        self.expectations = expectations
+        self.metadata_output_dir = ""
+
+    def run(self, args=None):
+        """Main entry point to parse flags and execute the script."""
+        parser = argparse.ArgumentParser(description=__doc__)
+        parser.add_argument("--metadata-output-dir",
+                            help="The directory to output the metadata files into.")
+        parser.add_argument('-v', '--verbose', action='store_true', help='More verbose logging.')
+        args = parser.parse_args(args)
+
+        log_level = logging.DEBUG if args.verbose else logging.INFO
+        configure_logging(logging_level=log_level, include_time=True)
+
+        self.metadata_output_dir = args.metadata_output_dir
+        self._build_metadata_and_write()
+
+        return 0
+
+    def _build_metadata_and_write(self):
+        """Build the metadata files and write them to disk."""
+        if os.path.exists(self.metadata_output_dir):
+            _log.warning("Output dir exists, deleting: %s",
+                         self.metadata_output_dir)
+            import shutil
+            shutil.rmtree(self.metadata_output_dir)
+
+        for test_name in self.get_test_names_for_metadata():
+            filename, file_contents = self.get_metadata_filename_and_contents(test_name)
+            if not filename or not file_contents:
+                continue
+
+            # Write the contents to the file name
+            if not os.path.exists(os.path.dirname(filename)):
+                os.makedirs(os.path.dirname(filename))
+            with open(filename, "w") as metadata_file:
+                metadata_file.write(file_contents)
+
+    def get_test_names_for_metadata(self):
+        """Determines which tests in the expectation file need metadata.
+
+        Returns:
+            A list of test names that need metadata.
+        """
+        return self.expectations.get_tests_with_result_type(
+            test_expectations.SKIP)
+
+    def get_metadata_filename_and_contents(self, test_name):
+        """Determines the metadata filename and contents for the specified test.
+
+        The metadata filename is derived from the test name but will differ if
+        the expectation is for a single test or for a directory of tests. The
+        contents of the metadata file will also differ for those two cases.
+
+        Args:
+            test_name: A test name from the expectation file.
+
+        Returns:
+            A pair of strings, the first is the path to the metadata file and
+            the second is the contents to write to that file. Or None if the
+            test does not need a metadata file.
+        """
+        # Ignore expectations for non-WPT tests
+        if not test_name or not test_name.startswith('external/wpt'):
+            return None, None
+
+        # Split the test name by directory. We omit the first 2 entries because
+        # they are 'external' and 'wpt' and these don't exist in the WPT's test
+        # names.
+        test_name_parts = test_name.split("/")[2:]
+
+        # Check if this is a test file or a test directory
+        is_test_dir = test_name.endswith("/")
+        metadata_filename = None
+        metadata_file_contents = None
+        if is_test_dir:
+            # A test directory gets one metadata file called __dir__.ini and all
+            # tests in that dir are skipped.
+            metadata_filename = os.path.join(self.metadata_output_dir,
+                                             *test_name_parts)
+            metadata_filename = os.path.join(metadata_filename, "__dir__.ini")
+            _log.debug("Creating a dir-wide ini file %s", metadata_filename)
+
+            metadata_file_contents = "disabled: build_wpt_metadata.py"
+        else:
+            # For individual tests, we create one file per test, with the name
+            # of the test in the file as well.
+            test_filename = test_name_parts[-1]
+            # Append `.ini` to the test filename to indicate it's the metadata
+            # file.
+            test_name_parts[-1] += ".ini"
+            metadata_filename = os.path.join(self.metadata_output_dir,
+                                             *test_name_parts)
+            _log.debug("Creating a test ini file %s", metadata_filename)
+
+            # The contents of the metadata file is two lines:
+            # 1. the test name inside square brackets
+            # 2. an indented line with the test status and reason
+            metadata_file_contents = ("[%s]\n  disabled: build_wpt_metadata.py" % test_filename)
+        return metadata_filename, metadata_file_contents
diff --git a/third_party/blink/tools/blinkpy/w3c/wpt_metadata_builder_unittest.py b/third_party/blink/tools/blinkpy/w3c/wpt_metadata_builder_unittest.py
new file mode 100644
index 0000000..3076914
--- /dev/null
+++ b/third_party/blink/tools/blinkpy/w3c/wpt_metadata_builder_unittest.py
@@ -0,0 +1,72 @@
+# Copyright 2019 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+from collections import OrderedDict
+import os
+import unittest
+
+from blinkpy.common.host_mock import MockHost
+from blinkpy.web_tests.models.test_expectations import TestExpectations
+from blinkpy.web_tests.port.factory_mock import MockPortFactory
+from blinkpy.w3c.wpt_metadata_builder import WPTMetadataBuilder
+
+
+def _make_expectation(port, test_name, test_statuses):
+    """Creates an expectation object for a single test.
+
+    Args:
+        port: the port to run against
+        test_name: the name of the test
+        test_status: the statuses of the test
+
+    Returns:
+        An expectation object with the given test and statuses.
+    """
+    expectation_dict = OrderedDict()
+    expectation_dict["expectations"] = "Bug(test) %s [ %s ]" % (test_name, test_statuses)
+    return TestExpectations(port, tests=[test_name], expectations_dict=expectation_dict)
+
+
+class WPTMetadataBuilderTest(unittest.TestCase):
+
+    def setUp(self):
+        self.num = 2
+        self.host = MockHost()
+        self.host.port_factory = MockPortFactory(self.host)
+        self.port = self.host.port_factory.get()
+
+    def test_skipped_test(self):
+        """A skipped WPT test should get a test-specific metadata file."""
+        test_name = "external/wpt/test.html"
+        expectations = _make_expectation(self.port, test_name, "SKIP")
+        metadata_builder = WPTMetadataBuilder(expectations)
+        filename, contents = metadata_builder.get_metadata_filename_and_contents(test_name)
+        self.assertEqual("test.html.ini", filename)
+        self.assertEqual("[test.html]\n  disabled: build_wpt_metadata.py", contents)
+
+    def test_skipped_directory(self):
+        """A skipped WPT directory should get a dir-wide metadata file."""
+        test_name = "external/wpt/test_dir/"
+        expectations = _make_expectation(self.port, test_name, "SKIP")
+        metadata_builder = WPTMetadataBuilder(expectations)
+        filename, contents = metadata_builder.get_metadata_filename_and_contents(test_name)
+        self.assertEqual(os.path.join("test_dir", "__dir__.ini"), filename)
+        self.assertEqual("disabled: build_wpt_metadata.py", contents)
+
+    def test_non_wpt_test(self):
+        """A non-WPT test should not get any metadata."""
+        test_name = "some/other/test.html"
+        expectations = _make_expectation(self.port, test_name, "SKIP")
+        metadata_builder = WPTMetadataBuilder(expectations)
+        filename, contents = metadata_builder.get_metadata_filename_and_contents(test_name)
+        self.assertIsNone(filename)
+        self.assertIsNone(contents)
+
+    def test_wpt_test_not_skipped(self):
+        """A WPT test that is not skipped should not get any metadata."""
+        test_name = "external/wpt/test.html"
+        expectations = _make_expectation(self.port, test_name, "TIMEOUT")
+        metadata_builder = WPTMetadataBuilder(expectations)
+        test_names = metadata_builder.get_test_names_for_metadata()
+        self.assertFalse(test_names)
diff --git a/third_party/blink/tools/blinkpy/w3c/wpt_output_updater.py b/third_party/blink/tools/blinkpy/w3c/wpt_output_updater.py
new file mode 100644
index 0000000..bb5bcff0
--- /dev/null
+++ b/third_party/blink/tools/blinkpy/w3c/wpt_output_updater.py
@@ -0,0 +1,167 @@
+# Copyright 2019 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""Updates the output of a WPT run.
+
+The purpose of this script is to do any post-processing on the WPT output that
+is necessary to support features unavailable in WPT. For example, TestExpectations
+for flaky tests where multiple possible statuses are listed for a test. However,
+WPT only supports a single status so it can't understand that a test is flaky.
+
+This script takes two inputs:
+1. The output JSON file of a WPT run
+2. The set of test expectations files
+
+It then creates a new output JSON file with any required adjustments (eg: the
+expected statuses of flaky tests filled in from the expectations file).
+"""
+
+import argparse
+import json
+import logging
+import os
+
+from blinkpy.common.system.log_utils import configure_logging
+
+_log = logging.getLogger(__name__)
+
+
+class WPTOutputUpdater(object):
+
+    def __init__(self, expectations):
+        """
+        Args:
+            expectations: a blinkpy.web_tests.models.test_expectations.TestExpectations object
+        """
+        self.expectations = expectations
+        self.old_json_output_file_path = None
+        self.new_json_output_dir = None
+        self.new_json_output_filename = None
+
+    def run(self, args=None):
+        """Main entry point to parse flags and execute the script."""
+        parser = argparse.ArgumentParser(description=__doc__)
+        parser.add_argument("--old-json-output-file-path",
+                            help="The JSON output file to be updated, generated by WPT.")
+        parser.add_argument("--new-json-output-dir",
+                            help="The directory to put the new JSON output file.")
+        parser.add_argument("--new-json-output-filename",
+                            help="The name of the new JSON output file.")
+        parser.add_argument('-v', '--verbose', action='store_true', help='More verbose logging.')
+        args = parser.parse_args(args)
+
+        log_level = logging.DEBUG if args.verbose else logging.INFO
+        configure_logging(logging_level=log_level, include_time=True)
+
+        self.old_json_output_file_path = args.old_json_output_file_path
+        self.new_json_output_dir = args.new_json_output_dir
+        self.new_json_output_filename = args.new_json_output_filename
+        self._update_output_and_write()
+
+        return 0
+
+    def _update_output_and_write(self):
+        """Updates the output JSON and writes it to disk."""
+        old_output_file = open(self.old_json_output_file_path, "r")
+        new_output_json = self.update_output_json(json.load(old_output_file))
+
+        # Ok, we updated all the tests that were in this file, output it
+        if not os.path.exists(self.new_json_output_dir):
+            os.makedirs(self.new_json_output_dir)
+        new_file_path = os.path.join(self.new_json_output_dir,
+                                     self.new_json_output_filename)
+        if os.path.exists(new_file_path):
+            _log.warning("Output file already exists, will be overwritten: %s",
+                         new_file_path)
+
+        with open(new_file_path, "w") as new_output_file:
+            json.dump(new_output_json, new_output_file)
+
+    def update_output_json(self, output_json):
+        """Updates the output JSON object in place.
+
+        Args:
+            output_json: a nested dict containing the JSON output from WPT.
+
+        Returns:
+            The updated JSON dictionary
+        """
+        delim = output_json['path_delimiter']
+        # Go through each WPT expectation, try to find it in the output, and
+        # then update the expected statuses in the output file.
+        for e in self.expectations.expectations():
+            test_leaf = self._find_test_for_expectation(e, delim, output_json)
+            if test_leaf is not None:
+                self._update_output_for_test(e, test_leaf)
+        return output_json
+
+    def _find_test_for_expectation(self, exp, delim, output_json):
+        """Finds the test output for the specified expectation.
+
+        We only handle expectations for WPT tests, so we skip non-WPT entries as
+        well as directory-wide expectations for WPT. We also want to ensure that
+        the test from the expectation was run by the specific shard that created
+        the output.
+
+        Args:
+            exp: an expectation object representing a line from the expectation
+                    file.
+            delim: the delimiter character in the test names.
+            output_json: a nested dict containing the JSON output from WPT.
+
+        Returns:
+            The leaf node from the JSON output file for the test that needs to
+            be updated, which is a dictionary. Or None if this expectation is
+            not supposed to be handled.
+        """
+        # Skip expectations for non-WPT tests
+        if not exp.name or not exp.name.startswith('external/wpt'):
+            return None
+
+        # Split the test name by the test delimiter. We omit the first 2 entries
+        # because they are 'external' and 'wpt' and these don't exist in the WPT
+        # run.
+        test_name_parts = exp.name.split(delim)[2:]
+
+        # Drill down through the JSON output file using the parts of the test
+        # name to find the leaf node containing the results for this test.
+        test_leaf = output_json['tests']
+        for name_part in test_name_parts:
+            # Since this script runs on each shard, it's possible that the test
+            # from the expectations file was not run in this shard. If we don't
+            # find the test in the WPT output, then skip the expectation.
+            if name_part not in test_leaf.keys():
+                _log.debug("Test was not run: %s", exp.name)
+                return None
+            test_leaf = test_leaf[name_part]
+
+        # Ensure that the expectation is for an actual test, not a directory. To
+        # do this we check that we're at a leaf, which should have 'actual' and
+        # 'expected' fields.
+        if 'actual' not in test_leaf or 'expected' not in test_leaf:
+            _log.debug("Expectation was not for a test, skipping: %s", exp.name)
+            return None
+
+        # If we get this far then we have an expectation for a single test that
+        # was actually run by this shard, so return the test leaf that needs to
+        # be updated in the JSON output.
+        return test_leaf
+
+    def _update_output_for_test(self, exp, test_leaf):
+        """Updates the output of a specific test based on the expectations file.
+
+        Args:
+            exp: an expectation object representing a line from the expectation
+                 file.
+            test_leaf: a dictionary containing the JSON output for a test.
+        """
+        expectation_string = ' '.join(exp.expectations)
+        _log.info("Updating expectation for test %s from %s to %s",
+                  exp.name, test_leaf['expected'], expectation_string)
+        test_leaf['expected'] = expectation_string
+
+        # Also update the "is_regression" and "is_unexpected" fields.
+        is_unexpected = test_leaf['actual'] not in expectation_string
+        test_leaf['is_unexpected'] = is_unexpected
+        test_leaf['is_regression'] = is_unexpected and test_leaf['actual'] != 'PASS'
diff --git a/third_party/blink/tools/blinkpy/w3c/wpt_output_updater_unittest.py b/third_party/blink/tools/blinkpy/w3c/wpt_output_updater_unittest.py
new file mode 100644
index 0000000..a8a2bab
--- /dev/null
+++ b/third_party/blink/tools/blinkpy/w3c/wpt_output_updater_unittest.py
@@ -0,0 +1,110 @@
+# Copyright 2019 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+from collections import OrderedDict
+import json
+import unittest
+
+from blinkpy.common.host_mock import MockHost
+from blinkpy.web_tests.models.test_expectations import TestExpectations
+from blinkpy.web_tests.port.factory_mock import MockPortFactory
+from blinkpy.w3c.wpt_output_updater import WPTOutputUpdater
+
+_EXPECTATIONS_TEST_LIST = [
+    "some/test.html",
+    "external/wpt/expected_crash.html",
+    "external/wpt/flake.html",
+    "external/wpt/subdir/unexpected_failure.html",
+    "passed/test.html"
+]
+
+_EXPECTATIONS_FILE_STRING = """
+Bug(test) some/test.html [ Failure ]
+Bug(test) external/wpt/expected_crash.html [ Crash ]
+Bug(test) external/wpt/flake.html [ Timeout Failure ]
+Bug(test) external/wpt/subdir/unexpected_failure.html [ Timeout ]
+"""
+
+
+class WPTOutputUpdaterTest(unittest.TestCase):
+
+    def setUp(self):
+        self.host = MockHost()
+        self.host.port_factory = MockPortFactory(self.host)
+        self.port = self.host.port_factory.get()
+        expectations_dict = OrderedDict()
+        expectations_dict['expectations'] = _EXPECTATIONS_FILE_STRING
+        self.exp = TestExpectations(self.port, tests=_EXPECTATIONS_TEST_LIST, expectations_dict=expectations_dict)
+
+    def test_update_output_json(self):
+        """Tests that output JSON is properly updated with expectations."""
+        # Create a WPTOutputUpdater and reset it to use our test expectations.
+        output_updater = WPTOutputUpdater(self.exp)
+
+        # Note: this is the WPT output which omits the "external/wpt" root that
+        # is present in the expectations file. Also, the expected status is
+        # always PASS by default.
+        output_string = """
+        {
+            "path_delimiter": "/",
+            "tests": {
+                "some": {
+                    "test.html": {
+                        "expected": "PASS",
+                        "actual": "PASS"
+                    }
+                },
+                "expected_crash.html": {
+                    "expected": "PASS",
+                    "actual": "CRASH"
+                },
+                "flake.html": {
+                    "expected": "PASS",
+                    "actual": "TIMEOUT"
+                },
+                "subdir": {
+                    "unexpected_failure.html": {
+                        "expected": "PASS",
+                        "actual": "FAIL"
+                    }
+                }
+            }
+        }
+        """
+        output_json = json.loads(output_string)
+
+        # A few simple assertions that the original JSON is formatter properly.
+        self.assertEqual("PASS", output_json["tests"]["expected_crash.html"]["expected"])
+        self.assertEqual("FAIL", output_json["tests"]["subdir"]["unexpected_failure.html"]["actual"])
+
+        # Run the output updater, and confirm the expected statuses are updated.
+        new_output_json = output_updater.update_output_json(output_json)
+
+        # some/test.html should not be updated since the expectation is not for
+        # external/wpt
+        cur_test = new_output_json["tests"]["some"]["test.html"]
+        self.assertEqual("PASS", cur_test["expected"])
+
+        # The expected_crash.html test crashed as expected. It's expected status
+        # should be updated but is_regression and is_unexpected are both False
+        # since this test ran as we expected.
+        cur_test = new_output_json["tests"]["expected_crash.html"]
+        self.assertEqual("CRASH", cur_test["expected"])
+        self.assertFalse(cur_test["is_regression"])
+        self.assertFalse(cur_test["is_unexpected"])
+
+        # The flake.html test ran as expected because its status was one of the
+        # ones from the expectation file.
+        cur_test = new_output_json["tests"]["flake.html"]
+        self.assertEqual("TIMEOUT FAIL", cur_test["expected"])
+        self.assertFalse(cur_test["is_regression"])
+        self.assertFalse(cur_test["is_unexpected"])
+
+        # The unexpected_failure.html test had a different status than expected,
+        # so is_unexpected is true. Since the actual status wasn't a Pass, it's
+        # also a regression.
+        cur_test = new_output_json["tests"]["subdir"]["unexpected_failure.html"]
+        self.assertEqual("TIMEOUT", cur_test["expected"])
+        self.assertTrue(cur_test["is_regression"])
+        self.assertTrue(cur_test["is_unexpected"])
diff --git a/third_party/blink/tools/build_wpt_metadata.py b/third_party/blink/tools/build_wpt_metadata.py
new file mode 100755
index 0000000..75f8a0f
--- /dev/null
+++ b/third_party/blink/tools/build_wpt_metadata.py
@@ -0,0 +1,21 @@
+#!/usr/bin/env vpython
+# Copyright 2019 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import sys
+
+from blinkpy.common.host import Host
+from blinkpy.w3c.wpt_metadata_builder import WPTMetadataBuilder
+from blinkpy.web_tests.models.test_expectations import TestExpectations
+
+
+def main(args):
+    host = Host()
+    port = host.port_factory.get()
+    expectations = TestExpectations(port)
+    metadata_builder = WPTMetadataBuilder(expectations)
+    sys.exit(metadata_builder.run(args))
+
+if __name__ == '__main__':
+    main(sys.argv[1:])
diff --git a/third_party/blink/tools/update_wpt_output.py b/third_party/blink/tools/update_wpt_output.py
new file mode 100755
index 0000000..ef78ffd
--- /dev/null
+++ b/third_party/blink/tools/update_wpt_output.py
@@ -0,0 +1,21 @@
+#!/usr/bin/env vpython
+# Copyright 2019 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import sys
+
+from blinkpy.common.host import Host
+from blinkpy.w3c.wpt_output_updater import WPTOutputUpdater
+from blinkpy.web_tests.models.test_expectations import TestExpectations
+
+
+def main(args):
+    host = Host()
+    port = host.port_factory.get()
+    expectations = TestExpectations(port)
+    output_updater = WPTOutputUpdater(expectations)
+    sys.exit(output_updater.run(args))
+
+if __name__ == '__main__':
+    main(sys.argv[1:])
diff --git a/third_party/blink/web_tests/NeverFixTests b/third_party/blink/web_tests/NeverFixTests
index ea4b31a..c478f550 100644
--- a/third_party/blink/web_tests/NeverFixTests
+++ b/third_party/blink/web_tests/NeverFixTests
@@ -2147,11 +2147,6 @@
 virtual/omt-worker-fetch/external/wpt/service-workers/service-worker/fetch-event-is-reload-navigation-manual.https.html [ WontFix ]
 virtual/omt-worker-fetch/external/wpt/xhr/send-authentication-existing-session-manual.htm [ WontFix ]
 virtual/omt-worker-fetch/external/wpt/xhr/send-authentication-prompt-2-manual.htm [ WontFix ]
-virtual/not-omt-sw-fetch/external/wpt/service-workers/service-worker/fetch-event-is-history-backward-navigation-manual.https.html [ WontFix ]
-virtual/not-omt-sw-fetch/external/wpt/service-workers/service-worker/fetch-event-is-history-forward-navigation-manual.https.html [ WontFix ]
-virtual/not-omt-sw-fetch/external/wpt/service-workers/service-worker/fetch-event-is-reload-navigation-manual.https.html [ WontFix ]
-virtual/not-omt-sw-fetch/external/wpt/xhr/send-authentication-existing-session-manual.htm [ WontFix ]
-virtual/not-omt-sw-fetch/external/wpt/xhr/send-authentication-prompt-2-manual.htm [ WontFix ]
 virtual/speech-with-unified-autoplay/external/wpt/speech-api/SpeechRecognition-abort-manual.https.html [ WontFix ]
 virtual/speech-with-unified-autoplay/external/wpt/speech-api/SpeechRecognition-onerror-manual.https.html [ WontFix ]
 virtual/speech-with-unified-autoplay/external/wpt/speech-api/SpeechRecognition-onresult-manual.https.html [ WontFix ]
diff --git a/third_party/blink/web_tests/TestExpectations b/third_party/blink/web_tests/TestExpectations
index 5157177..c72f9be 100644
--- a/third_party/blink/web_tests/TestExpectations
+++ b/third_party/blink/web_tests/TestExpectations
@@ -3069,7 +3069,6 @@
 crbug.com/832071 virtual/blink-cors/external/wpt/service-workers/service-worker/worker-client-id.https.html [ Failure ]
 crbug.com/832071 virtual/navigation-mojo-response/external/wpt/service-workers/service-worker/worker-client-id.https.html [ Failure ]
 crbug.com/832071 virtual/omt-worker-fetch/external/wpt/service-workers/service-worker/worker-client-id.https.html [ Timeout ]
-crbug.com/832071 virtual/not-omt-sw-fetch/external/wpt/service-workers/service-worker/worker-client-id.https.html [ Failure ]
 
 # failures in external/wpt/css/css-animations/ and web-animations/ from Mozilla tests
 crbug.com/849859 external/wpt/css/css-animations/CSSAnimation-pausing.tentative.html [ Failure ]
@@ -3208,6 +3207,82 @@
 crbug.com/968164 external/wpt/css/css-ui/webkit-appearance-menulist-button-001.html [ Failure ]
 
 # ====== New tests from wpt-importer added here ======
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer/http-rp/same-origin/http-http/script-tag/keep-origin-redirect/generic.http.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer-when-downgrade/http-rp/same-origin/http-http/script-tag/swap-origin-redirect/insecure-protocol.http.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/fetch/api/basic/header-value-combining.any.sharedworker.html [ Timeout ]
+crbug.com/626703 virtual/layout_ng_experimental/external/wpt/css/css-multicol/multicol-breaking-004.html [ Failure ]
+crbug.com/626703 virtual/layout_ng_experimental/external/wpt/css/css-multicol/multicol-span-all-children-height-002.html [ Failure ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer-when-downgrade/meta-referrer/same-origin/http-https/iframe-tag/keep-origin-redirect/upgrade-protocol.http.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-http/iframe-tag/no-redirect/same-origin-insecure.http.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer-when-downgrade/meta-referrer/cross-origin/http-http/img-tag/swap-origin-redirect/insecure-protocol.http.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/origin-when-cross-origin/attr-referrer/cross-origin/http-https/img-tag/no-redirect/cross-origin.http.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/origin-when-cross-origin/http-rp/cross-origin/http-https/img-tag/swap-origin-redirect/cross-origin.http.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/fetch/sec-metadata/worker.tentative.https.sub.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer-when-downgrade/attr-referrer/cross-origin/http-http/img-tag/keep-origin-redirect/insecure-protocol.http.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/fetch/sec-metadata/fetch-via-serviceworker--respondWith.tentative.https.sub.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/fetch/content-type/script.window.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/origin-when-cross-origin/attr-referrer/cross-origin/http-http/a-tag/no-redirect/cross-origin.http.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/fetch/sec-metadata/redirect/multiple-redirect-https-downgrade-upgrade.tentative.sub.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/fetch/api/response/response-stream-disturbed-1.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/fetch/nosniff/importscripts.html [ Timeout ]
+crbug.com/626703 external/wpt/css/css-multicol/multicol-breaking-004.html [ Failure ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer-when-downgrade/attr-referrer/cross-origin/http-https/script-tag/swap-origin-redirect/upgrade-protocol.http.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/origin-when-cross-origin/attr-referrer/cross-origin/http-https/img-tag/keep-origin-redirect/cross-origin.http.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer/meta-referrer/cross-origin/http-http/iframe-tag/swap-origin-redirect/generic.http.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer/attr-referrer/cross-origin/http-http/img-tag/swap-origin-redirect/generic.http.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer/attr-referrer/cross-origin/http-https/iframe-tag/keep-origin-redirect/generic.http.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer/meta-referrer/cross-origin/http-https/fetch-request/keep-origin-redirect/generic.http.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer/meta-referrer/same-origin/http-http/script-tag/keep-origin-redirect/generic.http.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/origin-when-cross-origin/meta-referrer/cross-origin/http-http/iframe-tag/no-redirect/cross-origin.http.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/fetch/api/cors/cors-origin.any.worker.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/fetch/data-urls/processing.any.worker.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/fetch/sec-metadata/img.tentative.https.sub.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer/http-rp/same-origin/http-http/worker-request/keep-origin-redirect/generic.http.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer-when-downgrade/meta-referrer/cross-origin/http-http/xhr-request/no-redirect/insecure-protocol.http.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/origin-when-cross-origin/meta-referrer/cross-origin/http-http/img-tag/no-redirect/cross-origin.http.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer-when-downgrade/http-rp/same-origin/http-http/script-tag/no-redirect/insecure-protocol.http.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer/meta-referrer/cross-origin/http-http/a-tag/no-redirect/generic.http.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer-when-downgrade/http-rp/cross-origin/http-http/fetch-request/swap-origin-redirect/insecure-protocol.http.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/fetch/api/basic/request-referrer-redirected-worker.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer/http-rp/cross-origin/http-https/xhr-request/keep-origin-redirect/generic.http.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/css-integration/image/inline-style.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer-when-downgrade/meta-referrer/cross-origin/http-http/fetch-request/swap-origin-redirect/insecure-protocol.http.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/fetch/api/cors/cors-redirect.any.worker.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer/http-rp/same-origin/http-https/script-tag/no-redirect/generic.http.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/fetch/api/basic/request-headers-case.any.worker.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer/http-rp/cross-origin/http-https/iframe-tag/swap-origin-redirect/generic.http.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer/meta-referrer/same-origin/http-https/script-tag/swap-origin-redirect/generic.http.html [ Timeout ]
+crbug.com/626703 virtual/layout_ng_experimental/external/wpt/css/css-multicol/multicol-span-all-children-height-003.html [ Failure ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/origin-when-cross-origin/meta-referrer/cross-origin/http-http/xhr-request/no-redirect/cross-origin.http.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/origin-when-cross-origin/http-rp/cross-origin/http-http/img-tag/keep-origin-redirect/cross-origin.http.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/fetch/data-urls/base64.any.worker.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer/meta-referrer/cross-origin/http-https/iframe-tag/swap-origin-redirect/generic.http.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/origin-when-cross-origin/meta-referrer/cross-origin/http-http/fetch-request/no-redirect/cross-origin.http.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/fetch/nosniff/parsing-nosniff.window.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer/attr-referrer/cross-origin/http-https/img-tag/no-redirect/generic.http.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/fetch/api/basic/integrity.sub.any.sharedworker.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer-when-downgrade/meta-referrer/cross-origin/http-https/script-tag/keep-origin-redirect/upgrade-protocol.http.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer/meta-referrer/cross-origin/http-http/fetch-request/keep-origin-redirect/generic.http.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/fetch/content-encoding/bad-gzip-body.any.worker.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/fetch/api/cors/cors-preflight-status.any.worker.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer-when-downgrade/meta-referrer/cross-origin/http-http/img-tag/no-redirect/insecure-protocol.http.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/origin-when-cross-origin/http-rp/cross-origin/http-http/fetch-request/keep-origin-redirect/cross-origin.http.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/origin-when-cross-origin/http-rp/cross-origin/http-http/xhr-request/no-redirect/cross-origin.http.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/fetch/api/response/response-stream-disturbed-5.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/fetch/api/redirect/redirect-count.any.worker.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer-when-downgrade/meta-referrer/same-origin/http-https/xhr-request/no-redirect/upgrade-protocol.http.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer/http-rp/cross-origin/http-http/img-tag/keep-origin-redirect/generic.http.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/fetch/api/response/response-consume-empty.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer/http-rp/cross-origin/http-http/iframe-tag/swap-origin-redirect/generic.http.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer/meta-referrer/cross-origin/http-http/img-tag/keep-origin-redirect/generic.http.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer-when-downgrade/meta-referrer/same-origin/http-http/module-worker/keep-origin-redirect/insecure-protocol.http.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/fetch/api/request/request-type-attribute-historical.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/fetch/api/redirect/redirect-back-to-original-origin.any.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/origin-when-cross-origin/meta-referrer/cross-origin/http-https/img-tag/swap-origin-redirect/cross-origin.http.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/origin-when-cross-origin/http-rp/cross-origin/http-https/a-tag/no-redirect/cross-origin.http.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer-when-downgrade/http-rp/cross-origin/http-http/iframe-tag/keep-origin-redirect/insecure-protocol.http.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/fetch/api/abort/destroyed-context.html [ Timeout ]
+crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/origin-when-cross-origin/http-rp/cross-origin/http-https/fetch-request/swap-origin-redirect/cross-origin.http.html [ Timeout ]
 crbug.com/626703 [ Mac10.11 ] external/wpt/shape-detection/detection-HTMLVideoElement-invalid-state.html [ Timeout ]
 crbug.com/626703 [ Mac10.12 ] external/wpt/webaudio/the-audio-api/the-mediaelementaudiosourcenode-interface/mediaElementAudioSourceToScriptProcessorTest.html [ Timeout ]
 crbug.com/626703 [ Mac10.12 ] external/wpt/html/semantics/embedded-content/media-elements/track/track-element/track-mode.html [ Timeout ]
@@ -3228,7 +3303,6 @@
 crbug.com/626703 external/wpt/service-workers/service-worker/ready.https.html [ Timeout ]
 crbug.com/626703 virtual/blink-cors/external/wpt/service-workers/service-worker/ready.https.html [ Timeout ]
 crbug.com/626703 virtual/omt-worker-fetch/external/wpt/service-workers/service-worker/ready.https.html [ Timeout ]
-crbug.com/626703 virtual/not-omt-sw-fetch/external/wpt/service-workers/service-worker/ready.https.html [ Timeout ]
 crbug.com/626703 [ Linux ] external/wpt/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-002.tentative.html [ Failure ]
 crbug.com/626703 [ Mac ] external/wpt/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-002.tentative.html [ Failure ]
 crbug.com/626703 [ Win ] external/wpt/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-002.tentative.html [ Failure ]
@@ -3298,7 +3372,6 @@
 crbug.com/626703 external/wpt/xhr/abort-after-stop.any.worker.html [ Timeout ]
 crbug.com/626703 virtual/blink-cors/external/wpt/xhr/abort-after-stop.any.worker.html [ Timeout ]
 crbug.com/626703 virtual/omt-worker-fetch/external/wpt/xhr/abort-after-stop.any.worker.html [ Timeout ]
-crbug.com/626703 virtual/not-omt-sw-fetch/external/wpt/xhr/abort-after-stop.any.worker.html [ Timeout ]
 crbug.com/626703 external/wpt/webvtt/rendering/cues-with-video/processing-model/bidi/vertical_rl.html [ Failure ]
 crbug.com/626703 external/wpt/webvtt/rendering/cues-with-video/processing-model/selectors/cue/vertical_ruby-position.html [ Failure ]
 crbug.com/626703 external/wpt/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_vertical_text-combine-upright.html [ Failure ]
@@ -3366,7 +3439,6 @@
 crbug.com/626703 external/wpt/xhr/event-readystatechange-loaded.any.worker.html [ Timeout Failure ]
 crbug.com/626703 virtual/blink-cors/external/wpt/xhr/event-readystatechange-loaded.any.worker.html [ Timeout Failure ]
 crbug.com/626703 virtual/omt-worker-fetch/external/wpt/xhr/event-readystatechange-loaded.any.worker.html [ Timeout Failure ]
-crbug.com/626703 virtual/not-omt-sw-fetch/external/wpt/xhr/event-readystatechange-loaded.any.worker.html [ Timeout Failure ]
 crbug.com/626703 external/wpt/css/css-sizing/image-min-max-content-intrinsic-size-change-003.html [ Failure ]
 crbug.com/626703 external/wpt/css/css-text/line-breaking/line-breaking-017.html [ Failure ]
 crbug.com/626703 external/wpt/css/css-scroll-snap/scroll-target-padding-003.html [ Failure ]
@@ -3389,7 +3461,6 @@
 crbug.com/626703 external/wpt/xhr/event-readystatechange-loaded.any.html [ Timeout Failure ]
 crbug.com/626703 virtual/blink-cors/external/wpt/xhr/event-readystatechange-loaded.any.html [ Timeout Failure ]
 crbug.com/626703 virtual/omt-worker-fetch/external/wpt/xhr/event-readystatechange-loaded.any.html [ Timeout Failure ]
-crbug.com/626703 virtual/not-omt-sw-fetch/external/wpt/xhr/event-readystatechange-loaded.any.html [ Timeout Failure ]
 crbug.com/626703 virtual/threaded/external/wpt/css/css-scroll-snap/scroll-target-margin-002.html [ Failure ]
 crbug.com/626703 virtual/threaded/external/wpt/css/css-scroll-snap/scroll-target-padding-002.html [ Failure ]
 crbug.com/626703 virtual/threaded/external/wpt/css/css-scroll-snap/scroll-target-snap-003.html [ Failure ]
@@ -3532,7 +3603,6 @@
 crbug.com/626703 external/wpt/fetch/content-type/response.window.html [ Timeout ]
 crbug.com/626703 virtual/blink-cors/external/wpt/fetch/content-type/response.window.html [ Timeout ]
 crbug.com/626703 virtual/omt-worker-fetch/external/wpt/fetch/content-type/response.window.html [ Timeout ]
-crbug.com/626703 virtual/not-omt-sw-fetch/external/wpt/fetch/content-type/response.window.html [ Timeout ]
 crbug.com/626703 virtual/streaming-preload/external/wpt/html/semantics/scripting-1/the-script-element/module/dynamic-import/no-active-script-manual-module.html [ Timeout ]
 crbug.com/626703 virtual/streaming-preload/external/wpt/html/semantics/scripting-1/the-script-element/module/dynamic-import/no-active-script-manual-classic.html [ Timeout ]
 crbug.com/626703 external/wpt/html/semantics/scripting-1/the-script-element/module/dynamic-import/no-active-script-manual-classic.html [ Timeout ]
@@ -3615,11 +3685,6 @@
 crbug.com/626703 virtual/omt-worker-fetch/external/wpt/referrer-policy/css-integration/svg/internal-stylesheet.html [ Timeout Failure ]
 crbug.com/626703 virtual/omt-worker-fetch/external/wpt/referrer-policy/css-integration/svg/presentation-attribute.html [ Timeout Failure ]
 crbug.com/626703 virtual/omt-worker-fetch/external/wpt/referrer-policy/css-integration/svg/processing-instruction.html [ Timeout Failure ]
-crbug.com/626703 virtual/not-omt-sw-fetch/external/wpt/referrer-policy/css-integration/svg/external-stylesheet.html [ Timeout Failure ]
-crbug.com/626703 virtual/not-omt-sw-fetch/external/wpt/referrer-policy/css-integration/svg/inline-style.html [ Timeout Failure ]
-crbug.com/626703 virtual/not-omt-sw-fetch/external/wpt/referrer-policy/css-integration/svg/internal-stylesheet.html [ Timeout Failure ]
-crbug.com/626703 virtual/not-omt-sw-fetch/external/wpt/referrer-policy/css-integration/svg/presentation-attribute.html [ Timeout Failure ]
-crbug.com/626703 virtual/not-omt-sw-fetch/external/wpt/referrer-policy/css-integration/svg/processing-instruction.html [ Timeout Failure ]
 
 crbug.com/906959 external/wpt/referrer-policy/no-referrer-when-downgrade/http-rp/same-origin/http-http/shared-worker/keep-origin-redirect/insecure-protocol.http.html [ Failure ]
 crbug.com/906959 external/wpt/referrer-policy/no-referrer-when-downgrade/http-rp/same-origin/http-http/shared-worker/no-redirect/insecure-protocol.http.html [ Failure ]
@@ -3717,38 +3782,6 @@
 crbug.com/906959 virtual/omt-worker-fetch/external/wpt/referrer-policy/unset-referrer-policy/http-rp/same-origin/http-http/shared-worker/no-redirect/insecure-protocol.http.html [ Failure ]
 crbug.com/906959 virtual/omt-worker-fetch/external/wpt/referrer-policy/unset-referrer-policy/meta-referrer/same-origin/http-http/shared-worker/keep-origin-redirect/insecure-protocol.http.html [ Failure ]
 crbug.com/906959 virtual/omt-worker-fetch/external/wpt/referrer-policy/unset-referrer-policy/meta-referrer/same-origin/http-http/shared-worker/no-redirect/insecure-protocol.http.html [ Failure ]
-crbug.com/906959 virtual/not-omt-sw-fetch/external/wpt/referrer-policy/no-referrer-when-downgrade/http-rp/same-origin/http-http/shared-worker/keep-origin-redirect/insecure-protocol.http.html [ Failure ]
-crbug.com/906959 virtual/not-omt-sw-fetch/external/wpt/referrer-policy/no-referrer-when-downgrade/http-rp/same-origin/http-http/shared-worker/no-redirect/insecure-protocol.http.html [ Failure ]
-crbug.com/906959 virtual/not-omt-sw-fetch/external/wpt/referrer-policy/no-referrer-when-downgrade/meta-referrer/same-origin/http-http/shared-worker/keep-origin-redirect/insecure-protocol.http.html [ Failure ]
-crbug.com/906959 virtual/not-omt-sw-fetch/external/wpt/referrer-policy/no-referrer-when-downgrade/meta-referrer/same-origin/http-http/shared-worker/no-redirect/insecure-protocol.http.html [ Failure ]
-crbug.com/906959 virtual/not-omt-sw-fetch/external/wpt/referrer-policy/origin/http-rp/same-origin/http-http/shared-worker/keep-origin-redirect/generic.http.html [ Failure ]
-crbug.com/906959 virtual/not-omt-sw-fetch/external/wpt/referrer-policy/origin/http-rp/same-origin/http-http/shared-worker/no-redirect/generic.http.html [ Failure ]
-crbug.com/906959 virtual/not-omt-sw-fetch/external/wpt/referrer-policy/origin/meta-referrer/same-origin/http-http/shared-worker/keep-origin-redirect/generic.http.html [ Failure ]
-crbug.com/906959 virtual/not-omt-sw-fetch/external/wpt/referrer-policy/origin/meta-referrer/same-origin/http-http/shared-worker/no-redirect/generic.http.html [ Failure ]
-crbug.com/906959 virtual/not-omt-sw-fetch/external/wpt/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-http/shared-worker/keep-origin-redirect/same-origin-insecure.http.html [ Failure ]
-crbug.com/906959 virtual/not-omt-sw-fetch/external/wpt/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-http/shared-worker/no-redirect/same-origin-insecure.http.html [ Failure ]
-crbug.com/906959 virtual/not-omt-sw-fetch/external/wpt/referrer-policy/origin-when-cross-origin/meta-referrer/same-origin/http-http/shared-worker/keep-origin-redirect/same-origin-insecure.http.html [ Failure ]
-crbug.com/906959 virtual/not-omt-sw-fetch/external/wpt/referrer-policy/origin-when-cross-origin/meta-referrer/same-origin/http-http/shared-worker/no-redirect/same-origin-insecure.http.html [ Failure ]
-crbug.com/906959 virtual/not-omt-sw-fetch/external/wpt/referrer-policy/same-origin/http-rp/same-origin/http-http/shared-worker/keep-origin-redirect/same-origin-insecure.http.html [ Failure ]
-crbug.com/906959 virtual/not-omt-sw-fetch/external/wpt/referrer-policy/same-origin/http-rp/same-origin/http-http/shared-worker/no-redirect/same-origin-insecure.http.html [ Failure ]
-crbug.com/906959 virtual/not-omt-sw-fetch/external/wpt/referrer-policy/same-origin/meta-referrer/same-origin/http-http/shared-worker/keep-origin-redirect/same-origin-insecure.http.html [ Failure ]
-crbug.com/906959 virtual/not-omt-sw-fetch/external/wpt/referrer-policy/same-origin/meta-referrer/same-origin/http-http/shared-worker/no-redirect/same-origin-insecure.http.html [ Failure ]
-crbug.com/906959 virtual/not-omt-sw-fetch/external/wpt/referrer-policy/strict-origin/http-rp/same-origin/http-http/shared-worker/keep-origin-redirect/insecure-protocol.http.html [ Failure ]
-crbug.com/906959 virtual/not-omt-sw-fetch/external/wpt/referrer-policy/strict-origin/http-rp/same-origin/http-http/shared-worker/no-redirect/insecure-protocol.http.html [ Failure ]
-crbug.com/906959 virtual/not-omt-sw-fetch/external/wpt/referrer-policy/strict-origin/meta-referrer/same-origin/http-http/shared-worker/keep-origin-redirect/insecure-protocol.http.html [ Failure ]
-crbug.com/906959 virtual/not-omt-sw-fetch/external/wpt/referrer-policy/strict-origin/meta-referrer/same-origin/http-http/shared-worker/no-redirect/insecure-protocol.http.html [ Failure ]
-crbug.com/906959 virtual/not-omt-sw-fetch/external/wpt/referrer-policy/strict-origin-when-cross-origin/http-rp/same-origin/http-http/shared-worker/keep-origin-redirect/same-insecure.http.html [ Failure ]
-crbug.com/906959 virtual/not-omt-sw-fetch/external/wpt/referrer-policy/strict-origin-when-cross-origin/http-rp/same-origin/http-http/shared-worker/no-redirect/same-insecure.http.html [ Failure ]
-crbug.com/906959 virtual/not-omt-sw-fetch/external/wpt/referrer-policy/strict-origin-when-cross-origin/meta-referrer/same-origin/http-http/shared-worker/keep-origin-redirect/same-insecure.http.html [ Failure ]
-crbug.com/906959 virtual/not-omt-sw-fetch/external/wpt/referrer-policy/strict-origin-when-cross-origin/meta-referrer/same-origin/http-http/shared-worker/no-redirect/same-insecure.http.html [ Failure ]
-crbug.com/906959 virtual/not-omt-sw-fetch/external/wpt/referrer-policy/unsafe-url/http-rp/same-origin/http-http/shared-worker/keep-origin-redirect/generic.http.html [ Failure ]
-crbug.com/906959 virtual/not-omt-sw-fetch/external/wpt/referrer-policy/unsafe-url/http-rp/same-origin/http-http/shared-worker/no-redirect/generic.http.html [ Failure ]
-crbug.com/906959 virtual/not-omt-sw-fetch/external/wpt/referrer-policy/unsafe-url/meta-referrer/same-origin/http-http/shared-worker/keep-origin-redirect/generic.http.html [ Failure ]
-crbug.com/906959 virtual/not-omt-sw-fetch/external/wpt/referrer-policy/unsafe-url/meta-referrer/same-origin/http-http/shared-worker/no-redirect/generic.http.html [ Failure ]
-crbug.com/906959 virtual/not-omt-sw-fetch/external/wpt/referrer-policy/unset-referrer-policy/http-rp/same-origin/http-http/shared-worker/keep-origin-redirect/insecure-protocol.http.html [ Failure ]
-crbug.com/906959 virtual/not-omt-sw-fetch/external/wpt/referrer-policy/unset-referrer-policy/http-rp/same-origin/http-http/shared-worker/no-redirect/insecure-protocol.http.html [ Failure ]
-crbug.com/906959 virtual/not-omt-sw-fetch/external/wpt/referrer-policy/unset-referrer-policy/meta-referrer/same-origin/http-http/shared-worker/keep-origin-redirect/insecure-protocol.http.html [ Failure ]
-crbug.com/906959 virtual/not-omt-sw-fetch/external/wpt/referrer-policy/unset-referrer-policy/meta-referrer/same-origin/http-http/shared-worker/no-redirect/insecure-protocol.http.html [ Failure ]
 
 crbug.com/367760 external/wpt/svg/pservers/reftests/meshgradient-complex-001.svg [ Failure ]
 crbug.com/367760 external/wpt/svg/pservers/reftests/meshgradient-bicubic-001.svg [ Failure ]
@@ -3875,7 +3908,6 @@
 crbug.com/626703 external/wpt/fetch/security/redirect-to-url-with-credentials.https.html [ Timeout ]
 crbug.com/626703 virtual/blink-cors/external/wpt/fetch/security/redirect-to-url-with-credentials.https.html [ Timeout ]
 crbug.com/626703 virtual/omt-worker-fetch/external/wpt/fetch/security/redirect-to-url-with-credentials.https.html [ Timeout ]
-crbug.com/626703 virtual/not-omt-sw-fetch/external/wpt/fetch/security/redirect-to-url-with-credentials.https.html [ Timeout ]
 crbug.com/626703 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/shapes1/shape-outside-polygon-024.html [ Failure ]
 crbug.com/626703 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/shapes1/shape-outside-ellipse-048.html [ Failure ]
 crbug.com/626703 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/shapes1/shape-outside-inset-026.html [ Failure ]
@@ -3950,7 +3982,6 @@
 crbug.com/626703 external/wpt/fetch/http-cache/basic-auth-cache-test.html [ Timeout ]
 crbug.com/626703 virtual/blink-cors/external/wpt/fetch/http-cache/basic-auth-cache-test.html [ Timeout ]
 crbug.com/626703 virtual/omt-worker-fetch/external/wpt/fetch/http-cache/basic-auth-cache-test.html [ Timeout ]
-crbug.com/626703 virtual/not-omt-sw-fetch/external/wpt/fetch/http-cache/basic-auth-cache-test.html [ Timeout ]
 crbug.com/626703 external/wpt/css/css-fonts/font-feature-settings-descriptor-01.html [ Failure ]
 crbug.com/626703 [ Win10 ] external/wpt/fetch/api/redirect/redirect-count.any.worker.html [ Timeout ]
 crbug.com/626703 [ Win10 ] external/wpt/fetch/api/redirect/redirect-count.any.html [ Timeout ]
@@ -4192,7 +4223,6 @@
 crbug.com/648295 external/wpt/service-workers/service-worker/update-bytecheck.https.html [ Timeout ]
 crbug.com/648295 virtual/blink-cors/external/wpt/service-workers/service-worker/update-bytecheck.https.html [ Timeout ]
 crbug.com/648295 virtual/omt-worker-fetch/external/wpt/service-workers/service-worker/update-bytecheck.https.html [ Timeout ]
-crbug.com/648295 virtual/not-omt-sw-fetch/external/wpt/service-workers/service-worker/update-bytecheck.https.html [ Timeout ]
 crbug.com/626703 external/wpt/svg/linking/reftests/href-filter-element.html [ Failure ]
 crbug.com/626703 external/wpt/webvtt/rendering/cues-with-video/processing-model/2_cues_overlapping_completely_move_up.html [ Failure ]
 crbug.com/626703 external/wpt/webvtt/rendering/cues-with-video/processing-model/2_cues_overlapping_partially_move_down.html [ Failure ]
@@ -4408,11 +4438,9 @@
 crbug.com/626703 external/wpt/xhr/preserve-ua-header-on-redirect.htm [ Failure ]
 crbug.com/626703 virtual/blink-cors/external/wpt/xhr/preserve-ua-header-on-redirect.htm [ Failure ]
 crbug.com/626703 virtual/omt-worker-fetch/external/wpt/xhr/preserve-ua-header-on-redirect.htm [ Failure ]
-crbug.com/626703 virtual/not-omt-sw-fetch/external/wpt/xhr/preserve-ua-header-on-redirect.htm [ Failure ]
 crbug.com/626703 external/wpt/xhr/setrequestheader-header-allowed.htm [ Failure ]
 crbug.com/626703 virtual/blink-cors/external/wpt/xhr/setrequestheader-header-allowed.htm [ Failure ]
 crbug.com/626703 virtual/omt-worker-fetch/external/wpt/xhr/setrequestheader-header-allowed.htm [ Failure ]
-crbug.com/626703 virtual/not-omt-sw-fetch/external/wpt/xhr/setrequestheader-header-allowed.htm [ Failure ]
 crbug.com/626703 [ Win10 ] external/wpt/preload/delaying-onload-link-preload-after-discovery.html [ Timeout ]
 crbug.com/626703 [ Win ] external/wpt/css/css-writing-modes/box-offsets-rel-pos-vlr-005.xht [ Failure ]
 crbug.com/626703 [ Win ] external/wpt/css/css-writing-modes/box-offsets-rel-pos-vrl-004.xht [ Failure ]
@@ -4470,7 +4498,6 @@
 
 crbug.com/917554 external/wpt/upgrade-insecure-requests/worker-subresource-fetch-upgrade.https.html [ Crash ]
 crbug.com/917554 virtual/omt-worker-fetch/external/wpt/upgrade-insecure-requests/worker-subresource-fetch-upgrade.https.html [ Crash ]
-crbug.com/917554 virtual/not-omt-sw-fetch/external/wpt/upgrade-insecure-requests/worker-subresource-fetch-upgrade.https.html [ Crash ]
 
 # Different results on try bots and CQ, skipped to unblock wpt import.
 crbug.com/888443 external/wpt/css/cssom-view/scroll-behavior-default-css.html [ Skip ]
@@ -4489,8 +4516,6 @@
 crbug.com/888470 virtual/blink-cors/external/wpt/referrer-policy/css-integration/child-css/processing-instruction.html [ Failure ]
 crbug.com/888470 virtual/omt-worker-fetch/external/wpt/referrer-policy/css-integration/child-css/internal-import-stylesheet.html [ Failure ]
 crbug.com/888470 virtual/omt-worker-fetch/external/wpt/referrer-policy/css-integration/child-css/processing-instruction.html [ Failure ]
-crbug.com/888470 virtual/not-omt-sw-fetch/external/wpt/referrer-policy/css-integration/child-css/internal-import-stylesheet.html [ Failure ]
-crbug.com/888470 virtual/not-omt-sw-fetch/external/wpt/referrer-policy/css-integration/child-css/processing-instruction.html [ Failure ]
 
 # This behavior (popups during unload) is being reverted on trunk; this test is
 # expected to fail when this change is merged back to earlier branches.
@@ -4523,14 +4548,11 @@
 crbug.com/881180 external/wpt/xhr/open-url-multi-window-4.htm [ Timeout ]
 crbug.com/881180 virtual/blink-cors/external/wpt/xhr/open-url-multi-window-4.htm [ Timeout ]
 crbug.com/881180 virtual/omt-worker-fetch/external/wpt/xhr/open-url-multi-window-4.htm [ Timeout ]
-crbug.com/881180 virtual/not-omt-sw-fetch/external/wpt/xhr/open-url-multi-window-4.htm [ Timeout ]
 
 crbug.com/655458 external/wpt/workers/Worker_terminate_event_queue.htm [ Pass Timeout ]
 crbug.com/655458 external/wpt/workers/semantics/multiple-workers/007.html [ Timeout ]
 crbug.com/655458 virtual/omt-worker-fetch/external/wpt/workers/Worker_terminate_event_queue.htm [ Pass Timeout ]
 crbug.com/655458 virtual/omt-worker-fetch/external/wpt/workers/semantics/multiple-workers/007.html [ Timeout ]
-crbug.com/655458 virtual/not-omt-sw-fetch/external/wpt/workers/Worker_terminate_event_queue.htm [ Pass Timeout ]
-crbug.com/655458 virtual/not-omt-sw-fetch/external/wpt/workers/semantics/multiple-workers/007.html [ Timeout ]
 
 crbug.com/910709 navigator_language/worker_navigator_language.html [ Timeout ]
 
@@ -4621,7 +4643,6 @@
 # worker script, because the script url has a .html file extension.
 crbug.com/655458 external/wpt/workers/semantics/multiple-workers/003.html [ Timeout ]
 crbug.com/655458 virtual/omt-worker-fetch/external/wpt/workers/semantics/multiple-workers/003.html [ Timeout ]
-crbug.com/655458 virtual/not-omt-sw-fetch/external/wpt/workers/semantics/multiple-workers/003.html [ Timeout ]
 
 crbug.com/435547 http/tests/cachestorage/serviceworker/ignore-search-with-credentials.html [ Skip ]
 
@@ -4678,13 +4699,11 @@
 crbug.com/691944 external/wpt/service-workers/service-worker/update-after-oneday.https.html [ Skip ]
 crbug.com/691944 virtual/blink-cors/external/wpt/service-workers/service-worker/update-after-oneday.https.html [ Skip ]
 crbug.com/691944 virtual/omt-worker-fetch/external/wpt/service-workers/service-worker/update-after-oneday.https.html [ Skip ]
-crbug.com/691944 virtual/not-omt-sw-fetch/external/wpt/service-workers/service-worker/update-after-oneday.https.html [ Skip ]
 
 # These tests (erroneously) see a platform-specific User-Agent header
 crbug.com/595993 external/wpt/service-workers/service-worker/fetch-header-visibility.https.html [ Failure ]
 crbug.com/595993 virtual/blink-cors/external/wpt/service-workers/service-worker/fetch-header-visibility.https.html [ Failure ]
 crbug.com/595993 virtual/omt-worker-fetch/external/wpt/service-workers/service-worker/fetch-header-visibility.https.html [ Failure ]
-crbug.com/595993 virtual/not-omt-sw-fetch/external/wpt/service-workers/service-worker/fetch-header-visibility.https.html [ Failure ]
 
 crbug.com/619427 [ Mac ] fast/overflow/overflow-height-float-not-removed-crash3.html [ Pass Failure ]
 
@@ -5835,7 +5854,6 @@
 crbug.com/933880 external/wpt/service-workers/service-worker/request-end-to-end.https.html [ Failure ]
 crbug.com/933880 virtual/blink-cors/external/wpt/service-workers/service-worker/request-end-to-end.https.html [ Failure ]
 crbug.com/933880 virtual/omt-worker-fetch/external/wpt/service-workers/service-worker/request-end-to-end.https.html [ Failure ]
-crbug.com/933880 virtual/not-omt-sw-fetch/external/wpt/service-workers/service-worker/request-end-to-end.https.html [ Failure ]
 crbug.com/933880 http/tests/inspector-protocol/network/interception-take-stream.js [ Failure ]
 crbug.com/933880 http/tests/inspector-protocol/network/xhr-interception-auth-fail.js [ Failure ]
 # This passes in content_shell but not in chrome with network service disabled,
@@ -6137,7 +6155,6 @@
 crbug.com/943636 virtual/mouseevent_fractional/fast/events/set-attribute-listener-window-onerror-crash.html [ Pass Failure ]
 crbug.com/943636 virtual/mouseevent_fractional/fast/events/window-onerror-05.html [ Pass Failure ]
 crbug.com/943636 virtual/omt-worker-fetch/fast/workers/worker-onerror-01.html [ Pass Failure ]
-crbug.com/943636 virtual/not-omt-sw-fetch/fast/workers/worker-onerror-01.html [ Pass Failure ]
 
 # Sheriff 2019-05-27
 crbug.com/942411 [ Win ] http/tests/devtools/network/network-search.js [ Pass Timeout ]
@@ -6201,3 +6218,5 @@
 crbug.com/978000 inspector-protocol/page/setWebLifecycleState.js [ Pass Timeout ]
 
 crbug.com/946700 [ Win ] http/tests/devtools/coverage/decorations-after-script-formatter.js [ Pass Timeout ]
+crbug.com/978254 [ Win ] http/tests/devtools/elements/edit/edit-dom-actions-4.js [ Pass Timeout ]
+crbug.com/977015 [ Win ] http/tests/devtools/elements/shadow/shadow-distribution.js [ Pass Timeout ]
diff --git a/third_party/blink/web_tests/VirtualTestSuites b/third_party/blink/web_tests/VirtualTestSuites
index 620195f..a4f8e0f 100644
--- a/third_party/blink/web_tests/VirtualTestSuites
+++ b/third_party/blink/web_tests/VirtualTestSuites
@@ -642,96 +642,6 @@
     "args": ["--enable-features=OffMainThreadDedicatedWorkerScriptFetch,PlzDedicatedWorker,OffMainThreadServiceWorkerScriptFetch,OffMainThreadSharedWorkerScriptFetch"]
   },
   {
-    "prefix": "not-omt-sw-fetch",
-    "base": "external/wpt/content-security-policy/inside-worker",
-    "args": ["--disable-features=OffMainThreadServiceWorkerScriptFetch"]
-  },
-  {
-    "prefix": "not-omt-sw-fetch",
-    "base": "external/wpt/content-security-policy/worker-src",
-    "args": ["--disable-features=OffMainThreadServiceWorkerScriptFetch"]
-  },
-  {
-    "prefix": "not-omt-sw-fetch",
-    "base": "external/wpt/fetch/",
-    "args": ["--disable-features=OffMainThreadServiceWorkerScriptFetch"]
-  },
-  {
-    "prefix": "not-omt-sw-fetch",
-    "base": "external/wpt/html/browsers/offline/appcache/workers/",
-    "args": ["--disable-features=OffMainThreadServiceWorkerScriptFetch"]
-  },
-  {
-    "prefix": "not-omt-sw-fetch",
-    "base": "external/wpt/mixed-content/classic-data-worker-fetch",
-    "args": ["--disable-features=OffMainThreadServiceWorkerScriptFetch"]
-  },
-  {
-    "prefix": "not-omt-sw-fetch",
-    "base": "external/wpt/mixed-content/module-data-worker-import",
-    "args": ["--disable-features=OffMainThreadServiceWorkerScriptFetch"]
-  },
-  {
-    "prefix": "not-omt-sw-fetch",
-    "base": "external/wpt/mixed-content/module-worker-top-level",
-    "args": ["--disable-features=OffMainThreadServiceWorkerScriptFetch"]
-  },
-  {
-    "prefix": "not-omt-sw-fetch",
-    "base": "external/wpt/mixed-content/worker-request",
-    "args": ["--disable-features=OffMainThreadServiceWorkerScriptFetch"]
-  },
-  {
-    "prefix": "not-omt-sw-fetch",
-    "base": "external/wpt/referrer-policy",
-    "args": ["--disable-features=OffMainThreadServiceWorkerScriptFetch"]
-  },
-  {
-    "prefix": "not-omt-sw-fetch",
-    "base": "external/wpt/resource-timing",
-    "args": ["--disable-features=OffMainThreadServiceWorkerScriptFetch"]
-  },
-  {
-    "prefix": "not-omt-sw-fetch",
-    "base": "external/wpt/service-workers",
-    "args": ["--disable-features=OffMainThreadServiceWorkerScriptFetch"]
-  },
-  {
-    "prefix": "not-omt-sw-fetch",
-    "base": "external/wpt/upgrade-insecure-requests",
-    "args": ["--disable-features=OffMainThreadServiceWorkerScriptFetch"]
-  },
-  {
-    "prefix": "not-omt-sw-fetch",
-    "base": "external/wpt/workers",
-    "args": ["--disable-features=OffMainThreadServiceWorkerScriptFetch"]
-  },
-  {
-    "prefix": "not-omt-sw-fetch",
-    "base": "external/wpt/xhr",
-    "args": ["--disable-features=OffMainThreadServiceWorkerScriptFetch"]
-  },
-  {
-    "prefix": "not-omt-sw-fetch",
-    "base": "fast/workers",
-    "args": ["--disable-features=OffMainThreadServiceWorkerScriptFetch"]
-  },
-  {
-    "prefix": "not-omt-sw-fetch",
-    "base": "http/tests/origin_trials",
-    "args": ["--disable-features=OffMainThreadServiceWorkerScriptFetch"]
-  },
-  {
-    "prefix": "not-omt-sw-fetch",
-    "base": "http/tests/security/cors-rfc1918",
-    "args": ["--disable-features=OffMainThreadServiceWorkerScriptFetch", "--enable-blink-features=CorsRFC1918"]
-  },
-  {
-    "prefix": "not-omt-sw-fetch",
-    "base": "http/tests/workers",
-    "args": ["--disable-features=OffMainThreadServiceWorkerScriptFetch"]
-  },
-  {
     "prefix": "webrtc-wpt-plan-b",
     "base": "external/wpt/webrtc",
     "args": ["--disable-features=RTCUnifiedPlanByDefault"]
diff --git a/third_party/blink/web_tests/accessibility/table-row-role-crash-expected.png b/third_party/blink/web_tests/accessibility/table-row-role-crash-expected.png
new file mode 100644
index 0000000..b5daa85
--- /dev/null
+++ b/third_party/blink/web_tests/accessibility/table-row-role-crash-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/accessibility/table-row-role-crash.html b/third_party/blink/web_tests/accessibility/table-row-role-crash.html
new file mode 100644
index 0000000..b87a438
--- /dev/null
+++ b/third_party/blink/web_tests/accessibility/table-row-role-crash.html
@@ -0,0 +1,79 @@
+<style></style>
+<script>
+
+function jsfuzzer() {
+    var variableElement = document.getElementById("variableElement"); //HTMLUnknownElement
+    var templateElement = document.getElementById("templateElement"); //HTMLTemplateElement
+    var htmlFormElement = document.getElementById("htmlFormElement"); //HTMLFormElement
+    var createdVarElement = document.createElement("var"); //HTMLUnknownElement
+    document.all[7].appendChild(htmlBaseTag);
+    var createdTBodyElement = document.createElement("tbody");
+    createdTBodyElement.insertRow();
+    document.all[20].appendChild(createdTBodyElement);
+    document.all[13].appendChild(htmlLiElement);
+
+    // For some reason past here, not appending via modulo fails to induce a crash?
+    document.all[52 % document.all.length].appendChild(createdVarElement);
+    document.adoptNode(htmlDescriptionTag);
+    htmlFormElement.reset();
+    document.all[90 % document.all.length].appendChild(variableElement);
+    document.all[85 % document.all.length].appendChild(templateElement);
+    htmlFormElement.reset();
+}
+
+function eventhandler2() {
+    var htmlLiElement = document.getElementById("htmlLiElement"); //HTMLLIElement
+    var htmlContentTag = document.getElementById("htmlContentTag"); //HTMLContentElement
+    var htmlAreaTag = document.getElementById("htmlAreaTag"); //HTMLAreaElement
+    var htmlUnknownElement = document.getElementById("htmlUnknownElement"); //HTMLUnknownElement
+    var htmlParagraphElement = document.createElement("p"); //HTMLParagraphElement
+    var var00016 = window.getSelection();
+    var00016.selectAllChildren(templateElement);
+    document.all[51 % document.all.length].appendChild(htmlParagraphElement);
+    var var00036 = document.createElement("a");;
+    var var00039 = htmlLiElement.outerHTML;
+
+    var caretRange = document.caretRangeFromPoint();
+    caretRange.insertNode(templateElement);
+    var var00192 = var00016.extentNode;
+    var00016.selectAllChildren(var00192);
+    var00016.deleteFromDocument();
+    htmlLiElement.innerHTML = var00039;
+    document.all[82 % document.all.length].appendChild(htmlContentTag);
+    document.all[99 % document.all.length].appendChild(htmlUnknownElement);
+    document.all[36 % document.all.length].appendChild(var00036);
+    document.all[50 % document.all.length].appendChild(htmlAreaTag);
+}
+</script>
+<body onload=jsfuzzer()>
+  <hr>
+  <ul>
+    <li>
+      <dl>
+        <dd id="htmlDescriptionTag"><dt declare="declare"</dt>
+        <li id="htmlLiElement"></li>
+  </ul>
+  <var id="variableElement">
+    <image><ol></ol>
+  </var>
+  <template id="templateElement">
+  </template>
+  <input>
+  <content id="htmlContentTag"></content>
+  <map>
+    <area id="htmlAreaTag" role="group" </area>
+    <area id="htmlvar00017"</area>
+    <form id="htmlFormElement" onreset="eventhandler2()">
+      <fieldset>
+        <textarea></textarea>
+        <label></label>
+        <h4></h4>
+        <link></p>
+        <base id="htmlBaseTag">
+        <div></div>
+        <noscript></noscript>
+        <basefont id="htmlUnknownElement"></basefont>
+      </fieldset>
+    </form>
+  </map>
+</body>
diff --git a/third_party/blink/web_tests/external/WPT_BASE_MANIFEST_6.json b/third_party/blink/web_tests/external/WPT_BASE_MANIFEST_6.json
index ca55eff..7dc0cc7 100644
--- a/third_party/blink/web_tests/external/WPT_BASE_MANIFEST_6.json
+++ b/third_party/blink/web_tests/external/WPT_BASE_MANIFEST_6.json
@@ -32551,6 +32551,18 @@
      {}
     ]
    ],
+   "css/css-backgrounds/background-size-cover-003.html": [
+    [
+     "css/css-backgrounds/background-size-cover-003.html",
+     [
+      [
+       "/css/css-backgrounds/background-size-cover-003-ref.html",
+       "=="
+      ]
+     ],
+     {}
+    ]
+   ],
    "css/css-backgrounds/background-size-one-value-1x1-image.html": [
     [
      "css/css-backgrounds/background-size-one-value-1x1-image.html",
@@ -50933,6 +50945,18 @@
      {}
     ]
    ],
+   "css/css-grid/subgrid/auto-track-sizing-001.html": [
+    [
+     "css/css-grid/subgrid/auto-track-sizing-001.html",
+     [
+      [
+       "/css/css-grid/subgrid/auto-track-sizing-001-ref.html",
+       "=="
+      ]
+     ],
+     {}
+    ]
+   ],
    "css/css-images/css-image-fallbacks-and-annotations.html": [
     [
      "css/css-images/css-image-fallbacks-and-annotations.html",
@@ -52685,6 +52709,18 @@
      {}
     ]
    ],
+   "css/css-lists/list-type-none-style-image.html": [
+    [
+     "css/css-lists/list-type-none-style-image.html",
+     [
+      [
+       "/css/css-lists/list-type-none-style-image-ref.html",
+       "=="
+      ]
+     ],
+     {}
+    ]
+   ],
    "css/css-lists/list-with-image-display-changed-001.html": [
     [
      "css/css-lists/list-with-image-display-changed-001.html",
@@ -55145,6 +55181,18 @@
      {}
     ]
    ],
+   "css/css-multicol/multicol-breaking-004.html": [
+    [
+     "css/css-multicol/multicol-breaking-004.html",
+     [
+      [
+       "/css/css-multicol/multicol-breaking-004-ref.html",
+       "=="
+      ]
+     ],
+     {}
+    ]
+   ],
    "css/css-multicol/multicol-breaking-nobackground-000.html": [
     [
      "css/css-multicol/multicol-breaking-nobackground-000.html",
@@ -56537,6 +56585,30 @@
      {}
     ]
    ],
+   "css/css-multicol/multicol-span-all-children-height-002.html": [
+    [
+     "css/css-multicol/multicol-span-all-children-height-002.html",
+     [
+      [
+       "/css/css-multicol/multicol-span-all-children-height-002-ref.html",
+       "=="
+      ]
+     ],
+     {}
+    ]
+   ],
+   "css/css-multicol/multicol-span-all-children-height-003.html": [
+    [
+     "css/css-multicol/multicol-span-all-children-height-003.html",
+     [
+      [
+       "/css/css-multicol/multicol-span-all-children-height-003-ref.html",
+       "=="
+      ]
+     ],
+     {}
+    ]
+   ],
    "css/css-multicol/multicol-span-all-dynamic-add-001.html": [
     [
      "css/css-multicol/multicol-span-all-dynamic-add-001.html",
@@ -60257,6 +60329,18 @@
      {}
     ]
    ],
+   "css/css-pseudo/outside-marker-paint-order.html": [
+    [
+     "css/css-pseudo/outside-marker-paint-order.html",
+     [
+      [
+       "/css/css-pseudo/outside-marker-paint-order-ref.html",
+       "=="
+      ]
+     ],
+     {}
+    ]
+   ],
    "css/css-pseudo/placeholder-input-number.html": [
     [
      "css/css-pseudo/placeholder-input-number.html",
@@ -70917,174 +71001,6 @@
      {}
     ]
    ],
-   "css/css-text/white-space/pre-wrap-leading-spaces-001.html": [
-    [
-     "css/css-text/white-space/pre-wrap-leading-spaces-001.html",
-     [
-      [
-       "/css/css-text/white-space/reference/white-space-break-spaces-005-ref.html",
-       "=="
-      ]
-     ],
-     {}
-    ]
-   ],
-   "css/css-text/white-space/pre-wrap-leading-spaces-002.html": [
-    [
-     "css/css-text/white-space/pre-wrap-leading-spaces-002.html",
-     [
-      [
-       "/css/css-text/white-space/reference/white-space-break-spaces-005-ref.html",
-       "=="
-      ]
-     ],
-     {}
-    ]
-   ],
-   "css/css-text/white-space/pre-wrap-leading-spaces-003.html": [
-    [
-     "css/css-text/white-space/pre-wrap-leading-spaces-003.html",
-     [
-      [
-       "/css/css-text/white-space/reference/white-space-break-spaces-005-ref.html",
-       "=="
-      ]
-     ],
-     {}
-    ]
-   ],
-   "css/css-text/white-space/pre-wrap-leading-spaces-004.html": [
-    [
-     "css/css-text/white-space/pre-wrap-leading-spaces-004.html",
-     [
-      [
-       "/css/css-text/white-space/reference/white-space-break-spaces-005-ref.html",
-       "=="
-      ]
-     ],
-     {}
-    ]
-   ],
-   "css/css-text/white-space/pre-wrap-leading-spaces-005.html": [
-    [
-     "css/css-text/white-space/pre-wrap-leading-spaces-005.html",
-     [
-      [
-       "/css/css-text/white-space/reference/white-space-break-spaces-005-ref.html",
-       "=="
-      ]
-     ],
-     {}
-    ]
-   ],
-   "css/css-text/white-space/pre-wrap-leading-spaces-006.html": [
-    [
-     "css/css-text/white-space/pre-wrap-leading-spaces-006.html",
-     [
-      [
-       "/css/css-text/white-space/reference/white-space-break-spaces-005-ref.html",
-       "=="
-      ]
-     ],
-     {}
-    ]
-   ],
-   "css/css-text/white-space/pre-wrap-leading-spaces-007.html": [
-    [
-     "css/css-text/white-space/pre-wrap-leading-spaces-007.html",
-     [
-      [
-       "/css/css-text/white-space/reference/white-space-break-spaces-005-ref.html",
-       "=="
-      ]
-     ],
-     {}
-    ]
-   ],
-   "css/css-text/white-space/pre-wrap-leading-spaces-008.html": [
-    [
-     "css/css-text/white-space/pre-wrap-leading-spaces-008.html",
-     [
-      [
-       "/css/css-text/white-space/reference/white-space-break-spaces-005-ref.html",
-       "=="
-      ]
-     ],
-     {}
-    ]
-   ],
-   "css/css-text/white-space/pre-wrap-leading-spaces-009.html": [
-    [
-     "css/css-text/white-space/pre-wrap-leading-spaces-009.html",
-     [
-      [
-       "/css/css-text/white-space/reference/white-space-break-spaces-005-ref.html",
-       "=="
-      ]
-     ],
-     {}
-    ]
-   ],
-   "css/css-text/white-space/pre-wrap-leading-spaces-010.html": [
-    [
-     "css/css-text/white-space/pre-wrap-leading-spaces-010.html",
-     [
-      [
-       "/css/css-text/white-space/reference/white-space-break-spaces-005-ref.html",
-       "=="
-      ]
-     ],
-     {}
-    ]
-   ],
-   "css/css-text/white-space/pre-wrap-leading-spaces-011.html": [
-    [
-     "css/css-text/white-space/pre-wrap-leading-spaces-011.html",
-     [
-      [
-       "/css/css-text/white-space/reference/white-space-break-spaces-005-ref.html",
-       "=="
-      ]
-     ],
-     {}
-    ]
-   ],
-   "css/css-text/white-space/pre-wrap-leading-spaces-012.html": [
-    [
-     "css/css-text/white-space/pre-wrap-leading-spaces-012.html",
-     [
-      [
-       "/css/css-text/white-space/reference/white-space-break-spaces-005-ref.html",
-       "=="
-      ]
-     ],
-     {}
-    ]
-   ],
-   "css/css-text/white-space/pre-wrap-leading-spaces-013.html": [
-    [
-     "css/css-text/white-space/pre-wrap-leading-spaces-013.html",
-     [
-      [
-       "/css/css-text/white-space/reference/white-space-break-spaces-005-ref.html",
-       "=="
-      ]
-     ],
-     {}
-    ]
-   ],
-   "css/css-text/white-space/pre-wrap-leading-spaces-014.html": [
-    [
-     "css/css-text/white-space/pre-wrap-leading-spaces-014.html",
-     [
-      [
-       "/css/css-text/white-space/reference/white-space-break-spaces-005-ref.html",
-       "=="
-      ]
-     ],
-     {}
-    ]
-   ],
    "css/css-text/white-space/tab-stop-threshold-001.html": [
     [
      "css/css-text/white-space/tab-stop-threshold-001.html",
@@ -113975,6 +113891,18 @@
      {}
     ]
    ],
+   "html/the-xhtml-syntax/parsing-xhtml-documents/data-xhtml-with-dtd.html": [
+    [
+     "html/the-xhtml-syntax/parsing-xhtml-documents/data-xhtml-with-dtd.html",
+     [
+      [
+       "/html/the-xhtml-syntax/parsing-xhtml-documents/data-xhtml-with-dtd-ref.html",
+       "=="
+      ]
+     ],
+     {}
+    ]
+   ],
    "infrastructure/assumptions/ahem.html": [
     [
      "infrastructure/assumptions/ahem.html",
@@ -122018,6 +121946,9 @@
    "BackgroundSync/META.yml": [
     []
    ],
+   "BackgroundSync/service_workers/sw.js": [
+    []
+   ],
    "CONTRIBUTING.md": [
     []
    ],
@@ -129032,7 +128963,7 @@
    "css/css-backgrounds/background-repeat/support/rectangle-96x60.png": [
     []
    ],
-   "css/css-backgrounds/background-size-001-expected.txt": [
+   "css/css-backgrounds/background-size-cover-003-ref.html": [
     []
    ],
    "css/css-backgrounds/background-size/reference/background-size-contain.xht": [
@@ -136793,6 +136724,9 @@
    "css/css-grid/reference/grid-text-green-margin-no-collapse-ref.html": [
     []
    ],
+   "css/css-grid/subgrid/auto-track-sizing-001-ref.html": [
+    []
+   ],
    "css/css-grid/test-plan/index.html": [
     []
    ],
@@ -137144,6 +137078,9 @@
    "css/css-lists/list-marker-with-lineheight-and-overflow-hidden-001-ref.html": [
     []
    ],
+   "css/css-lists/list-type-none-style-image-ref.html": [
+    []
+   ],
    "css/css-lists/list-with-image-display-changed-001-ref.html": [
     []
    ],
@@ -137462,6 +137399,9 @@
    "css/css-multicol/multicol-breaking-003-ref.html": [
     []
    ],
+   "css/css-multicol/multicol-breaking-004-ref.html": [
+    []
+   ],
    "css/css-multicol/multicol-breaking-nobackground-000-ref.html": [
     []
    ],
@@ -137717,6 +137657,12 @@
    "css/css-multicol/multicol-span-all-children-height-001-ref.html": [
     []
    ],
+   "css/css-multicol/multicol-span-all-children-height-002-ref.html": [
+    []
+   ],
+   "css/css-multicol/multicol-span-all-children-height-003-ref.html": [
+    []
+   ],
    "css/css-multicol/multicol-span-all-dynamic-add-001-ref.html": [
     []
    ],
@@ -138506,6 +138452,9 @@
    "css/css-pseudo/marker-list-style-position-ref.html": [
     []
    ],
+   "css/css-pseudo/outside-marker-paint-order-ref.html": [
+    []
+   ],
    "css/css-pseudo/placeholder-input-number-notref.html": [
     []
    ],
@@ -152843,6 +152792,9 @@
    "html/cross-origin-opener/new_window_null.tentative-expected.txt": [
     []
    ],
+   "html/cross-origin-opener/new_window_null.tentative.html.ini": [
+    []
+   ],
    "html/cross-origin-opener/new_window_same_origin.tentative-expected.txt": [
     []
    ],
@@ -158525,6 +158477,9 @@
    "html/the-xhtml-syntax/parsing-xhtml-documents/adopt-while-parsing.xhtml": [
     []
    ],
+   "html/the-xhtml-syntax/parsing-xhtml-documents/data-xhtml-with-dtd-ref.html": [
+    []
+   ],
    "html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-support.htm": [
     []
    ],
@@ -159818,10 +159773,13 @@
    "kv-storage/META.yml": [
     []
    ],
-   "kv-storage/helpers/class-assert.js": [
+   "kv-storage/helpers/equality-asserters.js": [
     []
    ],
-   "kv-storage/helpers/equality-asserters.js": [
+   "kv-storage/helpers/expose-as-global.html": [
+    []
+   ],
+   "kv-storage/helpers/iter-assert.js": [
     []
    ],
    "kv-storage/helpers/kvs-tests.js": [
@@ -172160,6 +172118,9 @@
    "webaudio/the-audio-api/the-audioworklet-interface/processors/zero-output-processor.js": [
     []
    ],
+   "webaudio/the-audio-api/the-convolvernode-interface/active-processing.https-expected.txt": [
+    []
+   ],
    "webaudio/the-audio-api/the-delaynode-interface/delaynode-channel-count-1-expected.txt": [
     []
    ],
@@ -180507,6 +180468,23 @@
      }
     ]
    ],
+   "BackgroundSync/periodicsync.https.window.js": [
+    [
+     "BackgroundSync/periodicsync.https.window.html",
+     {
+      "script_metadata": [
+       [
+        "script",
+        "/common/get-host-info.sub.js"
+       ],
+       [
+        "script",
+        "/service-workers/service-worker/resources/test-helpers.sub.js"
+       ]
+      ]
+     }
+    ]
+   ],
    "FileAPI/FileReader/Progress_event_bubbles_cancelable.html": [
     [
      "FileAPI/FileReader/Progress_event_bubbles_cancelable.html",
@@ -183407,26 +183385,344 @@
      {}
     ]
    ],
-   "IndexedDB/nested-cloning-large-multiple.html": [
+   "IndexedDB/nested-cloning-large-multiple.any.js": [
     [
-     "IndexedDB/nested-cloning-large-multiple.html",
+     "IndexedDB/nested-cloning-large-multiple.any.html",
      {
+      "script_metadata": [
+       [
+        "title",
+        "IndexedDB: large nested objects are cloned correctly"
+       ],
+       [
+        "timeout",
+        "long"
+       ],
+       [
+        "script",
+        "support-promises.js"
+       ],
+       [
+        "script",
+        "nested-cloning-common.js"
+       ],
+       [
+        "global",
+        "window,dedicatedworker,sharedworker,serviceworker"
+       ]
+      ],
+      "timeout": "long"
+     }
+    ],
+    [
+     "IndexedDB/nested-cloning-large-multiple.any.serviceworker.html",
+     {
+      "script_metadata": [
+       [
+        "title",
+        "IndexedDB: large nested objects are cloned correctly"
+       ],
+       [
+        "timeout",
+        "long"
+       ],
+       [
+        "script",
+        "support-promises.js"
+       ],
+       [
+        "script",
+        "nested-cloning-common.js"
+       ],
+       [
+        "global",
+        "window,dedicatedworker,sharedworker,serviceworker"
+       ]
+      ],
+      "timeout": "long"
+     }
+    ],
+    [
+     "IndexedDB/nested-cloning-large-multiple.any.sharedworker.html",
+     {
+      "script_metadata": [
+       [
+        "title",
+        "IndexedDB: large nested objects are cloned correctly"
+       ],
+       [
+        "timeout",
+        "long"
+       ],
+       [
+        "script",
+        "support-promises.js"
+       ],
+       [
+        "script",
+        "nested-cloning-common.js"
+       ],
+       [
+        "global",
+        "window,dedicatedworker,sharedworker,serviceworker"
+       ]
+      ],
+      "timeout": "long"
+     }
+    ],
+    [
+     "IndexedDB/nested-cloning-large-multiple.any.worker.html",
+     {
+      "script_metadata": [
+       [
+        "title",
+        "IndexedDB: large nested objects are cloned correctly"
+       ],
+       [
+        "timeout",
+        "long"
+       ],
+       [
+        "script",
+        "support-promises.js"
+       ],
+       [
+        "script",
+        "nested-cloning-common.js"
+       ],
+       [
+        "global",
+        "window,dedicatedworker,sharedworker,serviceworker"
+       ]
+      ],
       "timeout": "long"
      }
     ]
    ],
-   "IndexedDB/nested-cloning-large.html": [
+   "IndexedDB/nested-cloning-large.any.js": [
     [
-     "IndexedDB/nested-cloning-large.html",
+     "IndexedDB/nested-cloning-large.any.html",
      {
+      "script_metadata": [
+       [
+        "title",
+        "IndexedDB: large nested objects are cloned correctly"
+       ],
+       [
+        "timeout",
+        "long"
+       ],
+       [
+        "script",
+        "support-promises.js"
+       ],
+       [
+        "script",
+        "nested-cloning-common.js"
+       ],
+       [
+        "global",
+        "window,dedicatedworker,sharedworker,serviceworker"
+       ]
+      ],
+      "timeout": "long"
+     }
+    ],
+    [
+     "IndexedDB/nested-cloning-large.any.serviceworker.html",
+     {
+      "script_metadata": [
+       [
+        "title",
+        "IndexedDB: large nested objects are cloned correctly"
+       ],
+       [
+        "timeout",
+        "long"
+       ],
+       [
+        "script",
+        "support-promises.js"
+       ],
+       [
+        "script",
+        "nested-cloning-common.js"
+       ],
+       [
+        "global",
+        "window,dedicatedworker,sharedworker,serviceworker"
+       ]
+      ],
+      "timeout": "long"
+     }
+    ],
+    [
+     "IndexedDB/nested-cloning-large.any.sharedworker.html",
+     {
+      "script_metadata": [
+       [
+        "title",
+        "IndexedDB: large nested objects are cloned correctly"
+       ],
+       [
+        "timeout",
+        "long"
+       ],
+       [
+        "script",
+        "support-promises.js"
+       ],
+       [
+        "script",
+        "nested-cloning-common.js"
+       ],
+       [
+        "global",
+        "window,dedicatedworker,sharedworker,serviceworker"
+       ]
+      ],
+      "timeout": "long"
+     }
+    ],
+    [
+     "IndexedDB/nested-cloning-large.any.worker.html",
+     {
+      "script_metadata": [
+       [
+        "title",
+        "IndexedDB: large nested objects are cloned correctly"
+       ],
+       [
+        "timeout",
+        "long"
+       ],
+       [
+        "script",
+        "support-promises.js"
+       ],
+       [
+        "script",
+        "nested-cloning-common.js"
+       ],
+       [
+        "global",
+        "window,dedicatedworker,sharedworker,serviceworker"
+       ]
+      ],
       "timeout": "long"
      }
     ]
    ],
-   "IndexedDB/nested-cloning-small.html": [
+   "IndexedDB/nested-cloning-small.any.js": [
     [
-     "IndexedDB/nested-cloning-small.html",
+     "IndexedDB/nested-cloning-small.any.html",
      {
+      "script_metadata": [
+       [
+        "title",
+        "IndexedDB: small nested objects are cloned correctly"
+       ],
+       [
+        "timeout",
+        "long"
+       ],
+       [
+        "script",
+        "support-promises.js"
+       ],
+       [
+        "script",
+        "nested-cloning-common.js"
+       ],
+       [
+        "global",
+        "window,dedicatedworker,sharedworker,serviceworker"
+       ]
+      ],
+      "timeout": "long"
+     }
+    ],
+    [
+     "IndexedDB/nested-cloning-small.any.serviceworker.html",
+     {
+      "script_metadata": [
+       [
+        "title",
+        "IndexedDB: small nested objects are cloned correctly"
+       ],
+       [
+        "timeout",
+        "long"
+       ],
+       [
+        "script",
+        "support-promises.js"
+       ],
+       [
+        "script",
+        "nested-cloning-common.js"
+       ],
+       [
+        "global",
+        "window,dedicatedworker,sharedworker,serviceworker"
+       ]
+      ],
+      "timeout": "long"
+     }
+    ],
+    [
+     "IndexedDB/nested-cloning-small.any.sharedworker.html",
+     {
+      "script_metadata": [
+       [
+        "title",
+        "IndexedDB: small nested objects are cloned correctly"
+       ],
+       [
+        "timeout",
+        "long"
+       ],
+       [
+        "script",
+        "support-promises.js"
+       ],
+       [
+        "script",
+        "nested-cloning-common.js"
+       ],
+       [
+        "global",
+        "window,dedicatedworker,sharedworker,serviceworker"
+       ]
+      ],
+      "timeout": "long"
+     }
+    ],
+    [
+     "IndexedDB/nested-cloning-small.any.worker.html",
+     {
+      "script_metadata": [
+       [
+        "title",
+        "IndexedDB: small nested objects are cloned correctly"
+       ],
+       [
+        "timeout",
+        "long"
+       ],
+       [
+        "script",
+        "support-promises.js"
+       ],
+       [
+        "script",
+        "nested-cloning-common.js"
+       ],
+       [
+        "global",
+        "window,dedicatedworker,sharedworker,serviceworker"
+       ]
+      ],
       "timeout": "long"
      }
     ]
@@ -197146,9 +197442,9 @@
      {}
     ]
    ],
-   "css/css-backgrounds/parsing/background-image-computed.html": [
+   "css/css-backgrounds/parsing/background-image-computed.sub.html": [
     [
-     "css/css-backgrounds/parsing/background-image-computed.html",
+     "css/css-backgrounds/parsing/background-image-computed.sub.html",
      {}
     ]
    ],
@@ -202882,6 +203178,12 @@
      {}
     ]
    ],
+   "css/css-scroll-anchoring/position-change-heuristic-ib-split.html": [
+    [
+     "css/css-scroll-anchoring/position-change-heuristic-ib-split.html",
+     {}
+    ]
+   ],
    "css/css-scroll-anchoring/position-change-heuristic.html": [
     [
      "css/css-scroll-anchoring/position-change-heuristic.html",
@@ -211232,6 +211534,12 @@
      {}
     ]
    ],
+   "css/cssom/getComputedStyle-line-height.html": [
+    [
+     "css/cssom/getComputedStyle-line-height.html",
+     {}
+    ]
+   ],
    "css/cssom/getComputedStyle-pseudo.html": [
     [
      "css/cssom/getComputedStyle-pseudo.html",
@@ -245519,12 +245827,6 @@
      {}
     ]
    ],
-   "kv-storage/api-surface.https.html": [
-    [
-     "kv-storage/api-surface.https.html",
-     {}
-    ]
-   ],
    "kv-storage/backingstore.https.html": [
     [
      "kv-storage/backingstore.https.html",
@@ -245547,6 +245849,12 @@
      }
     ]
    ],
+   "kv-storage/interface.https.html": [
+    [
+     "kv-storage/interface.https.html",
+     {}
+    ]
+   ],
    "kv-storage/key-types.https.html": [
     [
      "kv-storage/key-types.https.html",
@@ -250039,6 +250347,12 @@
      {}
     ]
    ],
+   "navigation-timing/secure_connection_start_non_zero.https.html": [
+    [
+     "navigation-timing/secure_connection_start_non_zero.https.html",
+     {}
+    ]
+   ],
    "navigation-timing/supported_navigation_type.window.js": [
     [
      "navigation-timing/supported_navigation_type.window.html",
@@ -261859,12 +262173,6 @@
      {}
     ]
    ],
-   "portals/portal-non-http-navigation.html": [
-    [
-     "portals/portal-non-http-navigation.html",
-     {}
-    ]
-   ],
    "portals/portal-onload-event.html": [
     [
      "portals/portal-onload-event.html",
@@ -288902,6 +289210,12 @@
      {}
     ]
    ],
+   "webaudio/the-audio-api/the-convolvernode-interface/active-processing.https.html": [
+    [
+     "webaudio/the-audio-api/the-convolvernode-interface/active-processing.https.html",
+     {}
+    ]
+   ],
    "webaudio/the-audio-api/the-convolvernode-interface/convolution-mono-mono.html": [
     [
      "webaudio/the-audio-api/the-convolvernode-interface/convolution-mono-mono.html",
@@ -290836,7 +291150,9 @@
    "webrtc/protocol/candidate-exchange.https.html": [
     [
      "webrtc/protocol/candidate-exchange.https.html",
-     {}
+     {
+      "timeout": "long"
+     }
     ]
    ],
    "webrtc/protocol/dtls-fingerprint-validation.html": [
@@ -312132,6 +312448,14 @@
    "989139e99041d6ec8dd64181de7a994e4b88112c",
    "testharness"
   ],
+  "BackgroundSync/periodicsync.https.window.js": [
+   "4c8d2eb5f4241e5ecdf6efd85a24056bf575d8b0",
+   "testharness"
+  ],
+  "BackgroundSync/service_workers/sw.js": [
+   "ea2bab28c5a286757da1169ad32762209edbdb6f",
+   "support"
+  ],
   "CONTRIBUTING.md": [
    "baa208e30f4eca8ca10c0e9cb6f89f2d0a726f2b",
    "support"
@@ -313812,16 +314136,16 @@
    "db5f710ceb5652ed8b9746f883948fac41262d6b",
    "support"
   ],
-  "IndexedDB/nested-cloning-large-multiple.html": [
-   "f263efbcf6d8f1601e623690ba0de799edce406b",
+  "IndexedDB/nested-cloning-large-multiple.any.js": [
+   "d64df916d801b106759fb0ca2e6547d5686fac8d",
    "testharness"
   ],
-  "IndexedDB/nested-cloning-large.html": [
-   "6e4f9be2ee6ce57605ad0248f37f794f6d8a70a2",
+  "IndexedDB/nested-cloning-large.any.js": [
+   "cadfeb04599d2c946037a8a726ea37357fb41172",
    "testharness"
   ],
-  "IndexedDB/nested-cloning-small.html": [
-   "558415f2342038eb079b4267fdcb0b133fbb9da8",
+  "IndexedDB/nested-cloning-small.any.js": [
+   "864752827a9afd1932f1e0978e1cff825af42fb4",
    "testharness"
   ],
   "IndexedDB/objectstore_keyorder.htm": [
@@ -337941,7 +338265,7 @@
    "support"
   ],
   "css/css-animations/KeyframeEffect-getKeyframes.tentative.html": [
-   "efb26e9502471983ef246eaafaaf7a49fd438c67",
+   "591cc15a7eda8279ec5e9af529f8e6a06b7caa6c",
    "testharness"
   ],
   "css/css-animations/KeyframeEffect-target.tentative.html": [
@@ -338845,7 +339169,7 @@
    "reftest"
   ],
   "css/css-backgrounds/background-image-first-line.html": [
-   "72e672f525d75f170364da388d228f5dcb634c0e",
+   "304fef40a896fad7af48bc71c4c921325e9695e4",
    "reftest"
   ],
   "css/css-backgrounds/background-image-large-with-auto.html": [
@@ -339028,12 +339352,8 @@
    "1179ba549969c494d61bc058925c9b81960c213d",
    "reftest"
   ],
-  "css/css-backgrounds/background-size-001-expected.txt": [
-   "efa4468085206340fe6ad418791a1a6b983a20dd",
-   "support"
-  ],
   "css/css-backgrounds/background-size-001.html": [
-   "3c9b9d5e55d320ed9a372fd43ed7723260288cf9",
+   "fee271de14a4664a0aff4f99b4511107b36beb77",
    "testharness"
   ],
   "css/css-backgrounds/background-size-002.html": [
@@ -339192,6 +339512,14 @@
    "6328af2ba20745f2926dc7e6778b61fef7255a46",
    "reftest"
   ],
+  "css/css-backgrounds/background-size-cover-003-ref.html": [
+   "bd965cfecff2647fdbccc1898c67d371c69cf9b7",
+   "support"
+  ],
+  "css/css-backgrounds/background-size-cover-003.html": [
+   "4d2b6b125eac077de87a9197731bd917781cbf7e",
+   "reftest"
+  ],
   "css/css-backgrounds/background-size-one-value-1x1-image.html": [
    "5caf2d49566331c496a71c6c6e00342a5522ea6f",
    "reftest"
@@ -341244,8 +341572,8 @@
    "cb7d10998e0f46c2553fe161cb215179c4bab4c7",
    "testharness"
   ],
-  "css/css-backgrounds/parsing/background-image-computed.html": [
-   "af14f6cf6e8e23de029f7079fe653144218b0ecf",
+  "css/css-backgrounds/parsing/background-image-computed.sub.html": [
+   "4dc0aad0fd5101f7dc7bc64c1bd0b77d2f872b4f",
    "testharness"
   ],
   "css/css-backgrounds/parsing/background-image-invalid.html": [
@@ -341541,7 +341869,7 @@
    "support"
   ],
   "css/css-backgrounds/reference/background-image-first-line-ref.html": [
-   "38c5772677da57967f58e48e38f7f40792bd0e24",
+   "3536cba54b5b34cd792299abdd8687a274bd8b0c",
    "support"
   ],
   "css/css-backgrounds/reference/background-image-large-with-auto-ref.html": [
@@ -359076,6 +359404,14 @@
    "9dcba3f28fab37112a5bcb873228b66b1c7eb42b",
    "support"
   ],
+  "css/css-grid/subgrid/auto-track-sizing-001-ref.html": [
+   "800f87e5d00a767f1cb5e5816ffd46110fbd4e80",
+   "support"
+  ],
+  "css/css-grid/subgrid/auto-track-sizing-001.html": [
+   "0fdb9b0b7e2ed8855b02dcfb9baceeb61b7d05d3",
+   "reftest"
+  ],
   "css/css-grid/test-plan/index.html": [
    "039f3a87c1a7d042af4ac043b1a5c4c4cb6c0d1e",
    "support"
@@ -360272,6 +360608,14 @@
    "4852e423273efe6ee99a832b141f943e7a3c4bca",
    "visual"
   ],
+  "css/css-lists/list-type-none-style-image-ref.html": [
+   "9e72fb310233145c5a6c014c3febb2975586d76d",
+   "support"
+  ],
+  "css/css-lists/list-type-none-style-image.html": [
+   "6b7b83afc38b2395f5725a64fc40053b6d0b6859",
+   "reftest"
+  ],
   "css/css-lists/list-with-image-display-changed-001-ref.html": [
    "bfe0eb60f8dfbc30311fdec49490f7ecf2dc0b1c",
    "support"
@@ -361852,6 +362196,14 @@
    "102202dd1da474ee9daaac4e350ca4dc89669878",
    "reftest"
   ],
+  "css/css-multicol/multicol-breaking-004-ref.html": [
+   "016885a9e640a7e1cbd5e59fc0886cfb63219d60",
+   "support"
+  ],
+  "css/css-multicol/multicol-breaking-004.html": [
+   "34b9f59137eca3a63caacb860e0b4a7487121e66",
+   "reftest"
+  ],
   "css/css-multicol/multicol-breaking-nobackground-000-ref.html": [
    "e7ebcff4a082e2455d303163ee7b86131331427f",
    "support"
@@ -362085,7 +362437,7 @@
    "reftest"
   ],
   "css/css-multicol/multicol-fill-auto-block-children-ref.xht": [
-   "16cb04ee3c2c3f0d6c080c316634627a7d08bc04",
+   "149292bf7113e4ba96536289108ce89eeda50339",
    "support"
   ],
   "css/css-multicol/multicol-fill-balance-001-ref.xht": [
@@ -362680,6 +363032,22 @@
    "55bdef427880b59bfd532eee6fce006d22c1cbb8",
    "reftest"
   ],
+  "css/css-multicol/multicol-span-all-children-height-002-ref.html": [
+   "ef4b7140bd2eddb70c95388e65f38eb1220fcfd2",
+   "support"
+  ],
+  "css/css-multicol/multicol-span-all-children-height-002.html": [
+   "ece797c786b2100bb2e60cfd61ba410b57d7638e",
+   "reftest"
+  ],
+  "css/css-multicol/multicol-span-all-children-height-003-ref.html": [
+   "2ba0e8c31a3803dba479c2f12d859151727a091a",
+   "support"
+  ],
+  "css/css-multicol/multicol-span-all-children-height-003.html": [
+   "1f2cbef4ab03b71872bd7b84927ca0681beb56a4",
+   "reftest"
+  ],
   "css/css-multicol/multicol-span-all-dynamic-add-001-ref.html": [
    "9f76ea15a0daa7753e76ad9b9a99948988c702d3",
    "support"
@@ -365580,6 +365948,14 @@
    "5b4391d4e7e43c330eb848ca29645b8c820c02de",
    "reftest"
   ],
+  "css/css-pseudo/outside-marker-paint-order-ref.html": [
+   "441a354732fc6690ea0d8af93dd33d57c8049374",
+   "support"
+  ],
+  "css/css-pseudo/outside-marker-paint-order.html": [
+   "94d0c42eca8cffbd5637a1039028925c19e1f851",
+   "reftest"
+  ],
   "css/css-pseudo/placeholder-input-number-notref.html": [
    "92ae71d83fcbea52e4120ed28af5438dd54d4509",
    "support"
@@ -366120,6 +366496,10 @@
    "62b9761552442572aa6665009ff8b8751f8fdf85",
    "testharness"
   ],
+  "css/css-scroll-anchoring/position-change-heuristic-ib-split.html": [
+   "e9033251128d28de58549810eeab6b26fb11bc08",
+   "testharness"
+  ],
   "css/css-scroll-anchoring/position-change-heuristic.html": [
    "b36b211f586782a7616c222fce04aa98817f35c4",
    "testharness"
@@ -375500,62 +375880,6 @@
    "af29b0505e0eefbab09b011798c0dd6136598cca",
    "reftest"
   ],
-  "css/css-text/white-space/pre-wrap-leading-spaces-001.html": [
-   "6d17921e17c28664533f3e091de9a8075770b544",
-   "reftest"
-  ],
-  "css/css-text/white-space/pre-wrap-leading-spaces-002.html": [
-   "082bce78c4ff56dd4b5af1c60a51c04a0df070c2",
-   "reftest"
-  ],
-  "css/css-text/white-space/pre-wrap-leading-spaces-003.html": [
-   "2bdef018e72250cd8672ea89fe16cb26971bad7a",
-   "reftest"
-  ],
-  "css/css-text/white-space/pre-wrap-leading-spaces-004.html": [
-   "ea409af2ab9da5c6a651f0c937bba5905bcd7b7e",
-   "reftest"
-  ],
-  "css/css-text/white-space/pre-wrap-leading-spaces-005.html": [
-   "ccf613051ffa661fc2ba60c563b5fba3d2b09f7d",
-   "reftest"
-  ],
-  "css/css-text/white-space/pre-wrap-leading-spaces-006.html": [
-   "cff928c2fd537b4f2db6ed282882c9a14f795452",
-   "reftest"
-  ],
-  "css/css-text/white-space/pre-wrap-leading-spaces-007.html": [
-   "ca27b98c2f68940287fc61d4f24709af196ced10",
-   "reftest"
-  ],
-  "css/css-text/white-space/pre-wrap-leading-spaces-008.html": [
-   "7331142c2ea0cf56441bd98504610b6ae3150f79",
-   "reftest"
-  ],
-  "css/css-text/white-space/pre-wrap-leading-spaces-009.html": [
-   "e2786419c1a56466fc3850fd371bdac45203fdf3",
-   "reftest"
-  ],
-  "css/css-text/white-space/pre-wrap-leading-spaces-010.html": [
-   "b1b14ea3afbabbce55996cdcc47a9995a4c5e418",
-   "reftest"
-  ],
-  "css/css-text/white-space/pre-wrap-leading-spaces-011.html": [
-   "6167e9ce4538f64baa0a81cd498838be3c759664",
-   "reftest"
-  ],
-  "css/css-text/white-space/pre-wrap-leading-spaces-012.html": [
-   "657cd89d89fbbee229ed481d71b73766ff76c0b0",
-   "reftest"
-  ],
-  "css/css-text/white-space/pre-wrap-leading-spaces-013.html": [
-   "476f76398daaaa962f09ad5e67f949b529bf8802",
-   "reftest"
-  ],
-  "css/css-text/white-space/pre-wrap-leading-spaces-014.html": [
-   "ab2759fdc7b094fa9f4012b557abc27fb6bf8ffd",
-   "reftest"
-  ],
   "css/css-text/white-space/reference/control-chars-000-ref.html": [
    "9d5fcb27147a8c53e410d08511cb5035b612f80c",
    "support"
@@ -395544,6 +395868,10 @@
    "6b23fabcb1407c00ab1d35bbae77f6501b17f73f",
    "testharness"
   ],
+  "css/cssom/getComputedStyle-line-height.html": [
+   "089a6d8485106714267da20e0bbc55860c9284a1",
+   "testharness"
+  ],
   "css/cssom/getComputedStyle-pseudo-expected.txt": [
    "c3d9eb999fea2497e14a2b951edc7596783a3b86",
    "support"
@@ -411073,7 +411401,7 @@
    "support"
   ],
   "feature-policy/reporting/payment-report-only.https-expected.txt": [
-   "19f3d28fba84148a0470a45d5d4feaa359badb3a",
+   "dc5e0c91070e2fe2572cda60f5e8add30ad2d5d6",
    "support"
   ],
   "feature-policy/reporting/payment-report-only.https.html": [
@@ -413001,7 +413329,7 @@
    "support"
   ],
   "fetch/sec-metadata/resources/helper.js": [
-   "1968cfc0dd8ed94047a9c436458ea1c568c15bf1",
+   "9425246881b1bdc7f4cace59e4e211d298316197",
    "support"
   ],
   "fetch/sec-metadata/resources/post-to-owner.py": [
@@ -413033,7 +413361,7 @@
    "testharness"
   ],
   "fetch/sec-metadata/serviceworker.tentative.https.sub.html": [
-   "c86198df6a2e31dc3c665fe5fe3f452bb47eeb26",
+   "43d7ab30525a845f34f0bd4e60aac59c39b62e7e",
    "testharness"
   ],
   "fetch/sec-metadata/sharedworker.tentative.https.sub.html": [
@@ -417352,6 +417680,10 @@
    "35a42fd2f0963f886324ac7ca01d5b45cdc1588e",
    "testharness"
   ],
+  "html/cross-origin-opener/new_window_null.tentative.html.ini": [
+   "f5b55a40f2ec1d2e7292f8289e32f256fa163154",
+   "support"
+  ],
   "html/cross-origin-opener/new_window_same_origin.tentative-expected.txt": [
    "89b66e08c1e2a6f5b6930eae9e2b6033b75a0419",
    "support"
@@ -423893,7 +424225,7 @@
    "support"
   ],
   "html/rendering/replaced-elements/the-select-element/select-1-line-height.html": [
-   "e6383f089ffa5550005f99257ecac7984dd09110",
+   "605a988e255c526f081fc24777b07dcc33c4413e",
    "reftest"
   ],
   "html/rendering/replaced-elements/the-select-element/select-empty-ref.html": [
@@ -432748,6 +433080,14 @@
    "2d85d21558b1778e17376d12424f81c703c0c262",
    "support"
   ],
+  "html/the-xhtml-syntax/parsing-xhtml-documents/data-xhtml-with-dtd-ref.html": [
+   "7e081a18050cf14a2dc62580ac8fbbda37e8da81",
+   "support"
+  ],
+  "html/the-xhtml-syntax/parsing-xhtml-documents/data-xhtml-with-dtd.html": [
+   "fd29905ea30ed987c8d634c7f6df2e9e5e517e96",
+   "reftest"
+  ],
   "html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-1.htm": [
    "4025e2a477fde1dbeb170e7248032e221efdb62f",
    "testharness"
@@ -436264,10 +436604,6 @@
    "bf4a1e6e8b44bc78cf7a624a12b254cbac2f25a5",
    "support"
   ],
-  "kv-storage/api-surface.https.html": [
-   "90e705862d599f2920ebdf5fa07cc3e4ba1f6d46",
-   "testharness"
-  ],
   "kv-storage/backingstore.https.html": [
    "44e634d85bbc34621450c4029a63c5e9114075b3",
    "testharness"
@@ -436277,31 +436613,39 @@
    "testharness"
   ],
   "kv-storage/entries.https.html": [
-   "397525de2499caa7912059ffa9a407ba7bb52c1f",
+   "07815920d5eec7235ceaa596558627991866715b",
    "testharness"
   ],
-  "kv-storage/helpers/class-assert.js": [
-   "89f0889c56d3a990a812be9208377090607335a2",
-   "support"
-  ],
   "kv-storage/helpers/equality-asserters.js": [
    "448ab31348cee50be8820185d8bdfb8f626eb9dc",
    "support"
   ],
+  "kv-storage/helpers/expose-as-global.html": [
+   "4ff3c6cf9c22fdfedfe7987d46eeba37bd666266",
+   "support"
+  ],
+  "kv-storage/helpers/iter-assert.js": [
+   "e1ac73c8e9abd0d6c55812523abcc590a638da9f",
+   "support"
+  ],
   "kv-storage/helpers/kvs-tests.js": [
    "0cf4c2fd3d5fcaa392e8cbbcf64101155bcbe441",
    "support"
   ],
+  "kv-storage/interface.https.html": [
+   "ab1930b25c355e2da15fc4d2a2fea8fa2042ffcc",
+   "testharness"
+  ],
   "kv-storage/key-types.https.html": [
    "edf3248fa609252df9a862f6ebc2b7b3755f0f09",
    "testharness"
   ],
   "kv-storage/keys-values-entries.https.html": [
-   "2a9cabef5f10b01d7ac04101c39490a3130bb27f",
+   "27ad3e4f1868d1d774b6ef2e505423aea9a0da37",
    "testharness"
   ],
   "kv-storage/keys.https.html": [
-   "19a397c4eeba41b2770d8187e60796faa5044bc4",
+   "3535d2fb93993af74d752c80626d5f10c0d24a60",
    "testharness"
   ],
   "kv-storage/non-secure-context-dynamic-import.html": [
@@ -436325,7 +436669,7 @@
    "testharness"
   ],
   "kv-storage/values.https.html": [
-   "d04ded37eaeec714ceb1b2604c1030fc88a33ffd",
+   "bbdc7aee84437ebd0e029556dd1d1fcb9670dc5d",
    "testharness"
   ],
   "largest-contentful-paint/observe-image.html": [
@@ -436373,7 +436717,7 @@
    "support"
   ],
   "lifecycle/resources/subframe.html": [
-   "b80ba9540a804bb326407935410d50c5fa2cfdbd",
+   "2f1d70a80a792401891d93f6ddebaea0876400b3",
    "support"
   ],
   "lifecycle/resources/subframe_worker.html": [
@@ -436405,7 +436749,7 @@
    "testharness"
   ],
   "lint.whitelist": [
-   "ee1e7b5da433cbe81646a03e5c917dad2d07eb56",
+   "9966d7c307b5520ab251d69f231526df762dc4ba",
    "support"
   ],
   "loading/preloader-css-import-no-quote.tentative.html": [
@@ -441292,6 +441636,10 @@
    "3efb52783f1e5dcb0d42aad11aec2a9e47257d33",
    "support"
   ],
+  "navigation-timing/secure_connection_start_non_zero.https.html": [
+   "e95468ef9122822bf8e443e356df0fd7cc8bd4cd",
+   "testharness"
+  ],
   "navigation-timing/supported_navigation_type.window.js": [
    "3239c7d29ffb11cbfebda12b4e5420bca0131094",
    "testharness"
@@ -448645,7 +448993,7 @@
    "testharness"
   ],
   "payment-method-basic-card/payment-request-canmakepayment-method.https-expected.txt": [
-   "d5d0936231b029f4b58598fab5dec8afe38b86a3",
+   "f5fe33501a1107d41e1a5cd831777f7755fb5d2f",
    "support"
   ],
   "payment-method-basic-card/payment-request-canmakepayment-method.https.html": [
@@ -448833,7 +449181,7 @@
    "manual"
   ],
   "payment-request/constructor_convert_method_data.https-expected.txt": [
-   "5f66fe453a86632ab9e6ace0e6e46d2b83eed7f7",
+   "6bc9e48038e19368adb7138a8f9732177b6f226e",
    "support"
   ],
   "payment-request/constructor_convert_method_data.https.html": [
@@ -448893,7 +449241,7 @@
    "testharness"
   ],
   "payment-request/payment-request-canmakepayment-method.https-expected.txt": [
-   "573abaeed6def48d4787ecbc50476a0fa4e39254",
+   "5b7ee0ea3db4c800b85e24e6f7bce3f300c4fb98",
    "support"
   ],
   "payment-request/payment-request-canmakepayment-method.https.html": [
@@ -448933,11 +449281,11 @@
    "testharness"
   ],
   "payment-request/payment-request-hasenrolledinstrument-method.https-expected.txt": [
-   "fe7f16769673e2d5b809417456fd1b0c1546d9cc",
+   "ad1d3ce1fbbd63a4ed8f306fb33bca7853b57427",
    "support"
   ],
   "payment-request/payment-request-hasenrolledinstrument-method.tentative.https-expected.txt": [
-   "fe7f16769673e2d5b809417456fd1b0c1546d9cc",
+   "ad1d3ce1fbbd63a4ed8f306fb33bca7853b57427",
    "support"
   ],
   "payment-request/payment-request-hasenrolledinstrument-method.tentative.https.html": [
@@ -448977,7 +449325,7 @@
    "testharness"
   ],
   "payment-request/payment-request-show-method.https-expected.txt": [
-   "bebd7e8e0a8cd3e613f923c972f74fe0f46a4f9b",
+   "b9ec0aea579037597a4270d3259e70c799dccd27",
    "support"
   ],
   "payment-request/payment-request-show-method.https.html": [
@@ -449780,10 +450128,6 @@
    "780e8b58af98cc910e3739e3a9a2e5567d5613d0",
    "testharness"
   ],
-  "portals/portal-non-http-navigation.html": [
-   "3b79df3c230e1128574d4a6eb81d407cd9303e2c",
-   "testharness"
-  ],
   "portals/portal-onload-event.html": [
    "c9f07fcc889043cd523206728f7daaaefa653409",
    "testharness"
@@ -465721,11 +466065,11 @@
    "testharness"
   ],
   "std-toast/methods.html": [
-   "7ce0e5adb810294fcc99c4c3bbf696c2fffd0f39",
+   "981b9fba4341e5798c7456e02da53e97bd1369f3",
    "testharness"
   ],
   "std-toast/options.html": [
-   "74470e35998b537304538b3fab96bf37a0702ecc",
+   "9cea97146bf2456fc62d1cab71652a5312a4ef9c",
    "testharness"
   ],
   "std-toast/resources/helpers.js": [
@@ -467973,7 +468317,7 @@
    "support"
   ],
   "svg/styling/required-properties.svg": [
-   "c257254d747fb0231d638ac431fcae97dbbed7e7",
+   "040c5b8158b0bef36dccb56e0328802b8f9dd23c",
    "testharness"
   ],
   "svg/svg-in-svg/svg-in-svg-circular-filter-reference-crash.html": [
@@ -468429,7 +468773,7 @@
    "support"
   ],
   "svg/types/scripted/SVGGeometryElement.isPointInStroke-01.svg": [
-   "377d4096c3a204a366d727cf51e60eda2cab95f3",
+   "5864c43545812240217b567eec75e12a8b38ed81",
    "testharness"
   ],
   "svg/types/scripted/SVGGraphicsElement-expected.txt": [
@@ -468449,7 +468793,7 @@
    "testharness"
   ],
   "svg/types/scripted/SVGLength-px.html": [
-   "a91e4e996a11d40aa619a30dafa5b844680d1a9c",
+   "65cf97ce518fb8b20d5601b4d6d62c15ea35c4bb",
    "testharness"
   ],
   "svg/types/scripted/SVGLength.html": [
@@ -469029,7 +469373,7 @@
    "support"
   ],
   "tools/requirements_mypy.txt": [
-   "742ebbbd7199f582045901cb875e1a79503a0fec",
+   "0e1568f1eee2390cd17daa87522c9e33dcc4e430",
    "support"
   ],
   "tools/runner/css/bootstrap-theme.min.css": [
@@ -475537,11 +475881,11 @@
    "testharness"
   ],
   "web-animations/animation-model/keyframe-effects/effect-value-iteration-composite-operation-expected.txt": [
-   "ebc51d9ea8c0cb7ed73a839f729f68cc05b26fa2",
+   "c58ee7c7725923f34f41db57057d18c1624959c6",
    "support"
   ],
   "web-animations/animation-model/keyframe-effects/effect-value-iteration-composite-operation.html": [
-   "142d49d265c40e5a06c1da452840a436da9e3887",
+   "abfda86f4d1fbc620efcf3c5ddc3148be057096d",
    "testharness"
   ],
   "web-animations/animation-model/keyframe-effects/effect-value-overlapping-keyframes.html": [
@@ -476996,6 +477340,14 @@
    "1e0d7255c556bec234ec57dd229f544e00c93749",
    "testharness"
   ],
+  "webaudio/the-audio-api/the-convolvernode-interface/active-processing.https-expected.txt": [
+   "c0aedb0223513f3e3173c5c7e351a93f3de97e79",
+   "support"
+  ],
+  "webaudio/the-audio-api/the-convolvernode-interface/active-processing.https.html": [
+   "0199ca43216816ce4cbd250fd9752adcab62e070",
+   "testharness"
+  ],
   "webaudio/the-audio-api/the-convolvernode-interface/convolution-mono-mono.html": [
    "570efebe220e94e68ffe3f067595e4cfe766a1b4",
    "testharness"
@@ -479169,7 +479521,7 @@
    "support"
   ],
   "webrtc/RTCPeerConnection-iceGatheringState.html": [
-   "e170e4a2f87fc4c3260a7acd323a98e1adfa3726",
+   "13990c5543540cd82b6a0e1e577eab0a08968511",
    "testharness"
   ],
   "webrtc/RTCPeerConnection-mandatory-getStats.https-expected.txt": [
@@ -479565,7 +479917,7 @@
    "support"
   ],
   "webrtc/protocol/candidate-exchange.https.html": [
-   "d1bc35819cee8e13485765e6f70836521dc5e7e7",
+   "b741de55eccd870e705324d3c75d2c06305e017a",
    "testharness"
   ],
   "webrtc/protocol/dtls-fingerprint-validation.html": [
@@ -484349,7 +484701,7 @@
    "testharness"
   ],
   "webxr/xrRay_constructor.https.html": [
-   "0e78cffea4697956951be7833c1a0b2ba6bcf24a",
+   "ebf88845b0cdd86ff44443f17e2540aa01b6c13c",
    "testharness"
   ],
   "webxr/xrRay_matrix.https.html": [
diff --git a/third_party/blink/web_tests/external/wpt/IndexedDB/nested-cloning-large-multiple.html b/third_party/blink/web_tests/external/wpt/IndexedDB/nested-cloning-large-multiple.any.js
similarity index 76%
rename from third_party/blink/web_tests/external/wpt/IndexedDB/nested-cloning-large-multiple.html
rename to third_party/blink/web_tests/external/wpt/IndexedDB/nested-cloning-large-multiple.any.js
index f263efbc..d64df91 100644
--- a/third_party/blink/web_tests/external/wpt/IndexedDB/nested-cloning-large-multiple.html
+++ b/third_party/blink/web_tests/external/wpt/IndexedDB/nested-cloning-large-multiple.any.js
@@ -1,14 +1,9 @@
-<!doctype html>
-<meta charset="utf8">
-<meta name="timeout" content="long">
-<title>IndexedDB: large nested objects are cloned correctly</title>
-<link rel="help" href="https://w3c.github.io/IndexedDB/#abort-transaction">
-<link rel="author" href="pwnall@chromium.org" title="Victor Costan">
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="support-promises.js"></script>
-<script src="nested-cloning-common.js"></script>
-<script>
+// META: title=IndexedDB: large nested objects are cloned correctly
+// META: timeout=long
+// META: script=support-promises.js
+// META: script=nested-cloning-common.js
+// META: global=window,dedicatedworker,sharedworker,serviceworker
+'use strict';
 
 cloningTestWithKeyGenerator(
     'multiple requests of objects with blobs and large typed arrays', [
@@ -50,5 +45,3 @@
     { type: 'blob', size: wrapThreshold, mimeType: 'text/x-blink20', seed: 20 },
   ],
 ]);
-
-</script>
diff --git a/third_party/blink/web_tests/external/wpt/IndexedDB/nested-cloning-large.html b/third_party/blink/web_tests/external/wpt/IndexedDB/nested-cloning-large.any.js
similarity index 71%
rename from third_party/blink/web_tests/external/wpt/IndexedDB/nested-cloning-large.html
rename to third_party/blink/web_tests/external/wpt/IndexedDB/nested-cloning-large.any.js
index 6e4f9be..cadfeb0 100644
--- a/third_party/blink/web_tests/external/wpt/IndexedDB/nested-cloning-large.html
+++ b/third_party/blink/web_tests/external/wpt/IndexedDB/nested-cloning-large.any.js
@@ -1,14 +1,9 @@
-<!doctype html>
-<meta charset="utf8">
-<meta name="timeout" content="long">
-<title>IndexedDB: large nested objects are cloned correctly</title>
-<link rel="help" href="https://w3c.github.io/IndexedDB/#abort-transaction">
-<link rel="author" href="pwnall@chromium.org" title="Victor Costan">
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="support-promises.js"></script>
-<script src="nested-cloning-common.js"></script>
-<script>
+// META: title=IndexedDB: large nested objects are cloned correctly
+// META: timeout=long
+// META: script=support-promises.js
+// META: script=nested-cloning-common.js
+// META: global=window,dedicatedworker,sharedworker,serviceworker
+'use strict';
 
 cloningTest('large typed array', [
   { type: 'buffer', size: wrapThreshold, seed: 1 },
@@ -45,5 +40,3 @@
              seed: 5 },
   },
 ]);
-
-</script>
diff --git a/third_party/blink/web_tests/external/wpt/IndexedDB/nested-cloning-small.html b/third_party/blink/web_tests/external/wpt/IndexedDB/nested-cloning-small.any.js
similarity index 68%
rename from third_party/blink/web_tests/external/wpt/IndexedDB/nested-cloning-small.html
rename to third_party/blink/web_tests/external/wpt/IndexedDB/nested-cloning-small.any.js
index 558415f..8647528 100644
--- a/third_party/blink/web_tests/external/wpt/IndexedDB/nested-cloning-small.html
+++ b/third_party/blink/web_tests/external/wpt/IndexedDB/nested-cloning-small.any.js
@@ -1,14 +1,9 @@
-<!doctype html>
-<meta charset="utf8">
-<meta name="timeout" content="long">
-<title>IndexedDB: small nested objects are cloned correctly</title>
-<link rel="help" href="https://w3c.github.io/IndexedDB/#abort-transaction">
-<link rel="author" href="pwnall@chromium.org" title="Victor Costan">
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="support-promises.js"></script>
-<script src="nested-cloning-common.js"></script>
-<script>
+// META: title=IndexedDB: small nested objects are cloned correctly
+// META: timeout=long
+// META: script=support-promises.js
+// META: script=nested-cloning-common.js
+// META: global=window,dedicatedworker,sharedworker,serviceworker
+'use strict';
 
 cloningTest('small typed array', [
   { type: 'buffer', size: 64, seed: 1 },
@@ -42,6 +37,4 @@
     { type: 'buffer', size: 64, seed: 4 },
     { type: 'blob', size: wrapThreshold, mimeType: 'text/x-blink-05', seed: 5 },
   ],
-]);
-
-</script>
+]);
\ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/css/css-animations/KeyframeEffect-getKeyframes.tentative.html b/third_party/blink/web_tests/external/wpt/css/css-animations/KeyframeEffect-getKeyframes.tentative.html
index efb26e9..591cc15 100644
--- a/third_party/blink/web_tests/external/wpt/css/css-animations/KeyframeEffect-getKeyframes.tentative.html
+++ b/third_party/blink/web_tests/external/wpt/css/css-animations/KeyframeEffect-getKeyframes.tentative.html
@@ -647,7 +647,7 @@
     { offset: 0, computedOffset: 0, easing: "ease", composite: "auto",
       backgroundSize: "auto" },
     { offset: 1, computedOffset: 1, easing: "ease", composite: "auto",
-      backgroundSize: "50% auto, 6px auto, contain" },
+      backgroundSize: "50%, 6px, contain" },
   ];
 
   for (let i = 0; i < frames.length; i++) {
@@ -657,7 +657,7 @@
   // Test inheriting a background-size value
 
   expected[0].backgroundSize = div.style.backgroundSize =
-    "30px auto, 40% auto, auto";
+    "30px, 40%, auto";
   frames = getKeyframes(div);
 
   for (let i = 0; i < frames.length; i++) {
diff --git a/third_party/blink/web_tests/external/wpt/css/css-backgrounds/background-image-first-line.html b/third_party/blink/web_tests/external/wpt/css/css-backgrounds/background-image-first-line.html
index 72e672f..304fef40 100644
--- a/third_party/blink/web_tests/external/wpt/css/css-backgrounds/background-image-first-line.html
+++ b/third_party/blink/web_tests/external/wpt/css/css-backgrounds/background-image-first-line.html
@@ -12,7 +12,7 @@
 <style type="text/css">
 #content {
   color: transparent;
-  font: 100px Ahem;
+  font: 100px/1 Ahem;
 }
 #content::first-line {
   background-image: url("support/cat.png");  /* 98 w. by 99px h. */
@@ -28,4 +28,4 @@
   requestAnimationFrame(() => requestAnimationFrame(takeScreenshot));
 };
 </script>
-</html>
\ No newline at end of file
+</html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-backgrounds/background-size-001-expected.txt b/third_party/blink/web_tests/external/wpt/css/css-backgrounds/background-size-001-expected.txt
deleted file mode 100644
index efa4468..0000000
--- a/third_party/blink/web_tests/external/wpt/css/css-backgrounds/background-size-001-expected.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-This is a testharness.js-based test.
-PASS background-size_initial
-PASS background-size_auto
-PASS background-size_cover
-PASS background-size_contain
-PASS background-size_length_zero
-PASS background-size_length_negative_zero
-PASS background-size_length_positive_zero
-PASS background-size_length_normal
-PASS background-size_percentage_min
-PASS background-size_percentage_normal
-PASS background-size_percentage_max
-PASS background-size_auto_auto
-PASS background-size_auto_length
-PASS background-size_auto_percentage
-FAIL background-size_length_auto assert_equals: background-size supporting value expected "15px auto" but got "15px"
-PASS background-size_length_length
-PASS background-size_length_percentage
-FAIL background-size_percentage_auto assert_equals: background-size supporting value expected "50% auto" but got "50%"
-PASS background-size_percentage_length
-PASS background-size_percentage_percentage
-Harness: the test ran to completion.
-
diff --git a/third_party/blink/web_tests/external/wpt/css/css-backgrounds/background-size-001.html b/third_party/blink/web_tests/external/wpt/css/css-backgrounds/background-size-001.html
index 3c9b9d5..fee271de 100644
--- a/third_party/blink/web_tests/external/wpt/css/css-backgrounds/background-size-001.html
+++ b/third_party/blink/web_tests/external/wpt/css/css-backgrounds/background-size-001.html
@@ -99,7 +99,7 @@
         document.getElementById("test").style.backgroundSize = "15px auto";
         test(function() {
             assert_equals(getComputedStyle(document.getElementById("test"), null).getPropertyValue("background-size"),
-                "15px auto", "background-size supporting value");
+                "15px", "background-size supporting value");
         }, "background-size_length_auto");
 
         document.getElementById("test").style.backgroundSize = "15px 15px";
@@ -117,7 +117,7 @@
         document.getElementById("test").style.backgroundSize = "50% auto";
         test(function() {
             assert_equals(getComputedStyle(document.getElementById("test"), null).getPropertyValue("background-size"),
-                "50% auto", "background-size supporting value");
+                "50%", "background-size supporting value");
         }, "background-size_percentage_auto");
 
         document.getElementById("test").style.backgroundSize = "50% 15px";
diff --git a/third_party/blink/web_tests/external/wpt/css/css-backgrounds/background-size-cover-003-ref.html b/third_party/blink/web_tests/external/wpt/css/css-backgrounds/background-size-cover-003-ref.html
new file mode 100644
index 0000000..bd965cf
--- /dev/null
+++ b/third_party/blink/web_tests/external/wpt/css/css-backgrounds/background-size-cover-003-ref.html
@@ -0,0 +1,21 @@
+<!doctype html>
+<title>CSS Test Reference</title>
+<style>
+body { margin: 0 }
+.first {
+  width: 100px;
+  height: 50px;
+  background: lime;
+}
+.space {
+  height: 50px;
+}
+.second {
+  width: 100px;
+  height: 100px;
+  background: lime;
+}
+</style>
+<div class="first"></div>
+<div class="space"></div>
+<div class="second"></div>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-backgrounds/background-size-cover-003.html b/third_party/blink/web_tests/external/wpt/css/css-backgrounds/background-size-cover-003.html
new file mode 100644
index 0000000..4d2b6b12
--- /dev/null
+++ b/third_party/blink/web_tests/external/wpt/css/css-backgrounds/background-size-cover-003.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<title>CSS Test: background-size: cover with zero-sized background positioning area.</title>
+<link rel="help" href="https://drafts.csswg.org/css-backgrounds/#valdef-background-size-cover">
+<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/4049">
+<link rel="help" href=" https://bugzilla.mozilla.org/show_bug.cgi?id=1559094">
+<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez">
+<link rel="author" href="https://mozilla.org" title="Mozilla">
+<link rel="match" href="background-size-cover-003-ref.html">
+<style>
+body { margin: 0 }
+div {
+  background-size: cover;
+  background-repeat: no-repeat;
+  background-position: top left;
+  background-origin: content-box;
+  background-image: url(/images/green-100x50.png);
+}
+#test1 {
+  height: 0;
+  width: 100px;
+  padding-bottom: 100px;
+}
+
+#test2 {
+  height: 100px;
+  width: 0;
+  padding-right: 100px;
+}
+#test3 {
+  height: 0;
+  width: 0;
+  padding-right: 100px;
+  padding-bottom: 100px;
+}
+</style>
+<div id="test1"></div>
+<div id="test2"></div>
+<div id="test3"></div>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-backgrounds/parsing/background-image-computed.html b/third_party/blink/web_tests/external/wpt/css/css-backgrounds/parsing/background-image-computed.sub.html
similarity index 78%
rename from third_party/blink/web_tests/external/wpt/css/css-backgrounds/parsing/background-image-computed.html
rename to third_party/blink/web_tests/external/wpt/css/css-backgrounds/parsing/background-image-computed.sub.html
index af14f6c..4dc0aad 100644
--- a/third_party/blink/web_tests/external/wpt/css/css-backgrounds/parsing/background-image-computed.html
+++ b/third_party/blink/web_tests/external/wpt/css/css-backgrounds/parsing/background-image-computed.sub.html
@@ -14,8 +14,8 @@
 <script>
 test_computed_value("background-image", "none");
 
-test_computed_value("background-image", 'url("http://www.example.com/")');
-test_computed_value("background-image", 'none, url("http://www.example.com/")');
+test_computed_value("background-image", 'url("http://{{host}}/")');
+test_computed_value("background-image", 'none, url("http://{{host}}/")');
 </script>
 </body>
 </html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-backgrounds/reference/background-image-first-line-ref.html b/third_party/blink/web_tests/external/wpt/css/css-backgrounds/reference/background-image-first-line-ref.html
index 38c57726..3536cba 100644
--- a/third_party/blink/web_tests/external/wpt/css/css-backgrounds/reference/background-image-first-line-ref.html
+++ b/third_party/blink/web_tests/external/wpt/css/css-backgrounds/reference/background-image-first-line-ref.html
@@ -4,7 +4,7 @@
 <style type="text/css">
 #content {
   color: transparent;
-  font: 100px Ahem;
+  font: 100px/1 Ahem;
   background-image: url("../support/cat.png");  /* 98 w. by 99px h. */
   background-repeat: no-repeat;
 }
diff --git a/third_party/blink/web_tests/external/wpt/css/css-grid/subgrid/auto-track-sizing-001-ref.html b/third_party/blink/web_tests/external/wpt/css/css-grid/subgrid/auto-track-sizing-001-ref.html
new file mode 100644
index 0000000..800f87e
--- /dev/null
+++ b/third_party/blink/web_tests/external/wpt/css/css-grid/subgrid/auto-track-sizing-001-ref.html
@@ -0,0 +1,65 @@
+<!DOCTYPE HTML>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html><head>
+  <meta charset="utf-8">
+  <title>Reference: subgrid auto track sizing</title>
+  <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1558705">
+  <style>
+html,body {
+  color:black; background-color:white; font:16px/1 monospace; padding:0; margin:0;
+}
+
+.grid {
+  display: grid;
+  max-width: 260px;
+  padding: 1px 5px;
+  border: 1px solid;
+}
+.subgrid {
+  display: grid;
+  padding: 3px 5px 7px 11px;
+  border-style: solid;
+  border-width: 5px 7px 11px 3px;
+  margin: 7px 11px 3px 5px;
+  background: grey;
+}
+
+  </style>
+</head>
+<body>
+
+<article class="grid">
+  <div class="subgrid">
+    The cat can not be separated from milk
+  </div>
+</article>
+
+<article class="grid" style="grid-template-columns: 100px auto">
+  <div class="subgrid">
+    The cat can not be separated from milk
+  </div>
+</article>
+
+<article class="grid" style="grid-template-columns: auto 100px">
+  <div class="subgrid" style="grid-column:2">
+    The cat can not be separated from milk
+  </div>
+</article>
+
+<article class="grid" style="grid-template-columns: auto 100px auto">
+  <div class="subgrid" style="grid-column:2 span 2">
+    The cat can not be separated from milk
+  </div>
+</article>
+
+<article class="grid" style="grid-template-columns: auto 100px auto">
+  <div class="subgrid" style="grid-column:1 span 3">
+    The cat can not be separated from milk
+  </div>
+</article>
+
+</body>
+</html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-grid/subgrid/auto-track-sizing-001.html b/third_party/blink/web_tests/external/wpt/css/css-grid/subgrid/auto-track-sizing-001.html
new file mode 100644
index 0000000..0fdb9b0
--- /dev/null
+++ b/third_party/blink/web_tests/external/wpt/css/css-grid/subgrid/auto-track-sizing-001.html
@@ -0,0 +1,68 @@
+<!DOCTYPE HTML>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html><head>
+  <meta charset="utf-8">
+  <title>Test: subgrid auto track sizing</title>
+  <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1558705">
+  <link rel="help" href="https://drafts.csswg.org/css-grid-2">
+  <link rel="match" href="auto-track-sizing-001-ref.html">
+  <style>
+html,body {
+  color:black; background-color:white; font:16px/1 monospace; padding:0; margin:0;
+}
+
+.grid {
+  display: grid;
+  max-width: 260px;
+  padding: 1px 5px;
+  border: 1px solid;
+}
+.subgrid {
+  display: grid;
+  grid-template-rows: subgrid;
+  padding: 3px 5px 7px 11px;
+  border-style: solid;
+  border-width: 5px 7px 11px 3px;
+  margin: 7px 11px 3px 5px;
+  background: grey;
+}
+
+  </style>
+</head>
+<body>
+
+<article class="grid">
+  <div class="subgrid">
+    The cat can not be separated from milk
+  </div>
+</article>
+
+<article class="grid" style="grid-template-columns: 100px auto">
+  <div class="subgrid">
+    The cat can not be separated from milk
+  </div>
+</article>
+
+<article class="grid" style="grid-template-columns: auto 100px">
+  <div class="subgrid" style="grid-column:2">
+    The cat can not be separated from milk
+  </div>
+</article>
+
+<article class="grid" style="grid-template-columns: auto 100px auto">
+  <div class="subgrid" style="grid-column:2 span 2">
+    The cat can not be separated from milk
+  </div>
+</article>
+
+<article class="grid" style="grid-template-columns: auto 100px auto">
+  <div class="subgrid" style="grid-column:1 span 3">
+    The cat can not be separated from milk
+  </div>
+</article>
+
+</body>
+</html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-multicol/multicol-breaking-004-ref.html b/third_party/blink/web_tests/external/wpt/css/css-multicol/multicol-breaking-004-ref.html
new file mode 100644
index 0000000..016885a9
--- /dev/null
+++ b/third_party/blink/web_tests/external/wpt/css/css-multicol/multicol-breaking-004-ref.html
@@ -0,0 +1,94 @@
+<!DOCTYPE HTML>
+<title>CSS Test Reference: breaking of a multicolumn</title>
+<meta charset="utf-8">
+<link rel="author" title="L. David Baron" href="https://dbaron.org/">
+<link rel="author" title="Ting-Yu Lin" href="tlin@mozilla.com">
+<link rel="author" title="Mozilla" href="https://mozilla.org/">
+<style>
+
+.outer {
+  height: 125px;
+  width: 800px;
+  background: rgba(0, 0, 255, 0.3);
+  position: relative;
+}
+
+.blueborders {
+  position: absolute;
+  top: 0;
+  left: 194px; /* 188px first column + (16px gap - 4px rule) / 2 */
+  width: 200px; /* 188px second column + (16px gap - 4px rule) */
+  height: 125px;
+  border-right: blue solid 4px;
+  border-left: blue solid 4px;
+}
+
+.innerbg {
+  height: 125px;
+  width: 188px;
+  background: rgba(255, 0, 255, 0.3);
+  position: absolute;
+  top: 0;
+}
+
+.inner {
+  height: 100px;
+  width: 86px;
+  font: 16px/1.25 sans-serif;
+  position: absolute;
+  top: 0;
+}
+
+.border-bottom {
+  height: 25px;
+  width: 188px;
+  background: green;
+  position: absolute;
+  top: 100px;
+}
+
+.lefthalf {
+  border-right: 2px solid fuchsia;
+  padding-right: 7px;
+}
+
+.righthalf {
+  padding-left: 7px;
+}
+
+</style>
+
+<div class="outer">
+  <div class="blueborders"></div>
+  <div class="innerbg" style="left: 0"></div>
+  <div class="inner lefthalf" style="left: 0">
+    AAAAA<br>
+    BBBBB<br>
+    CCCCC<br>
+    DDDDD<br>
+    EEEEE
+  </div>
+  <div class="inner righthalf" style="left: 95px">
+    FFFFF<br>
+    GGGGG<br>
+    HHHHH<br>
+    IIIII<br>
+    JJJJJ
+  </div>
+  <div class="border-bottom" style="left: 0"></div>
+  <div class="innerbg" style="left: 204px"></div>
+  <div class="inner lefthalf" style="left: 204px; height: 80px">
+    KKKKK<br>
+    LLLLL<br>
+    MMMMM<br>
+    NNNNN
+  </div>
+  <div class="border-bottom" style="left: 204px;"></div>
+  <div class="inner righthalf" style="left: 299px">
+    OOOOO<br>
+    PPPPP<br>
+    QQQQQ<br>
+  </div>
+  <div class="innerbg" style="left: 408px"></div>
+  <div class="border-bottom" style="left: 408px"></div>
+</div>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-multicol/multicol-breaking-004.html b/third_party/blink/web_tests/external/wpt/css/css-multicol/multicol-breaking-004.html
new file mode 100644
index 0000000..34b9f59
--- /dev/null
+++ b/third_party/blink/web_tests/external/wpt/css/css-multicol/multicol-breaking-004.html
@@ -0,0 +1,56 @@
+<!DOCTYPE HTML>
+<title>CSS Test: breaking of a multicolumn</title>
+<meta charset="utf-8">
+<link rel="author" title="L. David Baron" href="https://dbaron.org/">
+<link rel="author" title="Ting-Yu Lin" href="tlin@mozilla.com">
+<link rel="author" title="Mozilla" href="https://mozilla.org/">
+<link rel="help" href="https://drafts.csswg.org/css-multicol/#column-gaps-and-rules">
+<link rel="help" href="https://drafts.csswg.org/css-multicol/#cf">
+<link rel="help" href="https://drafts.csswg.org/css-break/#break-decoration">
+<link rel="match" href="multicol-breaking-004-ref.html">
+<style>
+
+.outer {
+  height: 125px;
+  column-fill: auto;
+  width: 800px;
+  column-count: 4;
+  column-rule: 4px solid blue;
+  column-gap: 16px;
+  background: rgba(0, 0, 255, 0.3);
+}
+
+.inner {
+  column-count: 2;
+  column-rule: 2px solid fuchsia;
+  column-gap: 16px;
+  background: rgba(255, 0, 255, 0.3);
+  font: 16px/1.25 sans-serif;
+  border: solid green;
+  border-width: 0 0 25px 0;
+  box-decoration-break: clone;
+}
+
+</style>
+
+<div class="outer">
+  <div class="inner" style="height: 300px">
+    AAAAA<br>
+    BBBBB<br>
+    CCCCC<br>
+    DDDDD<br>
+    EEEEE<br>
+    FFFFF<br>
+    GGGGG<br>
+    HHHHH<br>
+    IIIII<br>
+    JJJJJ<br>
+    KKKKK<br>
+    LLLLL<br>
+    MMMMM<br>
+    NNNNN<br>
+    OOOOO<br>
+    PPPPP<br>
+    QQQQQ
+  </div>
+</div>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-multicol/multicol-fill-auto-block-children-ref.xht b/third_party/blink/web_tests/external/wpt/css/css-multicol/multicol-fill-auto-block-children-ref.xht
index 16cb04e..149292b 100644
--- a/third_party/blink/web_tests/external/wpt/css/css-multicol/multicol-fill-auto-block-children-ref.xht
+++ b/third_party/blink/web_tests/external/wpt/css/css-multicol/multicol-fill-auto-block-children-ref.xht
@@ -16,7 +16,7 @@
 h1 {
 	font-size: 2em;
 	margin: 0;
-	padding-top: 0.66em;
+	padding-top: 0.67em;
 }
 ]]></style>
 </head>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-multicol/multicol-span-all-children-height-002-ref.html b/third_party/blink/web_tests/external/wpt/css/css-multicol/multicol-span-all-children-height-002-ref.html
new file mode 100644
index 0000000..ef4b714
--- /dev/null
+++ b/third_party/blink/web_tests/external/wpt/css/css-multicol/multicol-span-all-children-height-002-ref.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<html>
+  <meta charset="utf-8">
+  <title>CSS Multi-column Layout Test Reference: Test a multi-column container with percentage height children</title>
+  <link rel="author" title="Ting-Yu Lin" href="tlin@mozilla.com">
+  <link rel="author" title="Mozilla" href="http://www.mozilla.org/">
+
+  <style>
+  article {
+    width: 400px;
+    height: 200px;
+    background-color: lightgreen;
+    border: 5px solid purple;
+  }
+  div.columns {
+    column-count: 2;
+  }
+  div.block1 {
+    background-color: yellow;
+    height: 200px;
+  }
+  div.spanner {
+    height: 50px;
+    background-color: lightblue;
+  }
+  div.block2 {
+    background-color: yellow;
+    height: 200px;
+  }
+  </style>
+
+  <article>
+    <div class="columns" style="height: 100px;">
+      <div class="block1">block1</div>
+    </div>
+    <div class="spanner">spanner</div>
+    <div class="columns" style="height: 50px;">
+      <div class="block2">block2</div>
+    </div>
+  </article>
+</html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-multicol/multicol-span-all-children-height-002.html b/third_party/blink/web_tests/external/wpt/css/css-multicol/multicol-span-all-children-height-002.html
new file mode 100644
index 0000000..ece797c
--- /dev/null
+++ b/third_party/blink/web_tests/external/wpt/css/css-multicol/multicol-span-all-children-height-002.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<html>
+  <meta charset="utf-8">
+  <title>CSS Multi-column Layout Test: Test a multi-column container with percentage height children</title>
+  <link rel="author" title="Ting-Yu Lin" href="tlin@mozilla.com">
+  <link rel="author" title="Mozilla" href="http://www.mozilla.org/">
+  <link rel="help" href="https://drafts.csswg.org/css-multicol-1/#column-span">
+  <link rel="match" href="multicol-span-all-children-height-002-ref.html">
+  <meta name="assert" content="This test checks the percentage height children under multicol container compute the percentage relative to the entire multicol, not just the part after the column-span.">
+
+  <style>
+  article {
+    column-count: 2;
+    width: 400px;
+    height: 200px;
+    background-color: lightgreen;
+    border: 5px solid purple;
+  }
+  div.block1 {
+    background-color: yellow;
+    height: 100%; /* Spread evenly into two columns, each 100px. */
+  }
+  div.spanner {
+    column-span: all;
+    height: 25%;
+    background-color: lightblue;
+  }
+  div.block2 {
+    background-color: yellow;
+    /* Column container has only 25% height left, so two extra overflow columns
+       are created. Total 4 columns, each 50px. */
+    height: 100%;
+  }
+  </style>
+
+  <article>
+    <div class="block1">block1</div>
+    <div class="spanner">spanner</div>
+    <div class="block2">block2</div>
+  </article>
+</html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-multicol/multicol-span-all-children-height-003-ref.html b/third_party/blink/web_tests/external/wpt/css/css-multicol/multicol-span-all-children-height-003-ref.html
new file mode 100644
index 0000000..2ba0e8c31
--- /dev/null
+++ b/third_party/blink/web_tests/external/wpt/css/css-multicol/multicol-span-all-children-height-003-ref.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<html>
+  <meta charset="utf-8">
+  <title>CSS Multi-column Layout Test Reference: Test a multi-column container with percentage height children</title>
+  <link rel="author" title="Ting-Yu Lin" href="tlin@mozilla.com">
+  <link rel="author" title="Mozilla" href="http://www.mozilla.org/">
+
+  <style>
+  article {
+    width: 400px;
+    height: 200px;
+    background-color: lightgreen;
+    border: 5px solid purple;
+  }
+  div.columns {
+    column-count: 2;
+  }
+  div.block1 {
+    background-color: yellow;
+    height: 600px;
+  }
+  div.spanner {
+    height: 50px;
+    background-color: lightblue;
+  }
+  div.block2 {
+    background-color: yellow;
+    height: 200px;
+  }
+  </style>
+
+  <article>
+    <div class="columns" style="height: 200px;">
+      <div class="block1">block1</div>
+    </div>
+    <div class="spanner">spanner</div>
+    <div class="columns" style="height: 1px;">
+      <div class="block2">block2</div>
+    </div>
+  </article>
+</html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-multicol/multicol-span-all-children-height-003.html b/third_party/blink/web_tests/external/wpt/css/css-multicol/multicol-span-all-children-height-003.html
new file mode 100644
index 0000000..1f2cbef4
--- /dev/null
+++ b/third_party/blink/web_tests/external/wpt/css/css-multicol/multicol-span-all-children-height-003.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<html>
+  <meta charset="utf-8">
+  <title>CSS Multi-column Layout Test: Test a multi-column container with percentage height children</title>
+  <link rel="author" title="Ting-Yu Lin" href="tlin@mozilla.com">
+  <link rel="author" title="Mozilla" href="http://www.mozilla.org/">
+  <link rel="help" href="https://drafts.csswg.org/css-multicol-1/#column-span">
+  <link rel="help" href="https://drafts.csswg.org/css-break/#breaking-rules">
+  <link rel="match" href="multicol-span-all-children-height-003-ref.html">
+  <meta name="assert" content="This test checks the percentage height children under multicol container compute the percentage relative to the entire multicol, not just the part after the column-span.">
+
+  <style>
+  article {
+    column-count: 2;
+    width: 400px;
+    height: 200px;
+    background-color: lightgreen;
+    border: 5px solid purple;
+  }
+  div.block1 {
+    background-color: yellow;
+    /* This overflows the column container, so one extra column is created. */
+    height: 300%;
+  }
+  div.spanner {
+    column-span: all;
+    height: 25%;
+    background-color: lightblue;
+  }
+  div.block2 {
+    background-color: yellow;
+    /* No height left for this block. According to the breaking rules, the
+       column container creates 1px column boxes for it. */
+    height: 100%;
+  }
+  </style>
+
+  <article>
+    <div class="block1">block1</div>
+    <div class="spanner">spanner</div>
+    <div class="block2">block2</div>
+  </article>
+</html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-pseudo/outside-marker-paint-order-ref.html b/third_party/blink/web_tests/external/wpt/css/css-pseudo/outside-marker-paint-order-ref.html
new file mode 100644
index 0000000..441a354
--- /dev/null
+++ b/third_party/blink/web_tests/external/wpt/css/css-pseudo/outside-marker-paint-order-ref.html
@@ -0,0 +1,32 @@
+<!DOCTYPE HTML>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html><head>
+  <meta charset="utf-8">
+  <title>CSS Pseduo: painting order of outside ::marker box</title>
+  <link rel="author" title="Mats Palmgren" href="mailto:mats@mozilla.org">
+  <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
+  <style>
+li {
+  list-style-type: none;
+  margin-left: 100px;
+  text-indent: -100px;
+  font: 20px/1 Ahem;
+}
+
+x { color: grey; }
+
+  </style>
+</head>
+<body>
+
+<pre>There should be no red areas.<pre>
+<ol><li><x>XXXXXXXX</x></ol>
+<ol><li><x>XXXXXXXX</x></ol>
+<ol><li><x>XXXXXXXX</x></ol>
+<ol><li><x>XXXXXXXX</x></ol>
+
+</body>
+</html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-pseudo/outside-marker-paint-order.html b/third_party/blink/web_tests/external/wpt/css/css-pseudo/outside-marker-paint-order.html
new file mode 100644
index 0000000..94d0c42
--- /dev/null
+++ b/third_party/blink/web_tests/external/wpt/css/css-pseudo/outside-marker-paint-order.html
@@ -0,0 +1,36 @@
+<!DOCTYPE HTML>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html><head>
+  <meta charset="utf-8">
+  <title>CSS Pseduo: painting order of outside ::marker box</title>
+  <link rel="author" title="Mats Palmgren" href="mailto:mats@mozilla.org">
+  <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
+  <link rel="help" href="https://drafts.csswg.org/css-pseudo-4/#marker-pseudo">
+  <link rel="match" href="outside-marker-paint-order-ref.html">
+  <style>
+li {
+  margin-left: 100px;
+  text-indent: -100px;
+  font: 20px/1 Ahem;
+  color: red;
+}
+
+x { color: grey; }
+.before::before { content: "XXXXXXXX"; color: grey; }
+.after::after { content: "XXXXXXXX"; color: grey; }
+.both::before,.both::after  {content: "XXXX"; color: grey; }
+  </style>
+</head>
+<body>
+
+<pre>There should be no red areas.<pre>
+<ol><li><x>XXXXXXXX</x></ol>
+<ol><li class="before"></ol>
+<ol><li class="after"></ol>
+<ol><li class="both"></ol>
+
+</body>
+</html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-scroll-anchoring/position-change-heuristic-ib-split.html b/third_party/blink/web_tests/external/wpt/css/css-scroll-anchoring/position-change-heuristic-ib-split.html
new file mode 100644
index 0000000..e903325
--- /dev/null
+++ b/third_party/blink/web_tests/external/wpt/css/css-scroll-anchoring/position-change-heuristic-ib-split.html
@@ -0,0 +1,57 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
+<link rel="author" title="Mozilla" href="https://mozilla.org">
+<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1559627">
+<link rel="help" href="https://drafts.csswg.org/css-scroll-anchoring/#suppression-triggers">
+<style>
+  body, h1 {
+    margin: 0
+  }
+  .sticky {
+    width: 100%;
+    top: 0;
+    left: 0;
+  }
+  .sticky > div {
+    width: 100%;
+    height: 50px;
+    background: darkblue;
+  }
+  header {
+    background: lightblue;
+  }
+  main {
+    background: lightgrey;
+    height: 200vh;
+  }
+</style>
+<header>
+  <h1>Some title</h1>
+  <span class="sticky"><div>Sticky header</div></span>
+</header>
+<main>
+  Some actual content.
+</main>
+<script>
+const sticky = document.querySelector(".sticky");
+const nonStickyOffset = sticky.firstElementChild.offsetTop;
+const t = async_test("Scroll offset adjustments are correctly suppressed when changing the position of an inline");
+let firstEvent = true;
+window.onscroll = t.step_func(function() {
+  sticky.style.position =
+    document.documentElement.scrollTop > nonStickyOffset ?  "fixed" : "static";
+  if (firstEvent) {
+    firstEvent = false;
+    requestAnimationFrame(t.step_func(function() {
+      requestAnimationFrame(t.step_func_done(function() {
+        assert_equals(sticky.style.position, "fixed", "Element should become and remain fixed")
+      }));
+    }));
+  }
+});
+window.onload = t.step_func(function() {
+  window.scrollTo(0, nonStickyOffset + 1);
+});
+</script>
diff --git a/third_party/blink/web_tests/external/wpt/css/cssom/getComputedStyle-line-height.html b/third_party/blink/web_tests/external/wpt/css/cssom/getComputedStyle-line-height.html
new file mode 100644
index 0000000..089a6d8
--- /dev/null
+++ b/third_party/blink/web_tests/external/wpt/css/cssom/getComputedStyle-line-height.html
@@ -0,0 +1,23 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CSS Test: line-height resolved value</title>
+<link rel="help" href="https://drafts.csswg.org/cssom/#resolved-values">
+<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/3749">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<style>
+  div { font-size: 16px; }
+</style>
+<div style="line-height: normal" data-expected="normal"></div>
+<div style="line-height: 1" data-expected="16px"></div>
+<div style="line-height: 10px" data-expected="10px"></div>
+<div style="line-height: 10%" data-expected="1.6px"></div>
+<script>
+for (const e of document.querySelectorAll("div")) {
+  const specified = e.style.lineHeight;
+  test(function() {
+    const expected = e.getAttribute("data-expected");
+    assert_equals(getComputedStyle(e).lineHeight, expected, specified + " should compute to " + expected);
+  }, "line-height: " + specified);
+}
+</script>
diff --git a/third_party/blink/web_tests/external/wpt/fetch/sec-metadata/resources/helper.js b/third_party/blink/web_tests/external/wpt/fetch/sec-metadata/resources/helper.js
index 1968cfc..9425246 100644
--- a/third_party/blink/web_tests/external/wpt/fetch/sec-metadata/resources/helper.js
+++ b/third_party/blink/web_tests/external/wpt/fetch/sec-metadata/resources/helper.js
@@ -1,11 +1,16 @@
-function assert_header_equals(value, expected) {
+function wrap_by_tag(tag, text) {
+  return tag ? `${tag}: ${text}`: text;
+}
+
+function assert_header_equals(value, expected, tag) {
   if (typeof(value) === "string"){
     assert_not_equals(value, "No header has been recorded");
     value = JSON.parse(value);
   }
-  assert_equals(value.dest, expected.dest, "dest");
-  assert_equals(value.mode, expected.mode, "mode");
-  assert_equals(value.site, expected.site, "site");
+
+  assert_equals(value.dest, expected.dest, wrap_by_tag(tag, "dest"));
+  assert_equals(value.mode, expected.mode, wrap_by_tag(tag, "mode"));
+  assert_equals(value.site, expected.site, wrap_by_tag(tag, "site"));
   if (expected.hasOwnProperty("user"))
-    assert_equals(value.user, expected.user, "user");
+    assert_equals(value.user, expected.user, wrap_by_tag(tag, "user"));
 }
diff --git a/third_party/blink/web_tests/external/wpt/fetch/sec-metadata/serviceworker.tentative.https.sub.html b/third_party/blink/web_tests/external/wpt/fetch/sec-metadata/serviceworker.tentative.https.sub.html
index c86198d..43d7ab3 100644
--- a/third_party/blink/web_tests/external/wpt/fetch/sec-metadata/serviceworker.tentative.https.sub.html
+++ b/third_party/blink/web_tests/external/wpt/fetch/sec-metadata/serviceworker.tentative.https.sub.html
@@ -12,44 +12,25 @@
 <script src=/common/utils.js></script>
 <body>
   <script>
-      let nonce = token();
-      let key = "serviceworker-same-origin" + nonce;
+    promise_test(async t => {
+      const nonce = token();
+      const key = "serviceworker-same-origin" + nonce;
 
-      if ('serviceWorker' in navigator) {
-        window.addEventListener('load', function() {
-          navigator.serviceWorker.register('https://{{host}}:{{ports[https][0]}}/fetch/sec-metadata/resources/record-header.py?file=' + key).then(function(registration) {
-            test_same_origin();
+      // Register a service worker and check the request header.
+      const registration = await navigator.serviceWorker.register('https://{{host}}:{{ports[https][0]}}/fetch/sec-metadata/resources/record-header.py?file=' + key);
+      t.add_cleanup(() => registration.unregister());
+      await retrieve_and_assert_headers(key, 'Register service worker');
 
-            // uninstall the serviceworker after the test
-            navigator.serviceWorker.getRegistrations().then(function(registrations) {
-              for(let registration of registrations) {
-                registration.unregister()
-              }
-            })
-          }, function(err) {
-            // registration failed
-          });
-        });
-      }
-      else {
-        test(function () {
-              done();
-            }, "Browser does not support serviceworker");
-      }
+      // Trigger an update check and check the request header again.
+      await registration.update();
+      await retrieve_and_assert_headers(key, 'Update service worker');
+    }, 'sec-metadata for service worker scripts');
+
+    async function retrieve_and_assert_headers(key, tag) {
+      let expected = { "dest": "serviceworker", "site": "same-origin", "user": "", "mode": "same-origin" };
+      const response = await fetch("/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key)
+      const text = await response.text();
+      assert_header_equals(text, expected, tag);
+    }
   </script>
 </body>
-
-<script>
-  function test_same_origin(){
-    promise_test(t => {
-    return new Promise((resolve, reject) => {
-      let expected = {"dest":"serviceworker", "site":"same-origin", "user":"", "mode": "same-origin"};
-      fetch("/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key)
-        .then(response => response.text())
-        .then(text => assert_header_equals(text, expected))
-        .then(_ => resolve())
-        .catch(e => reject(e));
-      })
-    })
-  }
-</script>
diff --git a/third_party/blink/web_tests/external/wpt/html/cross-origin-opener/new_window_null.tentative.html.ini b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener/new_window_null.tentative.html.ini
new file mode 100644
index 0000000..f5b55a40
--- /dev/null
+++ b/third_party/blink/web_tests/external/wpt/html/cross-origin-opener/new_window_null.tentative.html.ini
@@ -0,0 +1,3 @@
+[new_window_null.tentative.html]
+  disabled:
+    if os == "android": https://bugzilla.mozilla.org/show_bug.cgi?id=1559494
diff --git a/third_party/blink/web_tests/external/wpt/html/rendering/replaced-elements/the-select-element/select-1-line-height.html b/third_party/blink/web_tests/external/wpt/html/rendering/replaced-elements/the-select-element/select-1-line-height.html
index e6383f08..605a988 100644
--- a/third_party/blink/web_tests/external/wpt/html/rendering/replaced-elements/the-select-element/select-1-line-height.html
+++ b/third_party/blink/web_tests/external/wpt/html/rendering/replaced-elements/the-select-element/select-1-line-height.html
@@ -26,9 +26,10 @@
 <script>
 document.body.offsetHeight;
 var cv = window.getComputedStyle(document.querySelector('select')).lineHeight;
-if (cv == "normal" || parseInt(cv) > 50) {
+if (cv != "normal" && parseInt(cv) > 50) {
   document.body.appendChild(document.createTextNode(
-    "FAIL: got computed line-height '" + cv + "', expected a length <= 50px"));
+    "FAIL: got computed line-height '" + cv + "', " +
+    "expected 'normal' or a length <= 50px"));
 }</script>
 
 </body>
diff --git a/third_party/blink/web_tests/external/wpt/html/the-xhtml-syntax/parsing-xhtml-documents/data-xhtml-with-dtd-ref.html b/third_party/blink/web_tests/external/wpt/html/the-xhtml-syntax/parsing-xhtml-documents/data-xhtml-with-dtd-ref.html
new file mode 100644
index 0000000..7e081a1
--- /dev/null
+++ b/third_party/blink/web_tests/external/wpt/html/the-xhtml-syntax/parsing-xhtml-documents/data-xhtml-with-dtd-ref.html
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+Test passes if it correctly shows &Aacute; in the subframe.
+<hr>
+<iframe srcdoc="&amp;Aacute"></iframe>
diff --git a/third_party/blink/web_tests/external/wpt/html/the-xhtml-syntax/parsing-xhtml-documents/data-xhtml-with-dtd.html b/third_party/blink/web_tests/external/wpt/html/the-xhtml-syntax/parsing-xhtml-documents/data-xhtml-with-dtd.html
new file mode 100644
index 0000000..fd29905
--- /dev/null
+++ b/third_party/blink/web_tests/external/wpt/html/the-xhtml-syntax/parsing-xhtml-documents/data-xhtml-with-dtd.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<!--
+    Any copyright is dedicated to the Public Domain.
+    http://creativecommons.org/publicdomain/zero/1.0/
+  -->
+<html>
+  <head>
+    <title>
+      Test that an XHTML document with a data: URL still handles the XHTML DTD
+      properly even if the DTD URL is given as a relative URL.
+    </title>
+    <link rel="author" title="Boris Zbarsky" href="bzbarsky@mit.edu">
+    <link rel="match" href="data-xhtml-with-dtd-ref.html">
+  </head>
+  <body>
+    Test passes if it correctly shows &Aacute; in the subframe.
+    <hr>
+    <!-- Document in the subframe is:
+<?xml version="1.0"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <body>
+    &Aacute;
+  </body>
+</html>
+    -->
+    <iframe src='data:application/xml,%3C%3Fxml%20version%3D%221.0%22%3F%3E%0A%3C!DOCTYPE%20html%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20XHTML%201.0%20Strict%2F%2FEN%22%20%22DTD%2Fxhtml1-strict.dtd%22%3E%0A%3Chtml%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%0A%20%20%3Cbody%3E%0A%20%20%20%20%26Aacute%3B%0A%20%20%3C%2Fbody%3E%0A%3C%2Fhtml%3E%0A'></iframe>
diff --git a/third_party/blink/web_tests/external/wpt/kv-storage/api-surface.https.html b/third_party/blink/web_tests/external/wpt/kv-storage/api-surface.https.html
deleted file mode 100644
index 90e7058..0000000
--- a/third_party/blink/web_tests/external/wpt/kv-storage/api-surface.https.html
+++ /dev/null
@@ -1,70 +0,0 @@
-<!DOCTYPE html>
-<meta charset="utf-8">
-<title>KV Storage: API surface</title>
-
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-
-<script type="module">
-import { storage, StorageArea } from "std:kv-storage";
-import * as classAssert from "./helpers/class-assert.js";
-import { testWithArea } from "./helpers/kvs-tests.js";
-
-test(() => {
-  classAssert.isConstructor(StorageArea);
-  classAssert.functionName(StorageArea, "StorageArea");
-  classAssert.functionLength(StorageArea, 1);
-  classAssert.hasClassPrototype(StorageArea);
-  classAssert.hasPrototypeConstructorLink(StorageArea);
-  classAssert.propertyKeys(StorageArea, ["length", "prototype", "name"], []);
-}, "StorageArea constructor");
-
-test(() => {
-  classAssert.propertyKeys(StorageArea.prototype, [
-    "constructor", "set", "get", "delete", "clear",
-    "keys", "values", "entries", "backingStore"
-  ], [
-    Symbol.asyncIterator
-  ]);
-
-  classAssert.methods(StorageArea.prototype, {
-    set: 2,
-    get: 1,
-    delete: 1,
-    clear: 0,
-    keys: 0,
-    values: 0,
-    entries: 0
-  });
-
-  classAssert.accessors(StorageArea.prototype, {
-    backingStore: ["get"]
-  });
-}, "StorageArea.prototype methods and properties");
-
-test(() => {
-  assert_equals(StorageArea.prototype[Symbol.asyncIterator], StorageArea.prototype.entries);
-}, "[Symbol.asyncIterator]() and entries() must be the same function");
-
-testWithArea(async area => {
-  classAssert.propertyKeys(area, [], []);
-}, "Instances don't have any properties");
-
-test(() => {
-  assert_equals(storage instanceof StorageArea, true, "instanceof");
-  assert_equals(storage.constructor, StorageArea, ".constructor property");
-  assert_equals(Object.getPrototypeOf(storage), StorageArea.prototype, "[[Prototype]]");
-}, "Built-in storage export is a StorageArea");
-
-testWithArea(async area => {
-  assert_false(Symbol.toStringTag in StorageArea.prototype,
-    "Symbol.toStringTag must not be in the prototype");
-  assert_equals(Object.prototype.toString.call(StorageArea.prototype), "[object Object]",
-    "The prototype must not be customized");
-
-  assert_equals(Object.prototype.toString.call(area), "[object Object]",
-    "A constructed StorageArea must not be customized");
-    assert_equals(Object.prototype.toString.call(storage), "[object Object]",
-    "The default storage area must not be customized");
-}, "No custom toStringTag");
-</script>
diff --git a/third_party/blink/web_tests/external/wpt/kv-storage/entries.https.html b/third_party/blink/web_tests/external/wpt/kv-storage/entries.https.html
index 397525de..0781592 100644
--- a/third_party/blink/web_tests/external/wpt/kv-storage/entries.https.html
+++ b/third_party/blink/web_tests/external/wpt/kv-storage/entries.https.html
@@ -8,7 +8,7 @@
 
 <script type="module">
 import { testWithArea } from "./helpers/kvs-tests.js";
-import * as classAssert from "./helpers/class-assert.js";
+import * as iterAssert from "./helpers/iter-assert.js";
 import {
   assertAsyncIteratorEquals,
   assertAsyncIteratorCustomEquals,
@@ -77,7 +77,7 @@
     await iter.next()
   ];
 
-  classAssert.iterResultsCustom(
+  iterAssert.iterResultsCustom(
     iterResults,
     [
       [[1, "value 1"], false],
@@ -107,7 +107,7 @@
   ];
   const iterResults = await Promise.all(promises);
 
-  classAssert.iterResultsCustom(
+  iterAssert.iterResultsCustom(
     iterResults,
     [
       [[1, "value 1"], false],
diff --git a/third_party/blink/web_tests/external/wpt/kv-storage/helpers/class-assert.js b/third_party/blink/web_tests/external/wpt/kv-storage/helpers/class-assert.js
deleted file mode 100644
index 89f0889..0000000
--- a/third_party/blink/web_tests/external/wpt/kv-storage/helpers/class-assert.js
+++ /dev/null
@@ -1,139 +0,0 @@
-export function isConstructor(o) {
-  assert_equals(typeof o, "function", "Must be a function according to typeof");
-  assert_true(isConstructorTest(o), "Must be a constructor according to the meta-object protocol");
-  assert_throws(new TypeError(), () => o(), "Attempting to call (not construct) must throw");
-}
-
-export function functionLength(o, expected, label) {
-  const lengthExpected = { writable: false, enumerable: false, configurable: true };
-  const { value } = propertyDescriptor(o, "length", lengthExpected);
-
-  assert_equals(value, expected, `${formatLabel(label)}length value`);
-}
-
-export function functionName(o, expected, label) {
-  const lengthExpected = { writable: false, enumerable: false, configurable: true };
-  const { value } = propertyDescriptor(o, "name", lengthExpected);
-
-  assert_equals(value, expected, `${formatLabel(label)}name value`);
-}
-
-export function hasClassPrototype(o) {
-  const prototypeExpected = { writable: false, enumerable: false, configurable: false };
-  const { value } = propertyDescriptor(o, "prototype", prototypeExpected);
-  assert_equals(typeof value, "object", "prototype must be an object");
-  assert_not_equals(value, null, "prototype must not be null");
-}
-
-export function hasPrototypeConstructorLink(klass) {
-  const constructorExpected = { writable: true, enumerable: false, configurable: true };
-  const { value } = propertyDescriptor(klass.prototype, "constructor", constructorExpected);
-  assert_equals(value, klass, "constructor property must match");
-}
-
-export function propertyKeys(o, expectedNames, expectedSymbols, label) {
-  label = formatLabel(label);
-  assert_array_equals(Object.getOwnPropertyNames(o), expectedNames, `${label}property names`);
-  assert_array_equals(Object.getOwnPropertySymbols(o), expectedSymbols,
-    `${label}property symbols`);
-}
-
-export function iterResultCustom(o, expectedValue, expectedDone, valueAsserter, label) {
-  label = formatLabel(label);
-
-  assert_equals(typeof expectedDone, "boolean",
-    `${label} iterResult assert usage check: expectedDone must be a boolean`);
-
-  propertyKeys(o, ["value", "done"], [], label);
-  assert_equals(Object.getPrototypeOf(o), Object.prototype, `${label}prototype must be Object.prototype`);
-  valueAsserter(o.value, expectedValue, `${label}value`);
-  assert_equals(o.done, expectedDone, `${label}done`);
-}
-
-export function iterResult(o, expectedValue, expectedDone, label) {
-  return iterResultCustom(o, expectedValue, expectedDone, assert_equals, label);
-}
-
-export function iterResultsCustom(actualArray, expectedArrayOfArrays, valueAsserter, label) {
-  label = formatLabel(label);
-
-  assert_equals(actualArray.length, expectedArrayOfArrays.length,
-    `${label} iterResults assert usage check: actual and expected must have the same length`);
-
-  for (let i = 0; i < actualArray.length; ++i) {
-    const [expectedValue, expectedDone] = expectedArrayOfArrays[i];
-    iterResultCustom(actualArray[i], expectedValue, expectedDone, valueAsserter, `${label}iter result ${i}`);
-  }
-}
-
-export function iterResults(actualArray, expectedArrayOfArrays, label) {
-  return iterResultsCustom(actualArray, expectedArrayOfArrays, assert_equals, label);
-}
-
-export function methods(o, expectedMethods) {
-  for (const [name, length] of Object.entries(expectedMethods)) {
-    method(o, name, length);
-  }
-}
-
-export function accessors(o, expectedAccessors) {
-  for (const [name, accessorTypes] of Object.entries(expectedAccessors)) {
-    accessor(o, name, accessorTypes);
-  }
-}
-
-function method(o, prop, length) {
-  const methodExpected = { writable: true, enumerable: false, configurable: true };
-  const { value } = propertyDescriptor(o, prop, methodExpected);
-
-  assert_equals(typeof value, "function", `${prop} method must be a function according to typeof`);
-  assert_false(isConstructorTest(value),
-    `${prop} method must not be a constructor according to the meta-object protocol`);
-  functionLength(value, length, prop);
-  functionName(value, prop, prop);
-  propertyKeys(value, ["length", "name"], [], prop);
-}
-
-function accessor(o, prop, expectedAccessorTypes) {
-  const accessorExpected = { enumerable: false, configurable: true };
-  const propDesc = propertyDescriptor(o, prop, accessorExpected);
-
-  for (const possibleType of ["get", "set"]) {
-    const accessorFunc = propDesc[possibleType];
-    if (expectedAccessorTypes.includes(possibleType)) {
-      const label = `${prop}'s ${possibleType}ter`;
-
-      assert_equals(typeof accessorFunc, "function",
-        `${label} must be a function according to typeof`);
-      assert_false(isConstructorTest(accessorFunc),
-        `${label} must not be a constructor according to the meta-object protocol`);
-
-      functionLength(accessorFunc, possibleType === "get" ? 0 : 1, label);
-      functionName(accessorFunc, `${possibleType} ${prop}`, label);
-      propertyKeys(accessorFunc, ["length", "name"], [], label);
-    } else {
-      assert_equals(accessorFunc, undefined, `${prop} must not have a ${possibleType}ter`);
-    }
-  }
-}
-
-function propertyDescriptor(obj, prop, mustMatch) {
-  const propDesc = Object.getOwnPropertyDescriptor(obj, prop);
-  for (const key in Object.keys(mustMatch)) {
-    assert_equals(propDesc[key], mustMatch[key], `${prop} ${key}`);
-  }
-  return propDesc;
-}
-
-function isConstructorTest(o) {
-  try {
-    new (new Proxy(o, {construct: () => ({})}));
-    return true;
-  } catch (e) {
-    return false;
-  }
-}
-
-function formatLabel(label) {
-  return label !== undefined ? `${label} ` : "";
-}
diff --git a/third_party/blink/web_tests/external/wpt/kv-storage/helpers/expose-as-global.html b/third_party/blink/web_tests/external/wpt/kv-storage/helpers/expose-as-global.html
new file mode 100644
index 0000000..4ff3c6cf
--- /dev/null
+++ b/third_party/blink/web_tests/external/wpt/kv-storage/helpers/expose-as-global.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Helper file to be loaded in an iframe that exposes a copy of StorageArea as a global</title>
+
+<script type="module">
+import { StorageArea } from "std:kv-storage";
+window.StorageArea = StorageArea;
+</script>
\ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/kv-storage/helpers/iter-assert.js b/third_party/blink/web_tests/external/wpt/kv-storage/helpers/iter-assert.js
new file mode 100644
index 0000000..e1ac73c
--- /dev/null
+++ b/third_party/blink/web_tests/external/wpt/kv-storage/helpers/iter-assert.js
@@ -0,0 +1,42 @@
+export function iterResultCustom(o, expectedValue, expectedDone, valueAsserter, label) {
+  label = formatLabel(label);
+
+  assert_equals(typeof expectedDone, "boolean",
+    `${label} iterResult assert usage check: expectedDone must be a boolean`);
+
+  propertyKeys(o, ["value", "done"], [], label);
+  assert_equals(Object.getPrototypeOf(o), Object.prototype, `${label}prototype must be Object.prototype`);
+  valueAsserter(o.value, expectedValue, `${label}value`);
+  assert_equals(o.done, expectedDone, `${label}done`);
+}
+
+export function iterResult(o, expectedValue, expectedDone, label) {
+  return iterResultCustom(o, expectedValue, expectedDone, assert_equals, label);
+}
+
+export function iterResultsCustom(actualArray, expectedArrayOfArrays, valueAsserter, label) {
+  label = formatLabel(label);
+
+  assert_equals(actualArray.length, expectedArrayOfArrays.length,
+    `${label} iterResults assert usage check: actual and expected must have the same length`);
+
+  for (let i = 0; i < actualArray.length; ++i) {
+    const [expectedValue, expectedDone] = expectedArrayOfArrays[i];
+    iterResultCustom(actualArray[i], expectedValue, expectedDone, valueAsserter, `${label}iter result ${i}`);
+  }
+}
+
+export function iterResults(actualArray, expectedArrayOfArrays, label) {
+  return iterResultsCustom(actualArray, expectedArrayOfArrays, assert_equals, label);
+}
+
+function propertyKeys(o, expectedNames, expectedSymbols, label) {
+  label = formatLabel(label);
+  assert_array_equals(Object.getOwnPropertyNames(o), expectedNames, `${label}property names`);
+  assert_array_equals(Object.getOwnPropertySymbols(o), expectedSymbols,
+    `${label}property symbols`);
+}
+
+function formatLabel(label) {
+  return label !== undefined ? `${label} ` : "";
+}
diff --git a/third_party/blink/web_tests/external/wpt/kv-storage/interface.https.html b/third_party/blink/web_tests/external/wpt/kv-storage/interface.https.html
new file mode 100644
index 0000000..ab1930b2
--- /dev/null
+++ b/third_party/blink/web_tests/external/wpt/kv-storage/interface.https.html
@@ -0,0 +1,175 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>KV Storage: IDL interface tests</title>
+
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/resources/WebIDLParser.js"></script>
+<script src="/resources/idlharness.js"></script>
+
+<script type="module">
+import { storage, StorageArea } from "std:kv-storage";
+
+// Web IDL/idlharness.js do not yet have support for the spec's IDL, which uses module {},
+// async_iterator, and some new extended attributes. This IDL is a mutated version to work with the
+// current idlharness.js to get some coverage.
+//
+// When the relevant Web IDL PRs land and idlharness.js gets updated, we can replace this file with
+// a normal-style idlharness test, with the IDL scraped from the spec.
+//
+// Other tests in this file are similarly ones that should be generatable from the IDL, in theory.
+
+const idl = `
+[Constructor(DOMString name)]
+interface StorageArea {
+  Promise<void> set(any key, any value);
+  Promise<any> get(any key);
+  Promise<void> delete(any key);
+  Promise<void> clear();
+
+//  async_iterable<any, any>;
+
+  [SameObject] readonly attribute object backingStore;
+};
+`;
+
+// Define a global property because idlharness.js only understands
+// global properties, not modules.
+Object.defineProperty(window, "StorageArea", {
+  configurable: true,
+  enumerable: false,
+  writable: true,
+  value: StorageArea
+});
+
+test(t => {
+  window.testStorageArea = storage;
+  t.add_cleanup(() => {
+    delete window.testStorageArea;
+  });
+
+  const idlArray = new IdlArray();
+  idlArray.add_idls(idl);
+  idlArray.add_objects({ StorageArea: ["window.testStorageArea"] });
+  idlArray.test();
+}, "idlharness basic interface tests");
+
+test(() => {
+  assert_equals(storage instanceof StorageArea, true, "instanceof");
+  assert_equals(storage.constructor, StorageArea, ".constructor property");
+  assert_equals(Object.getPrototypeOf(storage), StorageArea.prototype, "[[Prototype]]");
+}, "Built-in storage export is a StorageArea");
+
+// These should be auto-tested by idlharness eventually, similar to
+// https://github.com/web-platform-tests/wpt/blob/3725067ef0328c998be2ba93dbaeb0579586fccd/resources/idlharness.js#L2452
+// for sync iterators (although this tests more than that does).
+test(() => {
+  for (const methodName of ["keys", "values", "entries"]) {
+    const descriptor = Object.getOwnPropertyDescriptor(StorageArea.prototype, methodName);
+
+    assert_true(descriptor.writable, `${methodName} property should be writable`);
+    assert_true(descriptor.configurable, `${methodName} property should be configurable`);
+
+    // May need updating if https://github.com/heycam/webidl/issues/738 changes the spec
+    assert_true(descriptor.enumerable, `${methodName} property should be enumerable`);
+
+    assert_equals(typeof descriptor.value, "function",
+      `${methodName} property should be a function`);
+    assert_equals(descriptor.value.length, 0, `${methodName} function object length should be 0`);
+    assert_equals(descriptor.value.name, methodName,
+      `${methodName} function object should have the right name`);
+
+    assert_throws(new TypeError(), () => descriptor.value.call(StorageArea.prototype),
+      `${methodName} should throw when called on the prototype directly`);
+      assert_throws(new TypeError(), () => descriptor.value.call({}),
+      `${methodName} should throw when called on an empty object`);
+  }
+
+  const AsyncIteratorPrototype =
+    Object.getPrototypeOf(Object.getPrototypeOf(async function*() {}).prototype);
+  const asyncIteratorProto = Object.getPrototypeOf(storage.keys());
+  assert_equals(Object.getPrototypeOf(storage.values()), asyncIteratorProto,
+    "keys() and values() return values must have the same prototype");
+  assert_equals(Object.getPrototypeOf(storage.entries()), asyncIteratorProto,
+    "keys() and entries() return values must have the same prototype");
+
+  assert_equals(Object.getPrototypeOf(asyncIteratorProto), AsyncIteratorPrototype,
+    "[[Prototype]] must be the async iterator prototype");
+
+  assert_array_equals(Object.getOwnPropertyNames(asyncIteratorProto), ["next"],
+      `async iterator prototype object must have a next method`);
+
+  const nextMethodDescriptor = Object.getOwnPropertyDescriptor(asyncIteratorProto, "next");
+  assert_true(nextMethodDescriptor.writable, `async iterator next property should be writable`);
+  assert_true(nextMethodDescriptor.configurable,
+    `async iterator next property should be configurable`);
+
+  // May need updating if https://github.com/heycam/webidl/issues/739 changes the spec
+  assert_true(nextMethodDescriptor.enumerable,
+    `async iterator next property should be enumerable`);
+
+  assert_equals(typeof nextMethodDescriptor.value, "function",
+    `async iterator next property should be a function`);
+  assert_equals(nextMethodDescriptor.value.length, 0,
+    `async iterator next function object length should be 0`);
+  assert_equals(nextMethodDescriptor.value.name, "next",
+    `async iterator next function object should have the right name`);
+
+  assert_array_equals(Object.getOwnPropertySymbols(asyncIteratorProto), [Symbol.toStringTag]);
+  const toStringTagDescriptor = Object.getOwnPropertyDescriptor(
+    asyncIteratorProto,
+    Symbol.toStringTag
+  );
+  assert_false(toStringTagDescriptor.writable,
+    `async iterator @@toStringTag property should be non-writable`);
+  assert_true(toStringTagDescriptor.configurable,
+    `async iterator @@toStringTag property should be configurable`);
+  assert_false(toStringTagDescriptor.enumerable,
+    `async iterator @@toStringTag property should be non-enumerable`);
+  assert_equals(toStringTagDescriptor.value, "StorageArea AsyncIterator",
+    `async iterator @@toStringTag property should have the right value`);
+
+  assert_equals(StorageArea.prototype[Symbol.asyncIterator], StorageArea.prototype.entries,
+    "@@asyncIterator method should be the same as entries");
+}, "@@asyncIterator tests");
+
+promise_test(async t => {
+  const iframe = document.createElement("iframe");
+  iframe.src = "helpers/expose-as-global.html";
+  document.body.append(iframe);
+
+  await frameLoadPromise(iframe);
+  const OtherStorageArea = iframe.contentWindow.StorageArea;
+
+  await promise_rejects(t, new TypeError(),
+    OtherStorageArea.prototype.set.call(storage, "testkey", "testvalue"),
+    `set() must reject cross-realm`);
+  await promise_rejects(t, new TypeError(),
+    OtherStorageArea.prototype.get.call(storage, "testkey"),
+    `get() must reject cross-realm`);
+  await promise_rejects(t, new TypeError(),
+    OtherStorageArea.prototype.delete.call(storage, "testkey"),
+    `delete() must reject cross-realm`);
+  await promise_rejects(t, new TypeError(), OtherStorageArea.prototype.clear.call(storage),
+    `clear() must reject cross-realm`);
+
+  assert_throws(new TypeError(), () => OtherStorageArea.prototype.keys.call(storage),
+    `keys() must throw cross-realm`);
+  assert_throws(new TypeError(), () => OtherStorageArea.prototype.values.call(storage),
+    `values() must throw cross-realm`);
+  assert_throws(new TypeError(), () => OtherStorageArea.prototype.entries.call(storage),
+    `entries() must throw cross-realm`);
+
+  const otherBackingStoreGetter =
+    Object.getOwnPropertyDescriptor(OtherStorageArea.prototype, "backingStore").get;
+  assert_throws(new TypeError(), () => otherBackingStoreGetter.call(storage),
+    `backingStore must throw cross-realm`);
+}, "Same-realm brand checks");
+
+function frameLoadPromise(frame) {
+  return new Promise((resolve, reject) => {
+    frame.onload = resolve;
+    frame.onerror = () => reject(new Error(`${frame.src} failed to load`));
+  });
+}
+</script>
\ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/kv-storage/keys-values-entries.https.html b/third_party/blink/web_tests/external/wpt/kv-storage/keys-values-entries.https.html
index 2a9cabe..27ad3e4 100644
--- a/third_party/blink/web_tests/external/wpt/kv-storage/keys-values-entries.https.html
+++ b/third_party/blink/web_tests/external/wpt/kv-storage/keys-values-entries.https.html
@@ -14,32 +14,13 @@
 
 <script type="module">
 import { testWithArea } from "./helpers/kvs-tests.js";
-import * as classAssert from "./helpers/class-assert.js";
+import * as iterAssert from "./helpers/iter-assert.js";
 import { assertAsyncIteratorEquals } from "./helpers/equality-asserters.js";
 // Also uses some global functions included via support-promises.js.
 
-const AsyncIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf(async function*() {}).prototype);
-
-testWithArea(async area => {
-  const keysProto = Object.getPrototypeOf(area.keys());
-  const valuesProto = Object.getPrototypeOf(area.values());
-  const entriesProto = Object.getPrototypeOf(area.entries());
-
-  assert_equals(keysProto, valuesProto, "keys() and values() return values' must have the same [[Prototype]]");
-  assert_equals(valuesProto, entriesProto, "values() and entries () return values' must have the same [[Prototype]]");
-}, "keys()/values()/entries() all use the same prototype object");
-
 for (const method of ["keys", "values", "entries"]) {
   testWithArea(async area => {
     const iter = area[method]();
-    const proto = Object.getPrototypeOf(iter);
-    assert_equals(Object.getPrototypeOf(proto), AsyncIteratorPrototype,
-      "[[Prototype]] must be the async iterator prototype");
-    classAssert.propertyKeys(proto, ["next"], [], "must only have a next() method");
-  }, `${method}() return value is an async iterator of the expected shape`);
-
-  testWithArea(async area => {
-    const iter = area[method]();
     const promise = iter.next();
 
     await area.set(1, "value 1");
@@ -49,7 +30,7 @@
       await iter.next()
     ];
 
-    classAssert.iterResults(iterResults, [
+    iterAssert.iterResults(iterResults, [
       [undefined, true],
       [undefined, true]
     ]);
diff --git a/third_party/blink/web_tests/external/wpt/kv-storage/keys.https.html b/third_party/blink/web_tests/external/wpt/kv-storage/keys.https.html
index 19a397c4..3535d2f 100644
--- a/third_party/blink/web_tests/external/wpt/kv-storage/keys.https.html
+++ b/third_party/blink/web_tests/external/wpt/kv-storage/keys.https.html
@@ -8,7 +8,7 @@
 
 <script type="module">
 import { testWithArea } from "./helpers/kvs-tests.js";
-import * as classAssert from "./helpers/class-assert.js";
+import * as iterAssert from "./helpers/iter-assert.js";
 import {
   assertAsyncIteratorEquals,
   assertAsyncIteratorCustomEquals,
@@ -63,7 +63,7 @@
     await iter.next()
   ];
 
-  classAssert.iterResults(iterResults, [
+  iterAssert.iterResults(iterResults, [
     [1, false],
     [2, false],
     [3, false],
@@ -89,7 +89,7 @@
   ];
   const iterResults = await Promise.all(promises);
 
-  classAssert.iterResults(iterResults, [
+  iterAssert.iterResults(iterResults, [
     [1, false],
     [2, false],
     [3, false],
diff --git a/third_party/blink/web_tests/external/wpt/kv-storage/values.https.html b/third_party/blink/web_tests/external/wpt/kv-storage/values.https.html
index d04ded37..bbdc7ae 100644
--- a/third_party/blink/web_tests/external/wpt/kv-storage/values.https.html
+++ b/third_party/blink/web_tests/external/wpt/kv-storage/values.https.html
@@ -8,7 +8,7 @@
 
 <script type="module">
 import { testWithArea } from "./helpers/kvs-tests.js";
-import * as classAssert from "./helpers/class-assert.js";
+import * as iterAssert from "./helpers/iter-assert.js";
 import { assertAsyncIteratorEquals } from "./helpers/equality-asserters.js";
 
 testWithArea(async area => {
@@ -58,7 +58,7 @@
     await iter.next()
   ];
 
-  classAssert.iterResults(iterResults, [
+  iterAssert.iterResults(iterResults, [
     ["value 1", false],
     ["value 2", false],
     ["value 3", false],
@@ -84,7 +84,7 @@
   ];
   const iterResults = await Promise.all(promises);
 
-  classAssert.iterResults(iterResults, [
+  iterAssert.iterResults(iterResults, [
     ["value 1", false],
     ["value 2", false],
     ["value 3", false],
diff --git a/third_party/blink/web_tests/external/wpt/lifecycle/resources/subframe.html b/third_party/blink/web_tests/external/wpt/lifecycle/resources/subframe.html
index b80ba954..2f1d70a 100644
--- a/third_party/blink/web_tests/external/wpt/lifecycle/resources/subframe.html
+++ b/third_party/blink/web_tests/external/wpt/lifecycle/resources/subframe.html
@@ -1,6 +1,5 @@
 <!DOCTYPE html>
 <meta charset="utf-8">
-<img src="/common/slow.py">
 <script>
 window.addEventListener('load', () => {
   window.parent.postMessage('load');
diff --git a/third_party/blink/web_tests/external/wpt/portals/portal-non-http-navigation.html b/third_party/blink/web_tests/external/wpt/portals/portal-non-http-navigation.html
deleted file mode 100644
index 3b79df3..0000000
--- a/third_party/blink/web_tests/external/wpt/portals/portal-non-http-navigation.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE html>
-<title>Tests that portal don't navigate to non-http schemes.</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<body>
-<script>
-async_test(t => {
-  var portal = document.createElement("portal");
-  portal.src = "data:text/html,empty portal";
-  portal.onload = t.unreached_func("Portal loaded data URL.");
-  document.body.appendChild(portal);
-  t.step_timeout(() => { portal.remove(); t.done(); }, 3000);
-}, "Tests that a portal can't navigate to a data URL.");
-
-async_test(t => {
-  var portal = document.createElement("portal");
-  portal.src = "about:blank";
-  portal.onload = t.unreached_func("Portal loaded about:blank.");
-  document.body.appendChild(portal);
-  t.step_timeout(() => { portal.remove(); t.done(); }, 3000);
-}, "Tests that a portal can't navigate to about:blank.");
-
-async_test(t => {
-  var portal = document.createElement("portal");
-  portal.src = "resources/simple-portal.html";
-  portal.onload = t.step_func(() => {
-    portal.onmessage = t.unreached_func("Portal execute javascript.");
-    portal.src = "javascript:window.portalHost.postMessage('executed', '*')";
-    t.step_timeout(() => { portal.remove(); t.done(); }, 3000);
-  });
-  document.body.appendChild(portal);
-}, "Tests that a portal can't navigate to javascript URLs.");
-</script>
-</body>
diff --git a/third_party/blink/web_tests/external/wpt/std-toast/methods.html b/third_party/blink/web_tests/external/wpt/std-toast/methods.html
index 7ce0e5a..981b9fb 100644
--- a/third_party/blink/web_tests/external/wpt/std-toast/methods.html
+++ b/third_party/blink/web_tests/external/wpt/std-toast/methods.html
@@ -77,49 +77,50 @@
 }, 'calling `toggle()` with `force` parameter set to false on a shown toast closes the toast');
 
 testToastElementAsync((t, toast) => {
-    toast.show();
+    toast.show({duration: 50});
 
-    // time = 999
+    // time = 49
     t.step_timeout(() => {
         assertToastShown(toast);
-        toast.show();
+        toast.show({duration: 50});
 
-        // time = 2000
+        // time = 98
         t.step_timeout(() => {
             assertToastShown(toast);
 
-            // time = 3000
+            // time = 99
             t.step_timeout(() => {
                 assertToastNotShown(toast);
                 t.done();
             }, 1000);
-        }, 1001);
-    }, 999);
+        }, 49);
+    }, 49);
 }, 'calling `show()` twice resets the timeout');
 
 testToastElementAsync((t, toast) => {
-    toast.show();
+    toast.show({duration: 50});
 
-    // time = 999
+    // time = 48
     t.step_timeout(() => {
         assertToastShown(toast);
         toast.hide();
 
-        // time = 1000
+        // time = 49
         t.step_timeout(() => {
             assertToastNotShown(toast);
 
-            // time = 1500
+            // time = 50
             t.step_timeout(() => {
-                toast.show();
+                toast.show({duration: 2});
 
-                // time = 2500
+                // time = 51
                 t.step_timeout(() => {
                     assertToastShown(toast);
+                    toast.hide();
                     t.done();
-                }, 1000);
-            }, 500);
+                }, 1);
+            }, 1);
         }, 1);
-    }, 999);
+    }, 48);
 }, 'calling `hide()` clears the timeout');
 </script>
diff --git a/third_party/blink/web_tests/external/wpt/std-toast/options.html b/third_party/blink/web_tests/external/wpt/std-toast/options.html
index 74470e3..9cea971 100644
--- a/third_party/blink/web_tests/external/wpt/std-toast/options.html
+++ b/third_party/blink/web_tests/external/wpt/std-toast/options.html
@@ -71,32 +71,34 @@
 
     t.step_timeout(() => {
         assertToastShown(toast);
-    }, 1999);
+    }, 2999);
 
     t.step_timeout(() => {
         assertToastNotShown(toast);
         t.done();
-    }, 2000);
+    }, 3000);
 
     t.add_cleanup(function() {
         toast.remove();
     });
-}, 'showToast closes after default duration of 2000ms');
+}, 'showToast closes after default duration of 3000ms');
+// FIXME: find a way to virtualize time instead of waiting 3000ms
+// BUG: https://github.com/web-platform-tests/wpt/issues/17489
 
 async_test(t => {
-    const toast = showToast('message', {duration: 1000});
+    const toast = showToast('message', {duration: 50});
 
     t.step_timeout(() => {
         assertToastShown(toast);
-    }, 999);
+    }, 49);
 
     t.step_timeout(() => {
         assertToastNotShown(toast);
         t.done();
-    }, 1000);
+    }, 50);
 
     t.add_cleanup(function() {
         toast.remove();
     });
-}, 'showToast closes after user specified 1000ms');
+}, 'showToast closes after user specified 50ms');
 </script>
diff --git a/third_party/blink/web_tests/external/wpt/svg/styling/required-properties.svg b/third_party/blink/web_tests/external/wpt/svg/styling/required-properties.svg
index c257254..040c5b8 100644
--- a/third_party/blink/web_tests/external/wpt/svg/styling/required-properties.svg
+++ b/third_party/blink/web_tests/external/wpt/svg/styling/required-properties.svg
@@ -140,7 +140,7 @@
     previous = property;
 
     test(function() {
-      assert_true(target.style.hasOwnProperty(property));
+      assert_true(property in target.style);
     }, 'Property "' + property + '" is supported');
   }
   ]]></script>
diff --git a/third_party/blink/web_tests/external/wpt/svg/types/scripted/SVGGeometryElement.isPointInStroke-01.svg b/third_party/blink/web_tests/external/wpt/svg/types/scripted/SVGGeometryElement.isPointInStroke-01.svg
index 377d409..5864c43 100644
--- a/third_party/blink/web_tests/external/wpt/svg/types/scripted/SVGGeometryElement.isPointInStroke-01.svg
+++ b/third_party/blink/web_tests/external/wpt/svg/types/scripted/SVGGeometryElement.isPointInStroke-01.svg
@@ -1,4 +1,4 @@
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 400"
+<svg xmlns="http://www.w3.org/2000/svg" width="400" height="400"
      xmlns:h="http://www.w3.org/1999/xhtml">
   <title>SVGGeometryElement.prototype.isPointInStroke</title>
   <metadata>
diff --git a/third_party/blink/web_tests/external/wpt/svg/types/scripted/SVGLength-px.html b/third_party/blink/web_tests/external/wpt/svg/types/scripted/SVGLength-px.html
index a91e4e9..65cf97ce 100644
--- a/third_party/blink/web_tests/external/wpt/svg/types/scripted/SVGLength-px.html
+++ b/third_party/blink/web_tests/external/wpt/svg/types/scripted/SVGLength-px.html
@@ -72,7 +72,7 @@
   var referenceValue = 48 * 2.54 / cssPixelsPerInch;
   assert_equals(length.valueAsString, referenceValue.toFixed(2) + "cm");
   assert_approx_equals(length.valueInSpecifiedUnits, referenceValue, 0.01);
-  assert_equals(length.value, 48);
+  assert_approx_equals(length.value, 48, 0.001);
   assert_equals(length.unitType, SVGLength.SVG_LENGTHTYPE_CM);
 }, document.title + ", cm");
 
@@ -119,4 +119,4 @@
   assert_equals(length.value, 16);
   assert_equals(length.unitType, SVGLength.SVG_LENGTHTYPE_PC);
 }, document.title + ", pc");
-</script>
\ No newline at end of file
+</script>
diff --git a/third_party/blink/web_tests/external/wpt/tools/wptrunner/wptrunner/environment.py b/third_party/blink/web_tests/external/wpt/tools/wptrunner/wptrunner/environment.py
index e7a9e4b..2493f1f 100644
--- a/third_party/blink/web_tests/external/wpt/tools/wptrunner/wptrunner/environment.py
+++ b/third_party/blink/web_tests/external/wpt/tools/wptrunner/wptrunner/environment.py
@@ -207,8 +207,9 @@
     def ensure_started(self):
         # Pause for a while to ensure that the server has a chance to start
         total_sleep_secs = 30
-        each_sleep_secs = 0.01
-        for _ in xrange(int(total_sleep_secs / each_sleep_secs)):
+        each_sleep_secs = 0.5
+        end_time = time.time() + total_sleep_secs
+        while time.time() < end_time:
             failed = self.test_servers()
             if not failed:
                 return
@@ -223,6 +224,7 @@
             for port, server in servers:
                 if self.test_server_port:
                     s = socket.socket()
+                    s.settimeout(0.1)
                     try:
                         s.connect((host, port))
                     except socket.error:
diff --git a/third_party/blink/web_tests/external/wpt/web-animations/animation-model/keyframe-effects/effect-value-iteration-composite-operation-expected.txt b/third_party/blink/web_tests/external/wpt/web-animations/animation-model/keyframe-effects/effect-value-iteration-composite-operation-expected.txt
index ebc51d9e..c58ee7c 100644
--- a/third_party/blink/web_tests/external/wpt/web-animations/animation-model/keyframe-effects/effect-value-iteration-composite-operation-expected.txt
+++ b/third_party/blink/web_tests/external/wpt/web-animations/animation-model/keyframe-effects/effect-value-iteration-composite-operation-expected.txt
@@ -16,7 +16,7 @@
 FAIL iteration composition of filter drop-shadow animation assert_equals: Animated filter drop-shadow style at 0s of the third iteration expected "drop-shadow(rgb(240, 240, 240) 20px 20px 20px)" but got "drop-shadow(rgb(0, 0, 0) 0px 0px 0px)"
 FAIL iteration composition of same filter list animation assert_equals: Animated filter list at 0s of the third iteration expected "brightness(3) contrast(3)" but got "brightness(1) contrast(1)"
 FAIL iteration composition of discrete filter list because of mismatch of the order assert_equals: Animated filter list at 50s of the third iteration expected "contrast(4) brightness(4)" but got "contrast(2) brightness(2)"
-FAIL iteration composition of different length filter list animation assert_equals: Animated filter list at 0s of the third iteration expected "sepia(2) contrast(3)" but got "sepia(0)"
+FAIL iteration composition of different length filter list animation assert_equals: Animated filter list at 0s of the third iteration expected "sepia(1) contrast(3)" but got "sepia(0)"
 PASS iteration composition of transform(rotate) animation
 PASS iteration composition of transform: [ scale(0), scale(1) ] animation
 FAIL iteration composition of transform: [ scale(1), scale(2) ] animation assert_approx_equals: expected matrix(3, 0, 0, 3, 0, 0) but got matrix(1, 0, 0, 1, 0, 0): Animated transform(scale) style at 0s of the third iteration expected 3 +/- 0.0001 but got 1
diff --git a/third_party/blink/web_tests/external/wpt/web-animations/animation-model/keyframe-effects/effect-value-iteration-composite-operation.html b/third_party/blink/web_tests/external/wpt/web-animations/animation-model/keyframe-effects/effect-value-iteration-composite-operation.html
index 142d49d..abfda86 100644
--- a/third_party/blink/web_tests/external/wpt/web-animations/animation-model/keyframe-effects/effect-value-iteration-composite-operation.html
+++ b/third_party/blink/web_tests/external/wpt/web-animations/animation-model/keyframe-effects/effect-value-iteration-composite-operation.html
@@ -430,11 +430,11 @@
     'Animated filter list at 50s of the first iteration');
   anim.currentTime = anim.effect.getComputedTiming().duration * 2;
   assert_equals(getComputedStyle(div).filter,
-    'sepia(2) contrast(3)',
+    'sepia(1) contrast(3)',
     'Animated filter list at 0s of the third iteration');
   anim.currentTime += anim.effect.getComputedTiming().duration / 2;
   assert_equals(getComputedStyle(div).filter,
-    'sepia(2.5) contrast(3.5)',
+    'sepia(1) contrast(3.5)',
     'Animated filter list at 50s of the third iteration');
 }, 'iteration composition of different length filter list animation');
 
diff --git a/third_party/blink/web_tests/external/wpt/webaudio/the-audio-api/the-convolvernode-interface/active-processing.https-expected.txt b/third_party/blink/web_tests/external/wpt/webaudio/the-audio-api/the-convolvernode-interface/active-processing.https-expected.txt
new file mode 100644
index 0000000..c0aedb0
--- /dev/null
+++ b/third_party/blink/web_tests/external/wpt/webaudio/the-audio-api/the-convolvernode-interface/active-processing.https-expected.txt
@@ -0,0 +1,9 @@
+This is a testharness.js-based test.
+PASS # AUDIT TASK RUNNER STARTED.
+PASS > [Test] Active processing for ConvolverNode
+PASS   Construction of graph with convolver did not throw an exception.
+FAIL X Number of output channels of convolver expected to have the value sequence of [1,2,1] but got 2 at index 0. assert_true: expected true got false
+FAIL < [Test] 1 out of 2 assertions were failed. assert_true: expected true got false
+FAIL # AUDIT TASK RUNNER FINISHED: 1 out of 1 tasks were failed. assert_true: expected true got false
+Harness: the test ran to completion.
+
diff --git a/third_party/blink/web_tests/external/wpt/webaudio/the-audio-api/the-convolvernode-interface/active-processing.https.html b/third_party/blink/web_tests/external/wpt/webaudio/the-audio-api/the-convolvernode-interface/active-processing.https.html
new file mode 100644
index 0000000..0199ca43
--- /dev/null
+++ b/third_party/blink/web_tests/external/wpt/webaudio/the-audio-api/the-convolvernode-interface/active-processing.https.html
@@ -0,0 +1,101 @@
+<!doctype html>
+<html>
+  <head>
+    <title>
+      Test Active Processing for ConvolverNode
+    </title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+    <script src="/webaudio/resources/audit-util.js"></script>
+    <script src="/webaudio/resources/audit.js"></script>
+  </head>
+
+  <body>
+    <script id="layout-test-code">
+      let audit = Audit.createTaskRunner();
+
+      // Arbitrary sample rate. And we only need a few blocks for rendering to
+      // see if things are working.
+      let sampleRate = 8000;
+      let renderLength = 10 * RENDER_QUANTUM_FRAMES;
+
+      // Number of frames where the source is active.  Fairly arbitrary, but
+      // should be more than one render quantum and significantly less than
+      // |renderLength|.
+      let srcDurationFrames = 131;
+
+      // Frame at which the source should be connected to the convolver.
+      let connectFrame = 2 * RENDER_QUANTUM_FRAMES;
+
+      // AudioProcessor that counts the number of channels on its single input.
+      let filePath =
+          '../the-audioworklet-interface/processors/input-count-processor.js';
+
+      audit.define(
+          {label: 'Test', description: 'Active processing for ConvolverNode'},
+          async (task, should) => {
+            const context = new OfflineAudioContext({
+              numberOfChannels: 2,
+              length: renderLength,
+              sampleRate: sampleRate
+            });
+
+            // Don't mix the inputs to the destination!
+            context.destination.channelInterpretation = 'discrete';
+
+            await context.audioWorklet.addModule(filePath);
+
+            // Impulse response for the convolver.  Make it stereo so that
+            // the output is stereo.  The length isn't too important.
+            let response = new AudioBuffer({
+              numberOfChannels: 2,
+              length: 150,
+              sampleRate: context.sampleRate
+            });
+
+            let src = new OscillatorNode(context);
+            let node = new ConvolverNode(context, {buffer: response});
+            let counter = new AudioWorkletNode(context, 'counter');
+
+            // Just to print a message that we created the graph with a
+            // convolver in it.
+            should(() => {
+              node.connect(counter).connect(context.destination);
+            }, 'Construction of graph with convolver').notThrow();
+
+            // Let the convolver run for a bit and then connect the source
+            // to it and start the source.
+            context.suspend(connectFrame / context.sampleRate)
+                .then(() => {
+                  src.connect(node);
+                  src.start();
+                  // Stop the source after some small number of frames.
+                  src.stop(
+                      context.currentTime +
+                      srcDurationFrames / context.sampleRate);
+                })
+                .then(() => context.resume());
+
+            const renderedBuffer = await context.startRendering();
+            const output = renderedBuffer.getChannelData(0);
+            // The convolver has a stereo response so it will produce
+            // stereo output for a mono or stereo input.  Initially,
+            // nothing is connected to the convolver so it is not actively
+            // processing and therefore produces a single channel of
+            // silence.  After a source is connected and started, the
+            // number of channels must be come 2.  When the source stops,
+            // the convolver node is no longer actively processing and
+            // must then produce a single channel of silence.
+            //
+            // We're not concerned here about when the changes happens. We
+            // only care that the number of channels changed
+            // appropriately.
+            should(output, 'Number of output channels of convolver')
+                .containValues([1, 2, 1]);
+            task.done();
+          });
+
+      audit.run();
+    </script>
+  </body>
+</html>
diff --git a/third_party/blink/web_tests/external/wpt/webrtc/RTCPeerConnection-iceGatheringState.html b/third_party/blink/web_tests/external/wpt/webrtc/RTCPeerConnection-iceGatheringState.html
index e170e4a..13990c55 100644
--- a/third_party/blink/web_tests/external/wpt/webrtc/RTCPeerConnection-iceGatheringState.html
+++ b/third_party/blink/web_tests/external/wpt/webrtc/RTCPeerConnection-iceGatheringState.html
@@ -60,16 +60,21 @@
 
     t.add_cleanup(() => pc.close());
 
+    let reachedGathering = false;
     const onIceGatheringStateChange = t.step_func(() => {
       const { iceGatheringState } = pc;
 
-      if(iceGatheringState === 'complete') {
+      if(iceGatheringState === 'gathering') {
+        reachedGathering = true;
+      } else if(iceGatheringState === 'complete') {
+        assert_true(reachedGathering, 'iceGatheringState should reach gathering before complete');
         t.done();
       }
     });
 
     assert_equals(pc.onicegatheringstatechange, null,
       'Expect connection to have icegatheringstatechange event');
+    assert_equals(pc.iceGatheringState, 'new');
 
     pc.addEventListener('icegatheringstatechange', onIceGatheringStateChange);
 
diff --git a/third_party/blink/web_tests/external/wpt/webrtc/protocol/candidate-exchange.https.html b/third_party/blink/web_tests/external/wpt/webrtc/protocol/candidate-exchange.https.html
index d1bc3581..b741de5 100644
--- a/third_party/blink/web_tests/external/wpt/webrtc/protocol/candidate-exchange.https.html
+++ b/third_party/blink/web_tests/external/wpt/webrtc/protocol/candidate-exchange.https.html
@@ -2,6 +2,7 @@
 <html>
 <head>
 <title>Candidate exchange</title>
+<meta name=timeout content=long>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="../RTCPeerConnection-helper.js"></script>
diff --git a/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/fast/text/selection/justified-selection-at-edge-expected.png b/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/fast/text/selection/justified-selection-at-edge-expected.png
deleted file mode 100644
index e235ec6..0000000
--- a/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/fast/text/selection/justified-selection-at-edge-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/repaint-across-writing-mode-boundary-expected.png b/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/repaint-across-writing-mode-boundary-expected.png
deleted file mode 100644
index b9105ca49..0000000
--- a/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/repaint-across-writing-mode-boundary-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/repaint-across-writing-mode-boundary-expected.txt b/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/repaint-across-writing-mode-boundary-expected.txt
deleted file mode 100644
index 5f51a1b5..0000000
--- a/third_party/blink/web_tests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/repaint-across-writing-mode-boundary-expected.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-{
-  "layers": [
-    {
-      "name": "LayoutView #document",
-      "bounds": [800, 600],
-      "drawsContent": false,
-      "backgroundColor": "#FFFFFF"
-    },
-    {
-      "name": "Scrolling Layer",
-      "bounds": [800, 600],
-      "drawsContent": false
-    },
-    {
-      "name": "Scrolling Contents Layer",
-      "bounds": [800, 600],
-      "contentsOpaque": true,
-      "backgroundColor": "#FFFFFF",
-      "paintInvalidations": [
-        {
-          "object": "NGPhysicalTextFragment '\u7B2C\u4E00\u6BB5\u843D paragraph 1'",
-          "rect": [548, 191, 23, 36],
-          "reason": "selection"
-        }
-      ]
-    }
-  ]
-}
-
diff --git a/third_party/blink/web_tests/http/tests/devtools/a11y-axe-core/memory/heap-profiler-a11y-test-expected.txt b/third_party/blink/web_tests/http/tests/devtools/a11y-axe-core/memory/heap-profiler-a11y-test-expected.txt
new file mode 100644
index 0000000..f7b1929
--- /dev/null
+++ b/third_party/blink/web_tests/http/tests/devtools/a11y-axe-core/memory/heap-profiler-a11y-test-expected.txt
@@ -0,0 +1,4 @@
+Tests accessibility in heap profiler using the axe-core linter.
+aXe violations: []
+
+
diff --git a/third_party/blink/web_tests/http/tests/devtools/a11y-axe-core/memory/heap-profiler-a11y-test.js b/third_party/blink/web_tests/http/tests/devtools/a11y-axe-core/memory/heap-profiler-a11y-test.js
new file mode 100644
index 0000000..33175c6
--- /dev/null
+++ b/third_party/blink/web_tests/http/tests/devtools/a11y-axe-core/memory/heap-profiler-a11y-test.js
@@ -0,0 +1,42 @@
+// Copyright 2019 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+(async function() {
+  TestRunner.addResult(`Tests accessibility in heap profiler using the axe-core linter.`);
+  await TestRunner.loadModule('axe_core_test_runner');
+  await TestRunner.loadModule('heap_profiler_test_runner');
+  await TestRunner.showPanel('heap_profiler');
+  await TestRunner.evaluateInPagePromise(`
+      class MyTestClass {
+        constructor() {
+          this.z = new Uint32Array(10000);  // Pull the class to top.
+          this.myFunction = () => 42;
+        }
+      };
+      function* myGenerator() {
+        yield 1;
+      }
+      class MyTestClass2 {}
+      window.myTestClass = new MyTestClass();
+      window.myTestGenerator = myGenerator();
+      window.myTestClass2 = new MyTestClass2();`);
+
+  await HeapProfilerTestRunner.startSamplingHeapProfiler();
+  await TestRunner.evaluateInPagePromise(`
+      function pageFunction() {
+        (function () {
+          window.holder = [];
+          // Allocate few MBs of data.
+          for (var i = 0; i < 1000; ++i)
+            window.holder.push(new Array(1000).fill(42));
+        })();
+      }
+      pageFunction();`);
+  HeapProfilerTestRunner.stopSamplingHeapProfiler();
+
+  await UI.viewManager.showView('heap_profiler');
+  const widget = await UI.viewManager.view('heap_profiler').widget();
+  await AxeCoreTestRunner.runValidation(widget.element);
+  TestRunner.completeTest();
+})();
diff --git a/third_party/blink/web_tests/platform/linux/fast/text/selection/justified-selection-at-edge-expected.png b/third_party/blink/web_tests/platform/linux/fast/text/selection/justified-selection-at-edge-expected.png
index e235ec6..be7a478 100644
--- a/third_party/blink/web_tests/platform/linux/fast/text/selection/justified-selection-at-edge-expected.png
+++ b/third_party/blink/web_tests/platform/linux/fast/text/selection/justified-selection-at-edge-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/paint/invalidation/repaint-across-writing-mode-boundary-expected.png b/third_party/blink/web_tests/platform/linux/paint/invalidation/repaint-across-writing-mode-boundary-expected.png
index b9105ca49..72be2b3 100644
--- a/third_party/blink/web_tests/platform/linux/paint/invalidation/repaint-across-writing-mode-boundary-expected.png
+++ b/third_party/blink/web_tests/platform/linux/paint/invalidation/repaint-across-writing-mode-boundary-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/virtual/disable-blink-gen-property-trees/paint/invalidation/repaint-across-writing-mode-boundary-expected.png b/third_party/blink/web_tests/platform/linux/virtual/disable-blink-gen-property-trees/paint/invalidation/repaint-across-writing-mode-boundary-expected.png
index b9105ca49..72be2b3 100644
--- a/third_party/blink/web_tests/platform/linux/virtual/disable-blink-gen-property-trees/paint/invalidation/repaint-across-writing-mode-boundary-expected.png
+++ b/third_party/blink/web_tests/platform/linux/virtual/disable-blink-gen-property-trees/paint/invalidation/repaint-across-writing-mode-boundary-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.10/editing/selection/japanese-lr-selection-expected.png b/third_party/blink/web_tests/platform/mac-mac10.10/editing/selection/japanese-lr-selection-expected.png
index 39a59c9..a5a4202 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.10/editing/selection/japanese-lr-selection-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.10/editing/selection/japanese-lr-selection-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.10/editing/selection/japanese-rl-selection-expected.png b/third_party/blink/web_tests/platform/mac-mac10.10/editing/selection/japanese-rl-selection-expected.png
index b2d108d..ea81101a 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.10/editing/selection/japanese-rl-selection-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.10/editing/selection/japanese-rl-selection-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.10/editing/selection/selection-button-text-expected.png b/third_party/blink/web_tests/platform/mac-mac10.10/editing/selection/selection-button-text-expected.png
index a08fef0..4efa23e 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.10/editing/selection/selection-button-text-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.10/editing/selection/selection-button-text-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/atsui-kerning-and-ligatures-expected.png b/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/atsui-kerning-and-ligatures-expected.png
index 0260452..792a47b5 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/atsui-kerning-and-ligatures-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/atsui-kerning-and-ligatures-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/atsui-rtl-override-selection-expected.png b/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/atsui-rtl-override-selection-expected.png
index 74de8686..1a79b1ed 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/atsui-rtl-override-selection-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/atsui-rtl-override-selection-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/complex-text-rtl-selection-repaint-expected.png b/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/complex-text-rtl-selection-repaint-expected.png
index b3ab19d8..ed36d2ea 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/complex-text-rtl-selection-repaint-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/complex-text-rtl-selection-repaint-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/emphasis-expected.png b/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/emphasis-expected.png
index 03a2637..d98301e 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/emphasis-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/emphasis-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/flexbox-selection-expected.png b/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/flexbox-selection-expected.png
index 79ac221..879d484f 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/flexbox-selection-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/flexbox-selection-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/flexbox-selection-nested-expected.png b/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/flexbox-selection-nested-expected.png
index 44d5d94..f8d5d48 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/flexbox-selection-nested-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/flexbox-selection-nested-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/justified-selection-at-edge-expected.png b/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/justified-selection-at-edge-expected.png
index 5e6937a9..8e21e17 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/justified-selection-at-edge-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/justified-selection-at-edge-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/justified-selection-expected.png b/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/justified-selection-expected.png
index 2b5153fc..aeeb0b87 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/justified-selection-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/justified-selection-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/khmer-selection-expected.png b/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/khmer-selection-expected.png
index 605fee7a..6ae62e2 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/khmer-selection-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/khmer-selection-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/pre-wrap-overflow-selection-expected.png b/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/pre-wrap-overflow-selection-expected.png
index 500cb0a..e3fe54b 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/pre-wrap-overflow-selection-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/pre-wrap-overflow-selection-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/selection-hard-linebreak-expected.png b/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/selection-hard-linebreak-expected.png
index a7fe7ad0..12bc914 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/selection-hard-linebreak-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/selection-hard-linebreak-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/selection-multiple-runs-expected.png b/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/selection-multiple-runs-expected.png
index fd27934..fe7e6be 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/selection-multiple-runs-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/selection-multiple-runs-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/selection-painting-hidpi-expected.png b/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/selection-painting-hidpi-expected.png
index 8304abc..86063f77 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/selection-painting-hidpi-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/selection-painting-hidpi-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/selection-rect-line-height-too-big-expected.png b/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/selection-rect-line-height-too-big-expected.png
index 032e023..d2baf5d 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/selection-rect-line-height-too-big-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/selection-rect-line-height-too-big-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/selection-with-inline-padding-expected.png b/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/selection-with-inline-padding-expected.png
index 337cd4a..aae6e2f 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/selection-with-inline-padding-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/selection-with-inline-padding-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/shaping-selection-rect-expected.png b/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/shaping-selection-rect-expected.png
index e2d8bea2..c1b7927 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/shaping-selection-rect-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/shaping-selection-rect-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/should-use-atsui-expected.png b/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/should-use-atsui-expected.png
index 0099723e..0ae3d64e 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/should-use-atsui-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.10/fast/text/selection/should-use-atsui-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.11/editing/selection/inline-closest-leaf-child-expected.png b/third_party/blink/web_tests/platform/mac-mac10.11/editing/selection/inline-closest-leaf-child-expected.png
new file mode 100644
index 0000000..f78d3f0
--- /dev/null
+++ b/third_party/blink/web_tests/platform/mac-mac10.11/editing/selection/inline-closest-leaf-child-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.11/editing/selection/selection-button-text-expected.png b/third_party/blink/web_tests/platform/mac-mac10.11/editing/selection/selection-button-text-expected.png
index df95308..2d5fa6e 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.11/editing/selection/selection-button-text-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.11/editing/selection/selection-button-text-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.11/fast/text/selection/flexbox-selection-expected.png b/third_party/blink/web_tests/platform/mac-mac10.11/fast/text/selection/flexbox-selection-expected.png
index 04c8e35..30bd61f 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.11/fast/text/selection/flexbox-selection-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.11/fast/text/selection/flexbox-selection-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.11/fast/text/selection/flexbox-selection-nested-expected.png b/third_party/blink/web_tests/platform/mac-mac10.11/fast/text/selection/flexbox-selection-nested-expected.png
index a339dde..5103b0c 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.11/fast/text/selection/flexbox-selection-nested-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.11/fast/text/selection/flexbox-selection-nested-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.11/fast/text/selection/khmer-selection-expected.png b/third_party/blink/web_tests/platform/mac-mac10.11/fast/text/selection/khmer-selection-expected.png
index 8c4822c..bbca073 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.11/fast/text/selection/khmer-selection-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.11/fast/text/selection/khmer-selection-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.12/editing/selection/4402375-expected.png b/third_party/blink/web_tests/platform/mac-mac10.12/editing/selection/4402375-expected.png
index a83c82dc..38d5c6d3 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.12/editing/selection/4402375-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.12/editing/selection/4402375-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.12/editing/selection/dont-select-text-overflow-ellipsis-when-wrapping-ltr-mixed-expected.png b/third_party/blink/web_tests/platform/mac-mac10.12/editing/selection/dont-select-text-overflow-ellipsis-when-wrapping-ltr-mixed-expected.png
index 59afe6a..bde97c2 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.12/editing/selection/dont-select-text-overflow-ellipsis-when-wrapping-ltr-mixed-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.12/editing/selection/dont-select-text-overflow-ellipsis-when-wrapping-ltr-mixed-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.12/editing/selection/inline-closest-leaf-child-expected.png b/third_party/blink/web_tests/platform/mac-mac10.12/editing/selection/inline-closest-leaf-child-expected.png
new file mode 100644
index 0000000..2e646edc
--- /dev/null
+++ b/third_party/blink/web_tests/platform/mac-mac10.12/editing/selection/inline-closest-leaf-child-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.12/editing/selection/line-wrap-1-expected.png b/third_party/blink/web_tests/platform/mac-mac10.12/editing/selection/line-wrap-1-expected.png
deleted file mode 100644
index fc0c7d4..0000000
--- a/third_party/blink/web_tests/platform/mac-mac10.12/editing/selection/line-wrap-1-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.12/editing/selection/select-text-overflow-ellipsis-expected.png b/third_party/blink/web_tests/platform/mac-mac10.12/editing/selection/select-text-overflow-ellipsis-expected.png
index fe4e8a2..9b6b38bd 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.12/editing/selection/select-text-overflow-ellipsis-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.12/editing/selection/select-text-overflow-ellipsis-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.12/editing/selection/select-text-overflow-ellipsis-mixed-in-rtl-expected.png b/third_party/blink/web_tests/platform/mac-mac10.12/editing/selection/select-text-overflow-ellipsis-mixed-in-rtl-expected.png
index fe1f438..f415ab9 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.12/editing/selection/select-text-overflow-ellipsis-mixed-in-rtl-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.12/editing/selection/select-text-overflow-ellipsis-mixed-in-rtl-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.12/fast/backgrounds/selection-background-color-of-image-list-style-expected.png b/third_party/blink/web_tests/platform/mac-mac10.12/fast/backgrounds/selection-background-color-of-image-list-style-expected.png
deleted file mode 100644
index 9b3bcc3a..0000000
--- a/third_party/blink/web_tests/platform/mac-mac10.12/fast/backgrounds/selection-background-color-of-image-list-style-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/atsui-kerning-and-ligatures-expected.png b/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/atsui-kerning-and-ligatures-expected.png
index afa4382..d29fc46 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/atsui-kerning-and-ligatures-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/atsui-kerning-and-ligatures-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/atsui-rtl-override-selection-expected.png b/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/atsui-rtl-override-selection-expected.png
index 9497225..9fa0281 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/atsui-rtl-override-selection-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/atsui-rtl-override-selection-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/complex-text-rtl-selection-repaint-expected.png b/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/complex-text-rtl-selection-repaint-expected.png
index 20834f7..2166121 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/complex-text-rtl-selection-repaint-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/complex-text-rtl-selection-repaint-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/emphasis-expected.png b/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/emphasis-expected.png
index d20514de..4221713 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/emphasis-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/emphasis-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/justified-selection-at-edge-expected.png b/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/justified-selection-at-edge-expected.png
index 1a2013a5..02a9d8c 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/justified-selection-at-edge-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/justified-selection-at-edge-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/justified-selection-expected.png b/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/justified-selection-expected.png
index b6f3816f..35c8054 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/justified-selection-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/justified-selection-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/khmer-selection-expected.png b/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/khmer-selection-expected.png
index c45e38a..25e0c799 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/khmer-selection-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/khmer-selection-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/pre-wrap-overflow-selection-expected.png b/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/pre-wrap-overflow-selection-expected.png
index f2836ba..b5ed541 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/pre-wrap-overflow-selection-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/pre-wrap-overflow-selection-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/selection-hard-linebreak-expected.png b/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/selection-hard-linebreak-expected.png
index a1c575c..81b0873 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/selection-hard-linebreak-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/selection-hard-linebreak-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/selection-multiple-runs-expected.png b/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/selection-multiple-runs-expected.png
index 96b1cef..125fae3 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/selection-multiple-runs-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/selection-multiple-runs-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/selection-painting-hidpi-expected.png b/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/selection-painting-hidpi-expected.png
index f18695e0..f29e257 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/selection-painting-hidpi-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/selection-painting-hidpi-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/selection-rect-line-height-too-big-expected.png b/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/selection-rect-line-height-too-big-expected.png
index b00fd90..8b58d42 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/selection-rect-line-height-too-big-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/selection-rect-line-height-too-big-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/selection-with-inline-padding-expected.png b/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/selection-with-inline-padding-expected.png
index 088ca1ff..2b33ee0e 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/selection-with-inline-padding-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/selection-with-inline-padding-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/shaping-selection-rect-expected.png b/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/shaping-selection-rect-expected.png
index c1ca805..6adb842 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/shaping-selection-rect-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/shaping-selection-rect-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/should-use-atsui-expected.png b/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/should-use-atsui-expected.png
index b9d946d..a6f0cdb6 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/should-use-atsui-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.12/fast/text/selection/should-use-atsui-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.12/paint/invalidation/repaint-across-writing-mode-boundary-expected.png b/third_party/blink/web_tests/platform/mac-mac10.12/paint/invalidation/repaint-across-writing-mode-boundary-expected.png
index 335debf6..1380284 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.12/paint/invalidation/repaint-across-writing-mode-boundary-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.12/paint/invalidation/repaint-across-writing-mode-boundary-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.12/paint/invalidation/selection/text-selection-rect-in-overflow-2-expected.png b/third_party/blink/web_tests/platform/mac-mac10.12/paint/invalidation/selection/text-selection-rect-in-overflow-2-expected.png
deleted file mode 100644
index 060a48a2..0000000
--- a/third_party/blink/web_tests/platform/mac-mac10.12/paint/invalidation/selection/text-selection-rect-in-overflow-2-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.12/paint/markers/active-suggestion-marker-split-expected.png b/third_party/blink/web_tests/platform/mac-mac10.12/paint/markers/active-suggestion-marker-split-expected.png
index 6b609ef..40a4ad4 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.12/paint/markers/active-suggestion-marker-split-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.12/paint/markers/active-suggestion-marker-split-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.12/paint/markers/ellipsis-ltr-text-in-ltr-flow-with-markers-expected.png b/third_party/blink/web_tests/platform/mac-mac10.12/paint/markers/ellipsis-ltr-text-in-ltr-flow-with-markers-expected.png
index 5fd5f4f..681ef8d0 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.12/paint/markers/ellipsis-ltr-text-in-ltr-flow-with-markers-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.12/paint/markers/ellipsis-ltr-text-in-ltr-flow-with-markers-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.12/paint/markers/ellipsis-ltr-text-in-rtl-flow-with-markers-expected.png b/third_party/blink/web_tests/platform/mac-mac10.12/paint/markers/ellipsis-ltr-text-in-rtl-flow-with-markers-expected.png
index 2f797b6..0ad476f1 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.12/paint/markers/ellipsis-ltr-text-in-rtl-flow-with-markers-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.12/paint/markers/ellipsis-ltr-text-in-rtl-flow-with-markers-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.12/paint/markers/ellipsis-rtl-text-in-ltr-flow-with-markers-expected.png b/third_party/blink/web_tests/platform/mac-mac10.12/paint/markers/ellipsis-rtl-text-in-ltr-flow-with-markers-expected.png
index b433caa..9a8e06e 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.12/paint/markers/ellipsis-rtl-text-in-ltr-flow-with-markers-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.12/paint/markers/ellipsis-rtl-text-in-ltr-flow-with-markers-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.12/paint/markers/ellipsis-rtl-text-in-rtl-flow-with-markers-expected.png b/third_party/blink/web_tests/platform/mac-mac10.12/paint/markers/ellipsis-rtl-text-in-rtl-flow-with-markers-expected.png
index 09b019bb..6d53405 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.12/paint/markers/ellipsis-rtl-text-in-rtl-flow-with-markers-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.12/paint/markers/ellipsis-rtl-text-in-rtl-flow-with-markers-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.12/svg/custom/text-match-highlight-expected.png b/third_party/blink/web_tests/platform/mac-mac10.12/svg/custom/text-match-highlight-expected.png
index caae30ce..0e857ef 100644
--- a/third_party/blink/web_tests/platform/mac-mac10.12/svg/custom/text-match-highlight-expected.png
+++ b/third_party/blink/web_tests/platform/mac-mac10.12/svg/custom/text-match-highlight-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-retina/editing/selection/4402375-expected.png b/third_party/blink/web_tests/platform/mac-retina/editing/selection/4402375-expected.png
index a83c82dc..38d5c6d3 100644
--- a/third_party/blink/web_tests/platform/mac-retina/editing/selection/4402375-expected.png
+++ b/third_party/blink/web_tests/platform/mac-retina/editing/selection/4402375-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-retina/editing/selection/dont-select-text-overflow-ellipsis-when-wrapping-ltr-mixed-expected.png b/third_party/blink/web_tests/platform/mac-retina/editing/selection/dont-select-text-overflow-ellipsis-when-wrapping-ltr-mixed-expected.png
index 59afe6a..bde97c2 100644
--- a/third_party/blink/web_tests/platform/mac-retina/editing/selection/dont-select-text-overflow-ellipsis-when-wrapping-ltr-mixed-expected.png
+++ b/third_party/blink/web_tests/platform/mac-retina/editing/selection/dont-select-text-overflow-ellipsis-when-wrapping-ltr-mixed-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-retina/editing/selection/line-wrap-1-expected.png b/third_party/blink/web_tests/platform/mac-retina/editing/selection/line-wrap-1-expected.png
deleted file mode 100644
index fc0c7d4..0000000
--- a/third_party/blink/web_tests/platform/mac-retina/editing/selection/line-wrap-1-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-retina/editing/selection/select-text-overflow-ellipsis-expected.png b/third_party/blink/web_tests/platform/mac-retina/editing/selection/select-text-overflow-ellipsis-expected.png
index fe4e8a2..9b6b38bd 100644
--- a/third_party/blink/web_tests/platform/mac-retina/editing/selection/select-text-overflow-ellipsis-expected.png
+++ b/third_party/blink/web_tests/platform/mac-retina/editing/selection/select-text-overflow-ellipsis-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-retina/editing/selection/select-text-overflow-ellipsis-mixed-in-rtl-expected.png b/third_party/blink/web_tests/platform/mac-retina/editing/selection/select-text-overflow-ellipsis-mixed-in-rtl-expected.png
index fe1f438..f415ab9 100644
--- a/third_party/blink/web_tests/platform/mac-retina/editing/selection/select-text-overflow-ellipsis-mixed-in-rtl-expected.png
+++ b/third_party/blink/web_tests/platform/mac-retina/editing/selection/select-text-overflow-ellipsis-mixed-in-rtl-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-retina/fast/backgrounds/selection-background-color-of-image-list-style-expected.png b/third_party/blink/web_tests/platform/mac-retina/fast/backgrounds/selection-background-color-of-image-list-style-expected.png
deleted file mode 100644
index 9b3bcc3a..0000000
--- a/third_party/blink/web_tests/platform/mac-retina/fast/backgrounds/selection-background-color-of-image-list-style-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-retina/fast/text/selection/complex-text-rtl-selection-repaint-expected.png b/third_party/blink/web_tests/platform/mac-retina/fast/text/selection/complex-text-rtl-selection-repaint-expected.png
deleted file mode 100644
index acb5329..0000000
--- a/third_party/blink/web_tests/platform/mac-retina/fast/text/selection/complex-text-rtl-selection-repaint-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-retina/fast/text/selection/selection-hard-linebreak-expected.png b/third_party/blink/web_tests/platform/mac-retina/fast/text/selection/selection-hard-linebreak-expected.png
index 6f61a82..348e6939 100644
--- a/third_party/blink/web_tests/platform/mac-retina/fast/text/selection/selection-hard-linebreak-expected.png
+++ b/third_party/blink/web_tests/platform/mac-retina/fast/text/selection/selection-hard-linebreak-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-retina/fast/text/selection/selection-rect-line-height-too-big-expected.png b/third_party/blink/web_tests/platform/mac-retina/fast/text/selection/selection-rect-line-height-too-big-expected.png
index 32648f5..f468f7c 100644
--- a/third_party/blink/web_tests/platform/mac-retina/fast/text/selection/selection-rect-line-height-too-big-expected.png
+++ b/third_party/blink/web_tests/platform/mac-retina/fast/text/selection/selection-rect-line-height-too-big-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-retina/paint/invalidation/repaint-across-writing-mode-boundary-expected.png b/third_party/blink/web_tests/platform/mac-retina/paint/invalidation/repaint-across-writing-mode-boundary-expected.png
index 335debf6..1380284 100644
--- a/third_party/blink/web_tests/platform/mac-retina/paint/invalidation/repaint-across-writing-mode-boundary-expected.png
+++ b/third_party/blink/web_tests/platform/mac-retina/paint/invalidation/repaint-across-writing-mode-boundary-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-retina/paint/invalidation/selection/text-selection-rect-in-overflow-2-expected.png b/third_party/blink/web_tests/platform/mac-retina/paint/invalidation/selection/text-selection-rect-in-overflow-2-expected.png
deleted file mode 100644
index 060a48a2..0000000
--- a/third_party/blink/web_tests/platform/mac-retina/paint/invalidation/selection/text-selection-rect-in-overflow-2-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-retina/paint/markers/active-suggestion-marker-split-expected.png b/third_party/blink/web_tests/platform/mac-retina/paint/markers/active-suggestion-marker-split-expected.png
index 6b609ef..40a4ad4 100644
--- a/third_party/blink/web_tests/platform/mac-retina/paint/markers/active-suggestion-marker-split-expected.png
+++ b/third_party/blink/web_tests/platform/mac-retina/paint/markers/active-suggestion-marker-split-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-retina/paint/markers/ellipsis-ltr-text-in-ltr-flow-with-markers-expected.png b/third_party/blink/web_tests/platform/mac-retina/paint/markers/ellipsis-ltr-text-in-ltr-flow-with-markers-expected.png
index 5fd5f4f..681ef8d0 100644
--- a/third_party/blink/web_tests/platform/mac-retina/paint/markers/ellipsis-ltr-text-in-ltr-flow-with-markers-expected.png
+++ b/third_party/blink/web_tests/platform/mac-retina/paint/markers/ellipsis-ltr-text-in-ltr-flow-with-markers-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-retina/paint/markers/ellipsis-ltr-text-in-rtl-flow-with-markers-expected.png b/third_party/blink/web_tests/platform/mac-retina/paint/markers/ellipsis-ltr-text-in-rtl-flow-with-markers-expected.png
index 2f797b6..0ad476f1 100644
--- a/third_party/blink/web_tests/platform/mac-retina/paint/markers/ellipsis-ltr-text-in-rtl-flow-with-markers-expected.png
+++ b/third_party/blink/web_tests/platform/mac-retina/paint/markers/ellipsis-ltr-text-in-rtl-flow-with-markers-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-retina/paint/markers/ellipsis-mixed-text-in-ltr-flow-with-markers-expected.png b/third_party/blink/web_tests/platform/mac-retina/paint/markers/ellipsis-mixed-text-in-ltr-flow-with-markers-expected.png
new file mode 100644
index 0000000..a3cc1a7
--- /dev/null
+++ b/third_party/blink/web_tests/platform/mac-retina/paint/markers/ellipsis-mixed-text-in-ltr-flow-with-markers-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-retina/paint/markers/ellipsis-rtl-text-in-ltr-flow-with-markers-expected.png b/third_party/blink/web_tests/platform/mac-retina/paint/markers/ellipsis-rtl-text-in-ltr-flow-with-markers-expected.png
index b433caa..9a8e06e 100644
--- a/third_party/blink/web_tests/platform/mac-retina/paint/markers/ellipsis-rtl-text-in-ltr-flow-with-markers-expected.png
+++ b/third_party/blink/web_tests/platform/mac-retina/paint/markers/ellipsis-rtl-text-in-ltr-flow-with-markers-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-retina/paint/markers/ellipsis-rtl-text-in-rtl-flow-with-markers-expected.png b/third_party/blink/web_tests/platform/mac-retina/paint/markers/ellipsis-rtl-text-in-rtl-flow-with-markers-expected.png
index 09b019bb..6d53405 100644
--- a/third_party/blink/web_tests/platform/mac-retina/paint/markers/ellipsis-rtl-text-in-rtl-flow-with-markers-expected.png
+++ b/third_party/blink/web_tests/platform/mac-retina/paint/markers/ellipsis-rtl-text-in-rtl-flow-with-markers-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-retina/svg/custom/text-match-highlight-expected.png b/third_party/blink/web_tests/platform/mac-retina/svg/custom/text-match-highlight-expected.png
index caae30ce..0e857ef 100644
--- a/third_party/blink/web_tests/platform/mac-retina/svg/custom/text-match-highlight-expected.png
+++ b/third_party/blink/web_tests/platform/mac-retina/svg/custom/text-match-highlight-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/compositing/squashing/selection-repaint-with-gaps-expected.png b/third_party/blink/web_tests/platform/mac/compositing/squashing/selection-repaint-with-gaps-expected.png
index 604a6ae..8882796 100644
--- a/third_party/blink/web_tests/platform/mac/compositing/squashing/selection-repaint-with-gaps-expected.png
+++ b/third_party/blink/web_tests/platform/mac/compositing/squashing/selection-repaint-with-gaps-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/editing/execCommand/findString-2-expected.png b/third_party/blink/web_tests/platform/mac/editing/execCommand/findString-2-expected.png
index f7083fdca..cf6ad462 100644
--- a/third_party/blink/web_tests/platform/mac/editing/execCommand/findString-2-expected.png
+++ b/third_party/blink/web_tests/platform/mac/editing/execCommand/findString-2-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/editing/selection/display-table-text-expected.png b/third_party/blink/web_tests/platform/mac/editing/selection/display-table-text-expected.png
index 4e4198c..cb37510 100644
--- a/third_party/blink/web_tests/platform/mac/editing/selection/display-table-text-expected.png
+++ b/third_party/blink/web_tests/platform/mac/editing/selection/display-table-text-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/editing/selection/dont-select-text-overflow-ellipsis-when-wrapping-expected.png b/third_party/blink/web_tests/platform/mac/editing/selection/dont-select-text-overflow-ellipsis-when-wrapping-expected.png
index 1a9af73..1550ca8 100644
--- a/third_party/blink/web_tests/platform/mac/editing/selection/dont-select-text-overflow-ellipsis-when-wrapping-expected.png
+++ b/third_party/blink/web_tests/platform/mac/editing/selection/dont-select-text-overflow-ellipsis-when-wrapping-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/editing/selection/dont-select-text-overflow-ellipsis-when-wrapping-rtl-expected.png b/third_party/blink/web_tests/platform/mac/editing/selection/dont-select-text-overflow-ellipsis-when-wrapping-rtl-expected.png
index 5fba727..f4730e8 100644
--- a/third_party/blink/web_tests/platform/mac/editing/selection/dont-select-text-overflow-ellipsis-when-wrapping-rtl-expected.png
+++ b/third_party/blink/web_tests/platform/mac/editing/selection/dont-select-text-overflow-ellipsis-when-wrapping-rtl-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/editing/selection/dont-select-text-overflow-ellipsis-when-wrapping-rtl-mixed-expected.png b/third_party/blink/web_tests/platform/mac/editing/selection/dont-select-text-overflow-ellipsis-when-wrapping-rtl-mixed-expected.png
index c287836..98bd0c788 100644
--- a/third_party/blink/web_tests/platform/mac/editing/selection/dont-select-text-overflow-ellipsis-when-wrapping-rtl-mixed-expected.png
+++ b/third_party/blink/web_tests/platform/mac/editing/selection/dont-select-text-overflow-ellipsis-when-wrapping-rtl-mixed-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/editing/selection/inline-closest-leaf-child-expected.png b/third_party/blink/web_tests/platform/mac/editing/selection/inline-closest-leaf-child-expected.png
index 1e727e5..f78d3f0 100644
--- a/third_party/blink/web_tests/platform/mac/editing/selection/inline-closest-leaf-child-expected.png
+++ b/third_party/blink/web_tests/platform/mac/editing/selection/inline-closest-leaf-child-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/editing/selection/japanese-lr-selection-expected.png b/third_party/blink/web_tests/platform/mac/editing/selection/japanese-lr-selection-expected.png
index 8d30d31..4e9f95d3 100644
--- a/third_party/blink/web_tests/platform/mac/editing/selection/japanese-lr-selection-expected.png
+++ b/third_party/blink/web_tests/platform/mac/editing/selection/japanese-lr-selection-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/editing/selection/japanese-rl-selection-expected.png b/third_party/blink/web_tests/platform/mac/editing/selection/japanese-rl-selection-expected.png
index 8232374..af4d99c1 100644
--- a/third_party/blink/web_tests/platform/mac/editing/selection/japanese-rl-selection-expected.png
+++ b/third_party/blink/web_tests/platform/mac/editing/selection/japanese-rl-selection-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/editing/selection/line-wrap-2-expected.png b/third_party/blink/web_tests/platform/mac/editing/selection/line-wrap-2-expected.png
index 7efe095..b0e106b 100644
--- a/third_party/blink/web_tests/platform/mac/editing/selection/line-wrap-2-expected.png
+++ b/third_party/blink/web_tests/platform/mac/editing/selection/line-wrap-2-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/editing/selection/range-between-block-and-inline-expected.png b/third_party/blink/web_tests/platform/mac/editing/selection/range-between-block-and-inline-expected.png
index 4e53d9f..e501399 100644
--- a/third_party/blink/web_tests/platform/mac/editing/selection/range-between-block-and-inline-expected.png
+++ b/third_party/blink/web_tests/platform/mac/editing/selection/range-between-block-and-inline-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/editing/selection/select-text-overflow-ellipsis-mixed-in-ltr-2-expected.png b/third_party/blink/web_tests/platform/mac/editing/selection/select-text-overflow-ellipsis-mixed-in-ltr-2-expected.png
index 97d92ba..20cdac0 100644
--- a/third_party/blink/web_tests/platform/mac/editing/selection/select-text-overflow-ellipsis-mixed-in-ltr-2-expected.png
+++ b/third_party/blink/web_tests/platform/mac/editing/selection/select-text-overflow-ellipsis-mixed-in-ltr-2-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/editing/selection/select-text-overflow-ellipsis-mixed-in-ltr-expected.png b/third_party/blink/web_tests/platform/mac/editing/selection/select-text-overflow-ellipsis-mixed-in-ltr-expected.png
index c19d4c2..ec6f2a5d69 100644
--- a/third_party/blink/web_tests/platform/mac/editing/selection/select-text-overflow-ellipsis-mixed-in-ltr-expected.png
+++ b/third_party/blink/web_tests/platform/mac/editing/selection/select-text-overflow-ellipsis-mixed-in-ltr-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/editing/selection/select-text-overflow-ellipsis-mixed-in-rtl-2-expected.png b/third_party/blink/web_tests/platform/mac/editing/selection/select-text-overflow-ellipsis-mixed-in-rtl-2-expected.png
index 21009e0..c264cde 100644
--- a/third_party/blink/web_tests/platform/mac/editing/selection/select-text-overflow-ellipsis-mixed-in-rtl-2-expected.png
+++ b/third_party/blink/web_tests/platform/mac/editing/selection/select-text-overflow-ellipsis-mixed-in-rtl-2-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/editing/selection/selection-background-expected.png b/third_party/blink/web_tests/platform/mac/editing/selection/selection-background-expected.png
index 1c9335a..983d5d4 100644
--- a/third_party/blink/web_tests/platform/mac/editing/selection/selection-background-expected.png
+++ b/third_party/blink/web_tests/platform/mac/editing/selection/selection-background-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/editing/selection/selection-button-text-expected.png b/third_party/blink/web_tests/platform/mac/editing/selection/selection-button-text-expected.png
index f7f70815..43d10d26 100644
--- a/third_party/blink/web_tests/platform/mac/editing/selection/selection-button-text-expected.png
+++ b/third_party/blink/web_tests/platform/mac/editing/selection/selection-button-text-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/editing/selection/transformed-selection-rects-expected.png b/third_party/blink/web_tests/platform/mac/editing/selection/transformed-selection-rects-expected.png
index f5f1441e..e0695552 100644
--- a/third_party/blink/web_tests/platform/mac/editing/selection/transformed-selection-rects-expected.png
+++ b/third_party/blink/web_tests/platform/mac/editing/selection/transformed-selection-rects-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/editing/selection/vertical-lr-replaced-selection-expected.png b/third_party/blink/web_tests/platform/mac/editing/selection/vertical-lr-replaced-selection-expected.png
index 24ef8e5..a101de93 100644
--- a/third_party/blink/web_tests/platform/mac/editing/selection/vertical-lr-replaced-selection-expected.png
+++ b/third_party/blink/web_tests/platform/mac/editing/selection/vertical-lr-replaced-selection-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/editing/selection/vertical-rl-replaced-selection-expected.png b/third_party/blink/web_tests/platform/mac/editing/selection/vertical-rl-replaced-selection-expected.png
index 2fbb01b4..a17d7613 100644
--- a/third_party/blink/web_tests/platform/mac/editing/selection/vertical-rl-replaced-selection-expected.png
+++ b/third_party/blink/web_tests/platform/mac/editing/selection/vertical-rl-replaced-selection-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/fast/backgrounds/selection-background-color-of-list-style-expected.png b/third_party/blink/web_tests/platform/mac/fast/backgrounds/selection-background-color-of-list-style-expected.png
index 063ea449..3b610ec 100644
--- a/third_party/blink/web_tests/platform/mac/fast/backgrounds/selection-background-color-of-list-style-expected.png
+++ b/third_party/blink/web_tests/platform/mac/fast/backgrounds/selection-background-color-of-list-style-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/fast/dynamic/selection-highlight-adjust-expected.png b/third_party/blink/web_tests/platform/mac/fast/dynamic/selection-highlight-adjust-expected.png
index 826fc112..023f382d 100644
--- a/third_party/blink/web_tests/platform/mac/fast/dynamic/selection-highlight-adjust-expected.png
+++ b/third_party/blink/web_tests/platform/mac/fast/dynamic/selection-highlight-adjust-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/fast/events/updateLayoutForHitTest-expected.png b/third_party/blink/web_tests/platform/mac/fast/events/updateLayoutForHitTest-expected.png
index 39cdb0c7..a71901a 100644
--- a/third_party/blink/web_tests/platform/mac/fast/events/updateLayoutForHitTest-expected.png
+++ b/third_party/blink/web_tests/platform/mac/fast/events/updateLayoutForHitTest-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/fast/lists/markers-in-selection-expected.png b/third_party/blink/web_tests/platform/mac/fast/lists/markers-in-selection-expected.png
index 8e1824b1..cbd88de6 100644
--- a/third_party/blink/web_tests/platform/mac/fast/lists/markers-in-selection-expected.png
+++ b/third_party/blink/web_tests/platform/mac/fast/lists/markers-in-selection-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/fast/overflow/image-selection-highlight-expected.png b/third_party/blink/web_tests/platform/mac/fast/overflow/image-selection-highlight-expected.png
index fe535e0..a98c5ad 100644
--- a/third_party/blink/web_tests/platform/mac/fast/overflow/image-selection-highlight-expected.png
+++ b/third_party/blink/web_tests/platform/mac/fast/overflow/image-selection-highlight-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/fast/reflections/inline-crash-expected.png b/third_party/blink/web_tests/platform/mac/fast/reflections/inline-crash-expected.png
index 31facded..c4d23571 100644
--- a/third_party/blink/web_tests/platform/mac/fast/reflections/inline-crash-expected.png
+++ b/third_party/blink/web_tests/platform/mac/fast/reflections/inline-crash-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/fast/selectors/159-expected.png b/third_party/blink/web_tests/platform/mac/fast/selectors/159-expected.png
index 6593e68..60c057f 100644
--- a/third_party/blink/web_tests/platform/mac/fast/selectors/159-expected.png
+++ b/third_party/blink/web_tests/platform/mac/fast/selectors/159-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/fast/selectors/177a-expected.png b/third_party/blink/web_tests/platform/mac/fast/selectors/177a-expected.png
index 691cd8f9..069c370 100644
--- a/third_party/blink/web_tests/platform/mac/fast/selectors/177a-expected.png
+++ b/third_party/blink/web_tests/platform/mac/fast/selectors/177a-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/fast/text/selection/atsui-kerning-and-ligatures-expected.png b/third_party/blink/web_tests/platform/mac/fast/text/selection/atsui-kerning-and-ligatures-expected.png
index 7750302..bffa254 100644
--- a/third_party/blink/web_tests/platform/mac/fast/text/selection/atsui-kerning-and-ligatures-expected.png
+++ b/third_party/blink/web_tests/platform/mac/fast/text/selection/atsui-kerning-and-ligatures-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/fast/text/selection/atsui-rtl-override-selection-expected.png b/third_party/blink/web_tests/platform/mac/fast/text/selection/atsui-rtl-override-selection-expected.png
index 0408d04..94c2fbd 100644
--- a/third_party/blink/web_tests/platform/mac/fast/text/selection/atsui-rtl-override-selection-expected.png
+++ b/third_party/blink/web_tests/platform/mac/fast/text/selection/atsui-rtl-override-selection-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/fast/text/selection/emphasis-expected.png b/third_party/blink/web_tests/platform/mac/fast/text/selection/emphasis-expected.png
index 155e413..7a1ca8c 100644
--- a/third_party/blink/web_tests/platform/mac/fast/text/selection/emphasis-expected.png
+++ b/third_party/blink/web_tests/platform/mac/fast/text/selection/emphasis-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/fast/text/selection/flexbox-selection-expected.png b/third_party/blink/web_tests/platform/mac/fast/text/selection/flexbox-selection-expected.png
index a7b4f0b..3ee3c31 100644
--- a/third_party/blink/web_tests/platform/mac/fast/text/selection/flexbox-selection-expected.png
+++ b/third_party/blink/web_tests/platform/mac/fast/text/selection/flexbox-selection-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/fast/text/selection/flexbox-selection-nested-expected.png b/third_party/blink/web_tests/platform/mac/fast/text/selection/flexbox-selection-nested-expected.png
index 595d7481..b64ac52 100644
--- a/third_party/blink/web_tests/platform/mac/fast/text/selection/flexbox-selection-nested-expected.png
+++ b/third_party/blink/web_tests/platform/mac/fast/text/selection/flexbox-selection-nested-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/fast/text/selection/justified-selection-at-edge-expected.png b/third_party/blink/web_tests/platform/mac/fast/text/selection/justified-selection-at-edge-expected.png
index 5d8d877..f2b9235 100644
--- a/third_party/blink/web_tests/platform/mac/fast/text/selection/justified-selection-at-edge-expected.png
+++ b/third_party/blink/web_tests/platform/mac/fast/text/selection/justified-selection-at-edge-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/fast/text/selection/justified-selection-expected.png b/third_party/blink/web_tests/platform/mac/fast/text/selection/justified-selection-expected.png
index ea532d1..c766e48c 100644
--- a/third_party/blink/web_tests/platform/mac/fast/text/selection/justified-selection-expected.png
+++ b/third_party/blink/web_tests/platform/mac/fast/text/selection/justified-selection-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/fast/text/selection/khmer-selection-expected.png b/third_party/blink/web_tests/platform/mac/fast/text/selection/khmer-selection-expected.png
index ddff76dd..89a1690e 100644
--- a/third_party/blink/web_tests/platform/mac/fast/text/selection/khmer-selection-expected.png
+++ b/third_party/blink/web_tests/platform/mac/fast/text/selection/khmer-selection-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/fast/text/selection/pre-wrap-overflow-selection-expected.png b/third_party/blink/web_tests/platform/mac/fast/text/selection/pre-wrap-overflow-selection-expected.png
index 0757625..b07897fe 100644
--- a/third_party/blink/web_tests/platform/mac/fast/text/selection/pre-wrap-overflow-selection-expected.png
+++ b/third_party/blink/web_tests/platform/mac/fast/text/selection/pre-wrap-overflow-selection-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/fast/text/selection/selection-multiple-runs-expected.png b/third_party/blink/web_tests/platform/mac/fast/text/selection/selection-multiple-runs-expected.png
index 327cfe80..b2d07b4b 100644
--- a/third_party/blink/web_tests/platform/mac/fast/text/selection/selection-multiple-runs-expected.png
+++ b/third_party/blink/web_tests/platform/mac/fast/text/selection/selection-multiple-runs-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/fast/text/selection/selection-painting-hidpi-expected.png b/third_party/blink/web_tests/platform/mac/fast/text/selection/selection-painting-hidpi-expected.png
index 63c8a5d..d18af0e7 100644
--- a/third_party/blink/web_tests/platform/mac/fast/text/selection/selection-painting-hidpi-expected.png
+++ b/third_party/blink/web_tests/platform/mac/fast/text/selection/selection-painting-hidpi-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/fast/text/selection/selection-rect-rounding-expected.png b/third_party/blink/web_tests/platform/mac/fast/text/selection/selection-rect-rounding-expected.png
index 4034b86..d6db1663 100644
--- a/third_party/blink/web_tests/platform/mac/fast/text/selection/selection-rect-rounding-expected.png
+++ b/third_party/blink/web_tests/platform/mac/fast/text/selection/selection-rect-rounding-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/fast/text/selection/selection-with-inline-padding-expected.png b/third_party/blink/web_tests/platform/mac/fast/text/selection/selection-with-inline-padding-expected.png
index f3ac94f..15e1ecf 100644
--- a/third_party/blink/web_tests/platform/mac/fast/text/selection/selection-with-inline-padding-expected.png
+++ b/third_party/blink/web_tests/platform/mac/fast/text/selection/selection-with-inline-padding-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/fast/text/selection/shaping-selection-rect-expected.png b/third_party/blink/web_tests/platform/mac/fast/text/selection/shaping-selection-rect-expected.png
index c643ac683f4..c7faa77 100644
--- a/third_party/blink/web_tests/platform/mac/fast/text/selection/shaping-selection-rect-expected.png
+++ b/third_party/blink/web_tests/platform/mac/fast/text/selection/shaping-selection-rect-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/fast/text/selection/should-use-atsui-expected.png b/third_party/blink/web_tests/platform/mac/fast/text/selection/should-use-atsui-expected.png
index 382ad5d2..5265d5bc 100644
--- a/third_party/blink/web_tests/platform/mac/fast/text/selection/should-use-atsui-expected.png
+++ b/third_party/blink/web_tests/platform/mac/fast/text/selection/should-use-atsui-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/paint/invalidation/compositing/text-match-highlight-expected.png b/third_party/blink/web_tests/platform/mac/paint/invalidation/compositing/text-match-highlight-expected.png
index 15299c87..f6e9a8f 100644
--- a/third_party/blink/web_tests/platform/mac/paint/invalidation/compositing/text-match-highlight-expected.png
+++ b/third_party/blink/web_tests/platform/mac/paint/invalidation/compositing/text-match-highlight-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/paint/invalidation/selection/selection-partial-invalidation-between-blocks-expected.png b/third_party/blink/web_tests/platform/mac/paint/invalidation/selection/selection-partial-invalidation-between-blocks-expected.png
index c131f3e..83d39a1 100644
--- a/third_party/blink/web_tests/platform/mac/paint/invalidation/selection/selection-partial-invalidation-between-blocks-expected.png
+++ b/third_party/blink/web_tests/platform/mac/paint/invalidation/selection/selection-partial-invalidation-between-blocks-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/paint/invalidation/selection/selection-rl-expected.png b/third_party/blink/web_tests/platform/mac/paint/invalidation/selection/selection-rl-expected.png
index d1c95d5..7ff1834 100644
--- a/third_party/blink/web_tests/platform/mac/paint/invalidation/selection/selection-rl-expected.png
+++ b/third_party/blink/web_tests/platform/mac/paint/invalidation/selection/selection-rl-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/paint/invalidation/selection/selection-within-composited-scroller-expected.png b/third_party/blink/web_tests/platform/mac/paint/invalidation/selection/selection-within-composited-scroller-expected.png
index bba89c95..0b127b8 100644
--- a/third_party/blink/web_tests/platform/mac/paint/invalidation/selection/selection-within-composited-scroller-expected.png
+++ b/third_party/blink/web_tests/platform/mac/paint/invalidation/selection/selection-within-composited-scroller-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/paint/markers/active-suggestion-marker-basic-expected.png b/third_party/blink/web_tests/platform/mac/paint/markers/active-suggestion-marker-basic-expected.png
index e2e48ce..a2e12a9 100644
--- a/third_party/blink/web_tests/platform/mac/paint/markers/active-suggestion-marker-basic-expected.png
+++ b/third_party/blink/web_tests/platform/mac/paint/markers/active-suggestion-marker-basic-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/paint/markers/composition-marker-basic-expected.png b/third_party/blink/web_tests/platform/mac/paint/markers/composition-marker-basic-expected.png
index e2e48ce..a2e12a9 100644
--- a/third_party/blink/web_tests/platform/mac/paint/markers/composition-marker-basic-expected.png
+++ b/third_party/blink/web_tests/platform/mac/paint/markers/composition-marker-basic-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/paint/markers/composition-marker-split-expected.png b/third_party/blink/web_tests/platform/mac/paint/markers/composition-marker-split-expected.png
index 6b609ef..40a4ad4 100644
--- a/third_party/blink/web_tests/platform/mac/paint/markers/composition-marker-split-expected.png
+++ b/third_party/blink/web_tests/platform/mac/paint/markers/composition-marker-split-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/paint/markers/ellipsis-mixed-text-in-ltr-flow-with-markers-expected.png b/third_party/blink/web_tests/platform/mac/paint/markers/ellipsis-mixed-text-in-ltr-flow-with-markers-expected.png
index 217b1dc..6a5e464 100644
--- a/third_party/blink/web_tests/platform/mac/paint/markers/ellipsis-mixed-text-in-ltr-flow-with-markers-expected.png
+++ b/third_party/blink/web_tests/platform/mac/paint/markers/ellipsis-mixed-text-in-ltr-flow-with-markers-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/paint/markers/ellipsis-mixed-text-in-rtl-flow-with-markers-expected.png b/third_party/blink/web_tests/platform/mac/paint/markers/ellipsis-mixed-text-in-rtl-flow-with-markers-expected.png
index 06e553b..cdbefeb 100644
--- a/third_party/blink/web_tests/platform/mac/paint/markers/ellipsis-mixed-text-in-rtl-flow-with-markers-expected.png
+++ b/third_party/blink/web_tests/platform/mac/paint/markers/ellipsis-mixed-text-in-rtl-flow-with-markers-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/paint/markers/first-letter-expected.png b/third_party/blink/web_tests/platform/mac/paint/markers/first-letter-expected.png
index 9291c2a..25cb316 100644
--- a/third_party/blink/web_tests/platform/mac/paint/markers/first-letter-expected.png
+++ b/third_party/blink/web_tests/platform/mac/paint/markers/first-letter-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/paint/markers/marker-early-break-bug-expected.png b/third_party/blink/web_tests/platform/mac/paint/markers/marker-early-break-bug-expected.png
index 8ee2fbb..2375e2bc 100644
--- a/third_party/blink/web_tests/platform/mac/paint/markers/marker-early-break-bug-expected.png
+++ b/third_party/blink/web_tests/platform/mac/paint/markers/marker-early-break-bug-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/paint/markers/markers-zoomed-expected.png b/third_party/blink/web_tests/platform/mac/paint/markers/markers-zoomed-expected.png
index 3647731..0f170e10 100644
--- a/third_party/blink/web_tests/platform/mac/paint/markers/markers-zoomed-expected.png
+++ b/third_party/blink/web_tests/platform/mac/paint/markers/markers-zoomed-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/paint/markers/vertical-lr-expected.png b/third_party/blink/web_tests/platform/mac/paint/markers/vertical-lr-expected.png
index 8ab1a0dd..d89de670 100644
--- a/third_party/blink/web_tests/platform/mac/paint/markers/vertical-lr-expected.png
+++ b/third_party/blink/web_tests/platform/mac/paint/markers/vertical-lr-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/paint/markers/vertical-rl-expected.png b/third_party/blink/web_tests/platform/mac/paint/markers/vertical-rl-expected.png
index d23b3f1..3f159cb 100644
--- a/third_party/blink/web_tests/platform/mac/paint/markers/vertical-rl-expected.png
+++ b/third_party/blink/web_tests/platform/mac/paint/markers/vertical-rl-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/paint/selection/text-selection-newline-clipped-by-overflow-expected.png b/third_party/blink/web_tests/platform/mac/paint/selection/text-selection-newline-clipped-by-overflow-expected.png
index 920c96f4..f59fc78b 100644
--- a/third_party/blink/web_tests/platform/mac/paint/selection/text-selection-newline-clipped-by-overflow-expected.png
+++ b/third_party/blink/web_tests/platform/mac/paint/selection/text-selection-newline-clipped-by-overflow-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/paint/selection/text-selection-newline-mixed-ltr-rtl-expected.png b/third_party/blink/web_tests/platform/mac/paint/selection/text-selection-newline-mixed-ltr-rtl-expected.png
index e6e92ca..44e9881 100644
--- a/third_party/blink/web_tests/platform/mac/paint/selection/text-selection-newline-mixed-ltr-rtl-expected.png
+++ b/third_party/blink/web_tests/platform/mac/paint/selection/text-selection-newline-mixed-ltr-rtl-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/paint/selection/text-selection-newline-rtl-double-linebreak-expected.png b/third_party/blink/web_tests/platform/mac/paint/selection/text-selection-newline-rtl-double-linebreak-expected.png
index e5188d3..db590324 100644
--- a/third_party/blink/web_tests/platform/mac/paint/selection/text-selection-newline-rtl-double-linebreak-expected.png
+++ b/third_party/blink/web_tests/platform/mac/paint/selection/text-selection-newline-rtl-double-linebreak-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/paint/text/selection-no-clip-text-expected.png b/third_party/blink/web_tests/platform/mac/paint/text/selection-no-clip-text-expected.png
index b78d1c2e..50ebdd3 100644
--- a/third_party/blink/web_tests/platform/mac/paint/text/selection-no-clip-text-expected.png
+++ b/third_party/blink/web_tests/platform/mac/paint/text/selection-no-clip-text-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/svg/text/foreignObject-text-clipping-bug-expected.png b/third_party/blink/web_tests/platform/mac/svg/text/foreignObject-text-clipping-bug-expected.png
index a2ac6846..1732609 100644
--- a/third_party/blink/web_tests/platform/mac/svg/text/foreignObject-text-clipping-bug-expected.png
+++ b/third_party/blink/web_tests/platform/mac/svg/text/foreignObject-text-clipping-bug-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/fast/text/selection/atsui-kerning-and-ligatures-expected.png b/third_party/blink/web_tests/platform/win/fast/text/selection/atsui-kerning-and-ligatures-expected.png
index 8a18eb8d..1ec24b3d 100644
--- a/third_party/blink/web_tests/platform/win/fast/text/selection/atsui-kerning-and-ligatures-expected.png
+++ b/third_party/blink/web_tests/platform/win/fast/text/selection/atsui-kerning-and-ligatures-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/fast/text/selection/atsui-rtl-override-selection-expected.png b/third_party/blink/web_tests/platform/win/fast/text/selection/atsui-rtl-override-selection-expected.png
index b1aa5a23..266230d 100644
--- a/third_party/blink/web_tests/platform/win/fast/text/selection/atsui-rtl-override-selection-expected.png
+++ b/third_party/blink/web_tests/platform/win/fast/text/selection/atsui-rtl-override-selection-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/fast/text/selection/complex-text-rtl-selection-repaint-expected.png b/third_party/blink/web_tests/platform/win/fast/text/selection/complex-text-rtl-selection-repaint-expected.png
index 0b50cba..e2282c7 100644
--- a/third_party/blink/web_tests/platform/win/fast/text/selection/complex-text-rtl-selection-repaint-expected.png
+++ b/third_party/blink/web_tests/platform/win/fast/text/selection/complex-text-rtl-selection-repaint-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/fast/text/selection/emphasis-expected.png b/third_party/blink/web_tests/platform/win/fast/text/selection/emphasis-expected.png
index 5fd4941..c7dec31 100644
--- a/third_party/blink/web_tests/platform/win/fast/text/selection/emphasis-expected.png
+++ b/third_party/blink/web_tests/platform/win/fast/text/selection/emphasis-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/fast/text/selection/flexbox-selection-expected.png b/third_party/blink/web_tests/platform/win/fast/text/selection/flexbox-selection-expected.png
index d039339f..8bd505a0 100644
--- a/third_party/blink/web_tests/platform/win/fast/text/selection/flexbox-selection-expected.png
+++ b/third_party/blink/web_tests/platform/win/fast/text/selection/flexbox-selection-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/fast/text/selection/flexbox-selection-nested-expected.png b/third_party/blink/web_tests/platform/win/fast/text/selection/flexbox-selection-nested-expected.png
index 4b1f4707..34a4c37 100644
--- a/third_party/blink/web_tests/platform/win/fast/text/selection/flexbox-selection-nested-expected.png
+++ b/third_party/blink/web_tests/platform/win/fast/text/selection/flexbox-selection-nested-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/fast/text/selection/justified-selection-at-edge-expected.png b/third_party/blink/web_tests/platform/win/fast/text/selection/justified-selection-at-edge-expected.png
index daf81037..e5b556c 100644
--- a/third_party/blink/web_tests/platform/win/fast/text/selection/justified-selection-at-edge-expected.png
+++ b/third_party/blink/web_tests/platform/win/fast/text/selection/justified-selection-at-edge-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/fast/text/selection/justified-selection-expected.png b/third_party/blink/web_tests/platform/win/fast/text/selection/justified-selection-expected.png
index 51459ca..fd55313c 100644
--- a/third_party/blink/web_tests/platform/win/fast/text/selection/justified-selection-expected.png
+++ b/third_party/blink/web_tests/platform/win/fast/text/selection/justified-selection-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/fast/text/selection/khmer-selection-expected.png b/third_party/blink/web_tests/platform/win/fast/text/selection/khmer-selection-expected.png
index 04a4041..2a9f8427 100644
--- a/third_party/blink/web_tests/platform/win/fast/text/selection/khmer-selection-expected.png
+++ b/third_party/blink/web_tests/platform/win/fast/text/selection/khmer-selection-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/fast/text/selection/pre-wrap-overflow-selection-expected.png b/third_party/blink/web_tests/platform/win/fast/text/selection/pre-wrap-overflow-selection-expected.png
index b04c708..7daccd1 100644
--- a/third_party/blink/web_tests/platform/win/fast/text/selection/pre-wrap-overflow-selection-expected.png
+++ b/third_party/blink/web_tests/platform/win/fast/text/selection/pre-wrap-overflow-selection-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/fast/text/selection/selection-hard-linebreak-expected.png b/third_party/blink/web_tests/platform/win/fast/text/selection/selection-hard-linebreak-expected.png
index 30adcee..087dc7f 100644
--- a/third_party/blink/web_tests/platform/win/fast/text/selection/selection-hard-linebreak-expected.png
+++ b/third_party/blink/web_tests/platform/win/fast/text/selection/selection-hard-linebreak-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/fast/text/selection/selection-multiple-runs-expected.png b/third_party/blink/web_tests/platform/win/fast/text/selection/selection-multiple-runs-expected.png
index dc68cc8..d5318f1 100644
--- a/third_party/blink/web_tests/platform/win/fast/text/selection/selection-multiple-runs-expected.png
+++ b/third_party/blink/web_tests/platform/win/fast/text/selection/selection-multiple-runs-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/fast/text/selection/selection-painting-hidpi-expected.png b/third_party/blink/web_tests/platform/win/fast/text/selection/selection-painting-hidpi-expected.png
index 0050833..f373a8ba 100644
--- a/third_party/blink/web_tests/platform/win/fast/text/selection/selection-painting-hidpi-expected.png
+++ b/third_party/blink/web_tests/platform/win/fast/text/selection/selection-painting-hidpi-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/fast/text/selection/selection-rect-line-height-too-big-expected.png b/third_party/blink/web_tests/platform/win/fast/text/selection/selection-rect-line-height-too-big-expected.png
index e9b501d..ea99fe7 100644
--- a/third_party/blink/web_tests/platform/win/fast/text/selection/selection-rect-line-height-too-big-expected.png
+++ b/third_party/blink/web_tests/platform/win/fast/text/selection/selection-rect-line-height-too-big-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/fast/text/selection/selection-rect-rounding-expected.png b/third_party/blink/web_tests/platform/win/fast/text/selection/selection-rect-rounding-expected.png
index 8c98def..62ad677 100644
--- a/third_party/blink/web_tests/platform/win/fast/text/selection/selection-rect-rounding-expected.png
+++ b/third_party/blink/web_tests/platform/win/fast/text/selection/selection-rect-rounding-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/fast/text/selection/selection-with-inline-padding-expected.png b/third_party/blink/web_tests/platform/win/fast/text/selection/selection-with-inline-padding-expected.png
index ff48879..aea06a51 100644
--- a/third_party/blink/web_tests/platform/win/fast/text/selection/selection-with-inline-padding-expected.png
+++ b/third_party/blink/web_tests/platform/win/fast/text/selection/selection-with-inline-padding-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/fast/text/selection/shaping-selection-rect-expected.png b/third_party/blink/web_tests/platform/win/fast/text/selection/shaping-selection-rect-expected.png
index 57125ccf..cdec107a 100644
--- a/third_party/blink/web_tests/platform/win/fast/text/selection/shaping-selection-rect-expected.png
+++ b/third_party/blink/web_tests/platform/win/fast/text/selection/shaping-selection-rect-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/fast/text/selection/should-use-atsui-expected.png b/third_party/blink/web_tests/platform/win/fast/text/selection/should-use-atsui-expected.png
index 17e434f..444cdb9 100644
--- a/third_party/blink/web_tests/platform/win/fast/text/selection/should-use-atsui-expected.png
+++ b/third_party/blink/web_tests/platform/win/fast/text/selection/should-use-atsui-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/paint/invalidation/repaint-across-writing-mode-boundary-expected.png b/third_party/blink/web_tests/platform/win/paint/invalidation/repaint-across-writing-mode-boundary-expected.png
index 16d605e..5a2ff6e 100644
--- a/third_party/blink/web_tests/platform/win/paint/invalidation/repaint-across-writing-mode-boundary-expected.png
+++ b/third_party/blink/web_tests/platform/win/paint/invalidation/repaint-across-writing-mode-boundary-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win7/fast/text/selection/atsui-kerning-and-ligatures-expected.png b/third_party/blink/web_tests/platform/win7/fast/text/selection/atsui-kerning-and-ligatures-expected.png
index c8064394..1904b98 100644
--- a/third_party/blink/web_tests/platform/win7/fast/text/selection/atsui-kerning-and-ligatures-expected.png
+++ b/third_party/blink/web_tests/platform/win7/fast/text/selection/atsui-kerning-and-ligatures-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win7/fast/text/selection/atsui-rtl-override-selection-expected.png b/third_party/blink/web_tests/platform/win7/fast/text/selection/atsui-rtl-override-selection-expected.png
index 7e4cbcd..8ea8ea4 100644
--- a/third_party/blink/web_tests/platform/win7/fast/text/selection/atsui-rtl-override-selection-expected.png
+++ b/third_party/blink/web_tests/platform/win7/fast/text/selection/atsui-rtl-override-selection-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win7/fast/text/selection/complex-text-rtl-selection-repaint-expected.png b/third_party/blink/web_tests/platform/win7/fast/text/selection/complex-text-rtl-selection-repaint-expected.png
index 4d8226e..8cbbf76c 100644
--- a/third_party/blink/web_tests/platform/win7/fast/text/selection/complex-text-rtl-selection-repaint-expected.png
+++ b/third_party/blink/web_tests/platform/win7/fast/text/selection/complex-text-rtl-selection-repaint-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win7/fast/text/selection/emphasis-expected.png b/third_party/blink/web_tests/platform/win7/fast/text/selection/emphasis-expected.png
index 5e5ffc9..7b321cbe 100644
--- a/third_party/blink/web_tests/platform/win7/fast/text/selection/emphasis-expected.png
+++ b/third_party/blink/web_tests/platform/win7/fast/text/selection/emphasis-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win7/fast/text/selection/flexbox-selection-expected.png b/third_party/blink/web_tests/platform/win7/fast/text/selection/flexbox-selection-expected.png
index c3df5f2..3851fc0 100644
--- a/third_party/blink/web_tests/platform/win7/fast/text/selection/flexbox-selection-expected.png
+++ b/third_party/blink/web_tests/platform/win7/fast/text/selection/flexbox-selection-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win7/fast/text/selection/flexbox-selection-nested-expected.png b/third_party/blink/web_tests/platform/win7/fast/text/selection/flexbox-selection-nested-expected.png
index 5254f0b..ed8f8648 100644
--- a/third_party/blink/web_tests/platform/win7/fast/text/selection/flexbox-selection-nested-expected.png
+++ b/third_party/blink/web_tests/platform/win7/fast/text/selection/flexbox-selection-nested-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win7/fast/text/selection/justified-selection-at-edge-expected.png b/third_party/blink/web_tests/platform/win7/fast/text/selection/justified-selection-at-edge-expected.png
index 4c25b3b..852b61b9 100644
--- a/third_party/blink/web_tests/platform/win7/fast/text/selection/justified-selection-at-edge-expected.png
+++ b/third_party/blink/web_tests/platform/win7/fast/text/selection/justified-selection-at-edge-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win7/fast/text/selection/justified-selection-expected.png b/third_party/blink/web_tests/platform/win7/fast/text/selection/justified-selection-expected.png
index 3aa8090..0866a19b 100644
--- a/third_party/blink/web_tests/platform/win7/fast/text/selection/justified-selection-expected.png
+++ b/third_party/blink/web_tests/platform/win7/fast/text/selection/justified-selection-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win7/fast/text/selection/khmer-selection-expected.png b/third_party/blink/web_tests/platform/win7/fast/text/selection/khmer-selection-expected.png
index c2668fd..f9e2552 100644
--- a/third_party/blink/web_tests/platform/win7/fast/text/selection/khmer-selection-expected.png
+++ b/third_party/blink/web_tests/platform/win7/fast/text/selection/khmer-selection-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win7/fast/text/selection/pre-wrap-overflow-selection-expected.png b/third_party/blink/web_tests/platform/win7/fast/text/selection/pre-wrap-overflow-selection-expected.png
index fc2fe3ed..4650dcca 100644
--- a/third_party/blink/web_tests/platform/win7/fast/text/selection/pre-wrap-overflow-selection-expected.png
+++ b/third_party/blink/web_tests/platform/win7/fast/text/selection/pre-wrap-overflow-selection-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win7/fast/text/selection/selection-hard-linebreak-expected.png b/third_party/blink/web_tests/platform/win7/fast/text/selection/selection-hard-linebreak-expected.png
index bc887a0..4b414bca 100644
--- a/third_party/blink/web_tests/platform/win7/fast/text/selection/selection-hard-linebreak-expected.png
+++ b/third_party/blink/web_tests/platform/win7/fast/text/selection/selection-hard-linebreak-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win7/fast/text/selection/selection-multiple-runs-expected.png b/third_party/blink/web_tests/platform/win7/fast/text/selection/selection-multiple-runs-expected.png
index fb2567e..02561a67 100644
--- a/third_party/blink/web_tests/platform/win7/fast/text/selection/selection-multiple-runs-expected.png
+++ b/third_party/blink/web_tests/platform/win7/fast/text/selection/selection-multiple-runs-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win7/fast/text/selection/selection-painting-hidpi-expected.png b/third_party/blink/web_tests/platform/win7/fast/text/selection/selection-painting-hidpi-expected.png
index 17d37fd..54886e7f 100644
--- a/third_party/blink/web_tests/platform/win7/fast/text/selection/selection-painting-hidpi-expected.png
+++ b/third_party/blink/web_tests/platform/win7/fast/text/selection/selection-painting-hidpi-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win7/fast/text/selection/selection-rect-line-height-too-big-expected.png b/third_party/blink/web_tests/platform/win7/fast/text/selection/selection-rect-line-height-too-big-expected.png
index f52dfec..da4c7e4 100644
--- a/third_party/blink/web_tests/platform/win7/fast/text/selection/selection-rect-line-height-too-big-expected.png
+++ b/third_party/blink/web_tests/platform/win7/fast/text/selection/selection-rect-line-height-too-big-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win7/fast/text/selection/selection-with-inline-padding-expected.png b/third_party/blink/web_tests/platform/win7/fast/text/selection/selection-with-inline-padding-expected.png
index 541565a..0aff528 100644
--- a/third_party/blink/web_tests/platform/win7/fast/text/selection/selection-with-inline-padding-expected.png
+++ b/third_party/blink/web_tests/platform/win7/fast/text/selection/selection-with-inline-padding-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win7/fast/text/selection/shaping-selection-rect-expected.png b/third_party/blink/web_tests/platform/win7/fast/text/selection/shaping-selection-rect-expected.png
index cb714b6..dc7eccc 100644
--- a/third_party/blink/web_tests/platform/win7/fast/text/selection/shaping-selection-rect-expected.png
+++ b/third_party/blink/web_tests/platform/win7/fast/text/selection/shaping-selection-rect-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win7/fast/text/selection/should-use-atsui-expected.png b/third_party/blink/web_tests/platform/win7/fast/text/selection/should-use-atsui-expected.png
index 3d12c631..ffc81b2 100644
--- a/third_party/blink/web_tests/platform/win7/fast/text/selection/should-use-atsui-expected.png
+++ b/third_party/blink/web_tests/platform/win7/fast/text/selection/should-use-atsui-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/platform/win7/paint/invalidation/repaint-across-writing-mode-boundary-expected.png b/third_party/blink/web_tests/platform/win7/paint/invalidation/repaint-across-writing-mode-boundary-expected.png
index 76458e3ed..51b1ae8 100644
--- a/third_party/blink/web_tests/platform/win7/paint/invalidation/repaint-across-writing-mode-boundary-expected.png
+++ b/third_party/blink/web_tests/platform/win7/paint/invalidation/repaint-across-writing-mode-boundary-expected.png
Binary files differ
diff --git a/third_party/blink/web_tests/virtual/not-omt-sw-fetch/README.md b/third_party/blink/web_tests/virtual/not-omt-sw-fetch/README.md
deleted file mode 100644
index a00c8fe..0000000
--- a/third_party/blink/web_tests/virtual/not-omt-sw-fetch/README.md
+++ /dev/null
@@ -1,4 +0,0 @@
-# virtual/not-omt-sw-fetch
-
-Fetch toplevel service worker scripts on the main thread. This virtual tests
-and `virtual/omt-worker-fetch` contradict each other.
diff --git a/third_party/blink/web_tests/wpt_internal/std-switch/tentative/extend.html b/third_party/blink/web_tests/wpt_internal/std-switch/tentative/extend.html
new file mode 100644
index 0000000..0bbddb8
--- /dev/null
+++ b/third_party/blink/web_tests/wpt_internal/std-switch/tentative/extend.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<body>
+<script type="module">
+import { StdSwitchElement } from 'std:elements/switch';
+
+setup({allow_uncaught_exception:true});
+
+test(()=> {
+  class MySwitchElement extends StdSwitchElement {
+  }
+  customElements.define('my-switch', MySwitchElement);
+  let uncaughtError = null;
+  window.addEventListener('error', e => {
+    uncaughtError = e.error;
+  }, {once: true});
+  document.createElement('my-switch');
+  assert_true(uncaughtError instanceof TypeError);
+}, 'Should not be able to create an autonomous custom element extending StdSwitchElement');
+
+test(()=> {
+  class MySwitchElement2 extends StdSwitchElement {
+  }
+  assert_throws('NotSupportedError', () => {
+    customElements.define('my-switch2', MySwitchElement2, {extends: 'std-switch'});
+  });
+}, 'Should not be able to define a customized built-in element for std-switch');
+</script>
+</body>
diff --git a/tools/dump_process_memory/dump_process.cc b/tools/dump_process_memory/dump_process.cc
index de6384be..ad94c87 100644
--- a/tools/dump_process_memory/dump_process.cc
+++ b/tools/dump_process_memory/dump_process.cc
@@ -45,9 +45,8 @@
   ScopedPtracer(pid_t pid) : pid_(pid), is_attached_(false) {
     // ptrace() delivers a SIGSTOP signal to one thread in the target process,
     // unless it is already stopped. Since we want to stop the whole process,
-    // send a signal to every thread in the process group.
-    pid_t process_group_id = getpgid(pid);
-    if (killpg(process_group_id, SIGSTOP)) {
+    // kill() it first.
+    if (kill(pid, SIGSTOP)) {
       PLOG(ERROR) << "Cannot stop the process group of " << pid;
       return;
     }
@@ -206,6 +205,9 @@
 // disk.
 bool DumpMappings(pid_t pid) {
   LOG(INFO) << "Attaching to " << pid;
+  // ptrace() is not required to read the process's memory, but the permissions
+  // to attach to the target process is.
+  // Attach anyway to make it clearer when this fails.
   ScopedPtracer tracer(pid);
   if (!tracer.IsAttached())
     return false;
diff --git a/tools/gritsettings/resource_ids b/tools/gritsettings/resource_ids
index f73ef93..bda2c60 100644
--- a/tools/gritsettings/resource_ids
+++ b/tools/gritsettings/resource_ids
@@ -152,9 +152,6 @@
   "chrome/browser/vr/testapp/vr_testapp_resources.grd": {
     "includes": [13990],
   },
-  "chrome/browser/resources/kiosk_next_internal_resources.grd": {
-    "includes": [14040],
-  },
   # END chrome/browser section.
 
   # START chrome/ miscellaneous section.
diff --git a/tools/gritsettings/translation_expectations.pyl b/tools/gritsettings/translation_expectations.pyl
index dbe60d3..2d9339d 100644
--- a/tools/gritsettings/translation_expectations.pyl
+++ b/tools/gritsettings/translation_expectations.pyl
@@ -99,7 +99,6 @@
   # Internal grds that contain parts not available publicly and thus should
   # not be checked by translation script.
   "internal_grds": [
-    "chrome/browser/resources/kiosk_next_internal_resources.grd",
     # Test grd that contains a part file that doesn't exist.
     "tools/translation/testdata/internal.grd",
   ],
diff --git a/tools/metrics/actions/actions.xml b/tools/metrics/actions/actions.xml
index b8ff890..f0251e89 100644
--- a/tools/metrics/actions/actions.xml
+++ b/tools/metrics/actions/actions.xml
@@ -17556,6 +17556,15 @@
   </description>
 </action>
 
+<action name="SettingsPage.OpenAppManagement">
+  <owner>jshikaram@chromium.org</owner>
+  <owner>dominickn@chromium.org</owner>
+  <description>
+    The user clicked on the &quot;Manage your apps&quot; external link in the
+    settings page.
+  </description>
+</action>
+
 <action name="SettingsResetBubble.LearnMore">
   <owner>mad@chromium.org</owner>
   <description>Please enter the description of this user action.</description>
@@ -17642,7 +17651,16 @@
   <description>Please enter the description of this user action.</description>
 </action>
 
+<action name="ShowAppManagementDetailPage">
+  <owner>jshikaram@chromium.org</owner>
+  <owner>dominickn@chromium.org</owner>
+  <description>
+    The user selected the App Info context menu item in the app launcher.
+  </description>
+</action>
+
 <action name="ShowAppManagementPage">
+  <obsolete>Replaced with ShowAppManagementDetailPage</obsolete>
   <owner>jshikaram@chromium.org</owner>
   <owner>dominickn@chromium.org</owner>
   <description>
diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml
index 3e0ef62..00e2353 100644
--- a/tools/metrics/histograms/enums.xml
+++ b/tools/metrics/histograms/enums.xml
@@ -5465,6 +5465,56 @@
   <int value="1" label="Attempted"/>
 </enum>
 
+<enum name="BooleanAutofillFillAfterSuggestion">
+  <int value="0" label="User chose to fill"/>
+  <int value="1" label="User did not choose to fill"/>
+</enum>
+
+<enum name="BooleanAutofillFillingAcceptance">
+  <int value="0" label="No suggestion accepted"/>
+  <int value="1" label="At least one suggestion accepted"/>
+</enum>
+
+<enum name="BooleanAutofillFillingAssistance">
+  <int value="0" label="No assistance"/>
+  <int value="1" label="Fields were filled"/>
+</enum>
+
+<enum name="BooleanAutofillFillingCorrectness">
+  <int value="0" label="User edited filled fields"/>
+  <int value="1" label="No filled fields were edited"/>
+</enum>
+
+<enum name="BooleanAutofillFillingReadiness">
+  <int value="0" label="No data available to fill"/>
+  <int value="1" label="Some data available to fill"/>
+</enum>
+
+<enum name="BooleanAutofillInteractionAfterParsedAsType">
+  <int value="0" label="No interaction"/>
+  <int value="1" label="Interaction observed"/>
+</enum>
+
+<enum name="BooleanAutofillParsedAsType">
+  <int value="0" label="Different type"/>
+  <int value="1" label="This type"/>
+</enum>
+
+<enum name="BooleanAutofillSubmission">
+  <int value="0" label="Form was abandoned"/>
+  <int value="1" label="Form was submitted"/>
+</enum>
+
+<enum name="BooleanAutofillSubmissionAfterFill">
+  <int value="0" label="Not submitted"/>
+  <int value="1" label="Submitted"/>
+</enum>
+
+<enum name="BooleanAutofillSuggestionAfterInteraction">
+  <int value="0" label="Not shown"/>
+  <int value="1" label="Shown"/>
+</enum>
+
 <enum name="BooleanAvailable">
   <int value="0" label="Not Available"/>
   <int value="1" label="Available"/>
@@ -16610,11 +16660,11 @@
   <int value="41" label="OAuth fetch: account not signed up">
     OAuth token fetch failed: account not signed up.
   </int>
-  <int value="42" label="OAuth fetch: account deleted">
-    OAuth token fetch failed: account deleted.
+  <int value="42" label="OAuth fetch: account deleted (unused)">
+    UNUSED: OAuth token fetch failed: account deleted.
   </int>
-  <int value="43" label="OAuth fetch: account disabled">
-    OAuth token fetch failed: account disabled.
+  <int value="43" label="OAuth fetch: account disabled (unused)">
+    UNUSED: OAuth token fetch failed: account disabled.
   </int>
   <int value="44" label="Re-enrollment: pre-check domain mismatch">
     Re-enrollment pre-check failed: domain does not match install attributes.
@@ -27679,8 +27729,8 @@
   <int value="2" label="USER_NOT_SIGNED_UP"/>
   <int value="3" label="CONNECTION_FAILED"/>
   <int value="4" label="CAPTCHA_REQUIRED (deprecated)"/>
-  <int value="5" label="ACCOUNT_DELETED"/>
-  <int value="6" label="ACCOUNT_DISABLED"/>
+  <int value="5" label="ACCOUNT_DELETED (deprecated)"/>
+  <int value="6" label="ACCOUNT_DISABLED (deprecated)"/>
   <int value="7" label="SERVICE_UNAVAILABLE"/>
   <int value="8" label="TWO_FACTOR (deprecated)"/>
   <int value="9" label="REQUEST_CANCELED"/>
@@ -38785,6 +38835,9 @@
 </enum>
 
 <enum name="MidiResult">
+  <obsolete>
+    Removed 06/2019.
+  </obsolete>
   <int value="0" label="Not initialized"/>
   <int value="1" label="Successfully initialized"/>
   <int value="2" label="Not supported"/>
@@ -38806,6 +38859,7 @@
   <int value="4" label="Initialized"/>
   <int value="5" label="Input port is added"/>
   <int value="6" label="Output port is added"/>
+  <int value="7" label="Error occurred on calling platform APIs"/>
 </enum>
 
 <enum name="MigrationNssToPemNetworkTypes">
diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml
index 2ea4e86..4f0385d 100644
--- a/tools/metrics/histograms/histograms.xml
+++ b/tools/metrics/histograms/histograms.xml
@@ -9323,6 +9323,89 @@
   <summary>The autofill state related to a submitted form.</summary>
 </histogram>
 
+<histogram base="true" name="Autofill.Funnel.FillAfterSuggestion"
+    enum="BooleanAutofillFillAfterSuggestion" expires_after="2020-07-01">
+  <owner>battre@chromium.org</owner>
+  <owner>kolos@chromium.org</owner>
+  <owner>nepper@chromium.org</owner>
+  <summary>
+    Counts whether users accepted any autofill suggestion that was shown to them
+    for a given form.
+
+    This metric is only recorded if a suggestion for the given form type (see
+    histogram name) was shown at least once. This is recorded once per form. If
+    the user accepts one suggestion, this is reported as &quot;User chose to
+    fill&quot; once. It does not matter if the user clears the filled values nor
+    if the user accepts a different suggestion later.
+  </summary>
+</histogram>
+
+<histogram base="true" name="Autofill.Funnel.InteractionAfterParsedAsType"
+    enum="BooleanAutofillInteractionAfterParsedAsType"
+    expires_after="2020-07-01">
+  <owner>battre@chromium.org</owner>
+  <owner>kolos@chromium.org</owner>
+  <owner>nepper@chromium.org</owner>
+  <summary>
+    Counts whether users interacted with a form of a certain type.
+
+    Focusing a field is sufficient to consider a form as being interacted with.
+    The user does not need to type anything. Note that some forms may get
+    focused on page load.
+
+    This metric is recorded once per form observed by Autofill, but only for
+    forms that Autofill classifies to be of the type indicated by the histogram
+    name. If a form changes dynamically, Autofill interprets the forms before
+    and after the change as two different forms and records two values. If a
+    form did not have features that classify it as a form of a certain type
+    (e.g. an address form or payment form), then nothing is recorded.
+  </summary>
+</histogram>
+
+<histogram base="true" name="Autofill.Funnel.ParsedAsType"
+    enum="BooleanAutofillParsedAsType" expires_after="2020-07-01">
+  <owner>battre@chromium.org</owner>
+  <owner>kolos@chromium.org</owner>
+  <owner>nepper@chromium.org</owner>
+  <summary>
+    Counts whether a form was parsed/interpreted to be of the type indicated in
+    the histogram name.
+
+    This metric is recorded once for each form observed by Autofill. If a form
+    changes dynamically, then Autofill treats the different versions of the form
+    as different forms.
+  </summary>
+</histogram>
+
+<histogram base="true" name="Autofill.Funnel.SubmissionAfterFill"
+    enum="BooleanAutofillSubmissionAfterFill" expires_after="2020-07-01">
+  <owner>battre@chromium.org</owner>
+  <owner>kolos@chromium.org</owner>
+  <owner>nepper@chromium.org</owner>
+  <summary>
+    Counts whether users submitted a form that was filled via autofill.
+
+    This metric is recorded once for each form observed by Autofill but only for
+    forms that the user filled via Autofill.
+  </summary>
+</histogram>
+
+<histogram base="true" name="Autofill.Funnel.SuggestionAfterInteraction"
+    enum="BooleanAutofillSuggestionAfterInteraction" expires_after="2020-07-01">
+  <owner>battre@chromium.org</owner>
+  <owner>kolos@chromium.org</owner>
+  <owner>nepper@chromium.org</owner>
+  <summary>
+    Counts whether users were shown suggestions to fill the form, given that
+    they have already interacted with the form.
+
+    This metric is recorded only for forms that users interacted with. It is
+    recorded only once per form, meaning that it does not matter how often the
+    user sees suggestions. If a form changes dynamically, then Autofill treats
+    the different versions of the form as different forms.
+  </summary>
+</histogram>
+
 <histogram name="Autofill.HadUserOptedIn_To_WalletSyncTransportServerCards"
     enum="BooleanOptedIn" expires_after="M77">
   <owner>sebsg@chromium.org</owner>
@@ -9416,6 +9499,94 @@
   </summary>
 </histogram>
 
+<histogram base="true" name="Autofill.KeyMetrics.FillingAcceptance"
+    enum="BooleanAutofillFillingAcceptance" expires_after="2020-07-01">
+  <owner>battre@chromium.org</owner>
+  <owner>kolos@chromium.org</owner>
+  <owner>nepper@chromium.org</owner>
+  <summary>
+    Counts for submitted forms whether users accepted the suggestion to fill
+    values. This is counted as 'yes' if the user accepted such a suggestion at
+    any time, regardless whether other suggestions were ignored or whether the
+    accepted suggestion was reverted afterwards.
+  </summary>
+</histogram>
+
+<histogram base="true" name="Autofill.KeyMetrics.FillingAssistance"
+    enum="BooleanAutofillFillingAssistance" expires_after="2020-07-01">
+  <owner>battre@chromium.org</owner>
+  <owner>kolos@chromium.org</owner>
+  <owner>nepper@chromium.org</owner>
+  <summary>
+    Counts for submitted forms whether the user filled any fields via Autofill.
+
+    If the user reverts the filling, the form is still counted as filled.
+
+    This metric is different from Autofill.KeyMetrics.FillingAcceptance in the
+    sense that the latter is only recorded if the user has actually seen a
+    prompt to fill data.
+  </summary>
+</histogram>
+
+<histogram base="true" name="Autofill.KeyMetrics.FillingCorrectness"
+    enum="BooleanAutofillFillingCorrectness" expires_after="2020-07-01">
+  <owner>battre@chromium.org</owner>
+  <owner>kolos@chromium.org</owner>
+  <owner>nepper@chromium.org</owner>
+  <summary>
+    Counts for submitted and autofilled forms whether users edited at least one
+    filled value before submitting the form.
+  </summary>
+</histogram>
+
+<histogram base="true" name="Autofill.KeyMetrics.FillingReadiness"
+    enum="BooleanAutofillFillingReadiness" expires_after="2020-07-01">
+  <owner>battre@chromium.org</owner>
+  <owner>kolos@chromium.org</owner>
+  <owner>nepper@chromium.org</owner>
+  <summary>
+    Counts for submitted forms whether Chromium had any address or payments data
+    to fill.
+
+    It does not matter whether the user actually requested to fill the data. It
+    does not matter either whether the data available for filling corresponded
+    to the submitted data.
+  </summary>
+</histogram>
+
+<histogram base="true" name="Autofill.KeyMetrics.FormSubmission.Autofilled"
+    enum="BooleanAutofillSubmission" expires_after="2020-07-01">
+  <owner>battre@chromium.org</owner>
+  <owner>kolos@chromium.org</owner>
+  <owner>nepper@chromium.org</owner>
+  <summary>
+    Counts for filled (by Autofill) forms whether users submitted those forms.
+
+    This is only recorded for forms that the user filled via Autofill. It does
+    not matter if the user reverted the filling afterwards.
+
+    This is recorded once Autofill stops tracking the form (e.g. due to a
+    navigation or due to removal from the DOM).
+  </summary>
+</histogram>
+
+<histogram base="true" name="Autofill.KeyMetrics.FormSubmission.NotAutofilled"
+    enum="BooleanAutofillSubmission" expires_after="2020-07-01">
+  <owner>battre@chromium.org</owner>
+  <owner>kolos@chromium.org</owner>
+  <owner>nepper@chromium.org</owner>
+  <summary>
+    Counts for not filled (by Autofill) forms whether users submitted those
+    forms.
+
+    This is only recorded for forms into which the user typed anything but did
+    not fill anything. It does not matter if the user reverted what they typed.
+
+    This is recorded once Autofill stops tracking the form (e.g. due to a
+    navigation or due to removal from the DOM).
+  </summary>
+</histogram>
+
 <histogram name="Autofill.LocalCardMigrationBubbleOffer"
     enum="AutofillLocalCardMigrationBubbleOffer">
   <owner>siyua@chromium.org</owner>
@@ -11562,6 +11733,18 @@
   </summary>
 </histogram>
 
+<histogram name="BackgroundSync.Periodic.Wakeup.DelayTime" units="ms"
+    expires_after="M87">
+  <owner>nator@chromium.org</owner>
+  <owner>peter@chromium.org</owner>
+  <owner>rayankans@chromium.org</owner>
+  <summary>
+    Records time elapsed since the soonest expected wake-up time. Recorded
+    whenever a periodic Background Sync Chrome wake-up task is called after
+    loading the native parts of the browser.
+  </summary>
+</histogram>
+
 <histogram name="BackgroundSync.Registration.OneShot"
     enum="BackgroundSyncStatus">
   <owner>iclelland@chromium.org</owner>
@@ -11662,9 +11845,9 @@
   <owner>rayankans@chromium.org</owner>
   <summary>
     If BackgroundSync uses BackgroundTaskScheduler to wake up Chrome, this
-    records the delay from the soonest expected wake-up time. Recorded whenever
-    a BackgroundSync background task is called after loading the native parts of
-    the browser.
+    records the time elapsed since the soonest expected wake-up time. Recorded
+    whenever a BackgroundSync background task is called after loading the native
+    parts of the browser.
   </summary>
 </histogram>
 
@@ -56402,26 +56585,40 @@
 </histogram>
 
 <histogram name="Media.Midi.InputPorts" units="devices" expires_after="M77">
+  <obsolete>
+    Removed 06/2019.
+  </obsolete>
   <owner>toyoshim@chromium.org</owner>
+  <owner>midi-dev@chromium.org</owner>
   <summary>Connected input port numbers on the initialization.</summary>
 </histogram>
 
 <histogram name="Media.Midi.OutputPorts" units="devices" expires_after="M77">
+  <obsolete>
+    Removed 06/2019.
+  </obsolete>
   <owner>toyoshim@chromium.org</owner>
+  <owner>midi-dev@chromium.org</owner>
   <summary>Connected output port numbers on the initialization.</summary>
 </histogram>
 
 <histogram name="Media.Midi.ResultOnShutdown" enum="MidiResult"
     expires_after="M77">
+  <obsolete>
+    Removed 06/2019.
+  </obsolete>
   <owner>toyoshim@chromium.org</owner>
+  <owner>midi-dev@chromium.org</owner>
   <summary>
     The final status of MidiManager on destruction. This can monitor unexpected
     failures on initializing platform dependent MIDI stuff.
   </summary>
 </histogram>
 
-<histogram name="Media.Midi.SendReceiveUsage" enum="MidiSendReceiveUsage">
+<histogram name="Media.Midi.SendReceiveUsage" enum="MidiSendReceiveUsage"
+    expires_after="M85">
   <owner>toyoshim@chromium.org</owner>
+  <owner>midi-dev@chromium.org</owner>
   <summary>
     Reports whether any data was sent or received by a MidiManager. Recorded
     once per MidiManager instantiation, upon destruction. MidiManager is
@@ -56431,13 +56628,15 @@
 </histogram>
 
 <histogram name="Media.Midi.SysExMessageSizeUpTo1MB" units="bytes"
-    expires_after="M77">
+    expires_after="M85">
   <owner>toyoshim@chromium.org</owner>
+  <owner>midi-dev@chromium.org</owner>
   <summary>Reports sysex message size.</summary>
 </histogram>
 
-<histogram name="Media.Midi.Usage" enum="MidiUsage">
+<histogram name="Media.Midi.Usage" enum="MidiUsage" expires_after="M85">
   <owner>toyoshim@chromium.org</owner>
+  <owner>midi-dev@chromium.org</owner>
   <summary>
     The MidiManager instance use count, but this is not intended to understand
     the real API usage because this can be counted by feature scanning scripts
@@ -149881,6 +150080,17 @@
       name="Autofill.FillDuration.FromInteraction.WithAutofill"/>
   <affected-histogram
       name="Autofill.FillDuration.FromInteraction.WithoutAutofill"/>
+  <affected-histogram name="Autofill.Funnel.FillAfterSuggestion"/>
+  <affected-histogram name="Autofill.Funnel.InteractionAfterParsedAsType"/>
+  <affected-histogram name="Autofill.Funnel.ParsedAsType"/>
+  <affected-histogram name="Autofill.Funnel.SubmissionAfterFill"/>
+  <affected-histogram name="Autofill.Funnel.SuggestionAfterInteraction"/>
+  <affected-histogram name="Autofill.KeyMetrics.FillingAcceptance"/>
+  <affected-histogram name="Autofill.KeyMetrics.FillingAssistance"/>
+  <affected-histogram name="Autofill.KeyMetrics.FillingCorrectness"/>
+  <affected-histogram name="Autofill.KeyMetrics.FillingReadiness"/>
+  <affected-histogram name="Autofill.KeyMetrics.FormSubmission.Autofilled"/>
+  <affected-histogram name="Autofill.KeyMetrics.FormSubmission.NotAutofilled"/>
   <affected-histogram name="Autofill.UserHappiness"/>
 </histogram_suffixes>
 
diff --git a/tools/perf/benchmarks/system_health_smoke_test.py b/tools/perf/benchmarks/system_health_smoke_test.py
index d794d66..fc0f6767 100644
--- a/tools/perf/benchmarks/system_health_smoke_test.py
+++ b/tools/perf/benchmarks/system_health_smoke_test.py
@@ -138,6 +138,9 @@
   # crbug.com/937006
   'system_health.memory_mobile/browse:news:toi',
 
+  # crbug.com/978358
+  'system_health.memory_desktop/browse:news:flipboard:2018',
+
   # The following tests are disabled because they are disabled on the perf
   # waterfall (using tools/perf/expectations.config) on one platform or another.
   # They may run fine on the CQ, but it isn't worth the bot time to run them.
diff --git a/ui/accessibility/platform/ax_platform_node_auralinux.cc b/ui/accessibility/platform/ax_platform_node_auralinux.cc
index 4d4869a7..d149e08 100644
--- a/ui/accessibility/platform/ax_platform_node_auralinux.cc
+++ b/ui/accessibility/platform/ax_platform_node_auralinux.cc
@@ -1956,7 +1956,7 @@
   if (IsContainerWithSelectableChildren(GetData().role))
     interface_mask |= 1 << ATK_SELECTION_INTERFACE;
 
-  if (role == ATK_ROLE_TABLE)
+  if (role == ATK_ROLE_TABLE || role == ATK_ROLE_TREE_TABLE)
     interface_mask |= 1 << ATK_TABLE_INTERFACE;
 
   // Because the TableCell Interface is only supported in ATK version 2.12 and