diff --git a/.gitignore b/.gitignore
index 105d59d..734f76ef 100644
--- a/.gitignore
+++ b/.gitignore
@@ -68,7 +68,8 @@
 /c
 /cdm
 /ceee/internal/
-/chrome/android/profiles/chrome-profile-*.prof
+/chrome/android/profiles/afdo.prof
+/chrome/android/profiles/local.txt
 /chrome/angle_unittests_run.xml
 /chrome/build/chrome.x64.orderfile
 /chrome/build/chrome.x86.orderfile
diff --git a/.gn b/.gn
index 20f642ef..d243f0cd 100644
--- a/.gn
+++ b/.gn
@@ -147,20 +147,24 @@
   "//testing/*",
 
   #"//third_party/*",  # May not ever want this.
-  "//third_party/breakpad/*",
+  #"//third_party/breakpad/*",  # Small errors.
   "//third_party/brotli/*",
   "//third_party/hunspell/*",
   "//third_party/leveldatabase/*",
-  "//third_party/libaddressinput/*",
+
+  #"//third_party/libaddressinput/*",  # Small errors.
   "//third_party/libphonenumber/*",
-  "//third_party/libwebp/*",
+
+  #"//third_party/libwebp/*",  # Errors: https://crbug.com/800762
   "//third_party/snappy/*",
-  "//third_party/WebKit/*",
+
+  #"//third_party/WebKit/*",  # Errors: https://crbug.com/800764
   "//tools/*",
 
   "//ui/*",
   "//url/*",
-  "//v8/*",
+
+  #"//v8/*",  # Errors: https://bugs.chromium.org/p/v8/issues/detail?id=7330
   "//win8/*",
 ]
 
diff --git a/DEPS b/DEPS
index 5bcd465..bb38e47a 100644
--- a/DEPS
+++ b/DEPS
@@ -83,7 +83,7 @@
   # 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': '0ac874e752e6a4e3e81a62b7534a92077e9f78f1',
+  'v8_revision': '6785ab9c7f35a875c3a6119ab772c0e985bd9f8e',
   # 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.
@@ -91,7 +91,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': 'dd21ecf80a6281a1af060b9383d57b2e79ecde7d',
+  'angle_revision': 'd66e193930ddc74f09c0ed51275f4dc564a41a02',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling build tools
   # and whatever else without interference from each other.
@@ -103,7 +103,7 @@
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling PDFium
   # and whatever else without interference from each other.
-  'pdfium_revision': '4d4731c620ea1fa95c07f8855f84d28c78090119',
+  'pdfium_revision': '9b85f4ba6fdd86c488498003a2db5854d4ece036',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling openmax_dl
   # and whatever else without interference from each other.
@@ -135,7 +135,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': 'b1764295677303c32cf6ca296bb4e50c49f1dba6',
+  'catapult_revision': '296e7c3a900bec6123d48cda8436a31b382d0ffe',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling libFuzzer
   # and whatever else without interference from each other.
@@ -649,7 +649,7 @@
     Var('chromium_git') + '/external/khronosgroup/webgl.git' + '@' + 'd458ada06171a85af00367251a4ed55db7fe2018',
 
   'src/third_party/webrtc':
-    Var('webrtc_git') + '/src.git' + '@' + '6daa27815625009de99edf4dfd939f4dcc48362f', # commit position 20628
+    Var('webrtc_git') + '/src.git' + '@' + '5864639a46501501c9f7fe8a22ae485886a9965f', # commit position 20628
 
   'src/third_party/xdg-utils': {
       'url': Var('chromium_git') + '/chromium/deps/xdg-utils.git' + '@' + 'd80274d5869b17b8c9067a1022e4416ee7ed5e0d',
@@ -1222,10 +1222,15 @@
     'action': ['src/build/cipd/cipd_wrapper.py',
                '--chromium-root', 'src',
                '--ensure-file', 'src/build/cipd/android/android.ensure',
-               '--ensure-file', 'src/chrome/android/android.ensure',
     ],
   },
   {
+    'name': 'Fetch Android AFDO profile',
+    'pattern': '.',
+    'condition': 'checkout_android',
+    'action': ['vpython', 'src/chrome/android/profiles/update_afdo_profile.py'],
+  },
+  {
     # This downloads SDK extras and puts them in the
     # third_party/android_tools/sdk/extras directory.
     'name': 'sdkextras',
diff --git a/android_webview/java/src/org/chromium/android_webview/PopupTouchHandleDrawable.java b/android_webview/java/src/org/chromium/android_webview/PopupTouchHandleDrawable.java
index aca5ea54..574c60b 100644
--- a/android_webview/java/src/org/chromium/android_webview/PopupTouchHandleDrawable.java
+++ b/android_webview/java/src/org/chromium/android_webview/PopupTouchHandleDrawable.java
@@ -46,20 +46,6 @@
  */
 @JNINamespace("android_webview")
 public class PopupTouchHandleDrawable extends View implements DisplayAndroidObserver {
-    @Override
-    public void onRotationChanged(int rotation) {
-        mRotationChanged = true;
-    }
-
-    @Override
-    public void onDIPScaleChanged(float dipScale) {
-        if (mDeviceScale != dipScale) {
-            mDeviceScale = dipScale;
-
-            // Postpone update till onConfigurationChanged()
-            mNeedsUpdateDrawable = true;
-        }
-    }
 
     private final PopupWindow mContainer;
     private final PositionObserver.Listener mParentPositionListener;
@@ -211,6 +197,9 @@
             return;
         }
 
+        // Android doc says PopupWindow#setWindowLayoutType() was added since API level 23, however,
+        // it was introduced long time before M as a hidden API. Using reflection here to access it
+        // on blew M.
         try {
             Method setWindowLayoutTypeMethod =
                     PopupWindow.class.getMethod("setWindowLayoutType", int.class);
@@ -241,6 +230,23 @@
         }
     }
 
+    // Implements DisplayAndroidObserver
+    @Override
+    public void onRotationChanged(int rotation) {
+        mRotationChanged = true;
+    }
+
+    // Implements DisplayAndroidObserver
+    @Override
+    public void onDIPScaleChanged(float dipScale) {
+        if (mDeviceScale != dipScale) {
+            mDeviceScale = dipScale;
+
+            // Postpone update till onConfigurationChanged()
+            mNeedsUpdateDrawable = true;
+        }
+    }
+
     @SuppressLint("ClickableViewAccessibility")
     @Override
     public boolean onTouchEvent(MotionEvent event) {
diff --git a/ash/BUILD.gn b/ash/BUILD.gn
index 5700ebb..e07f65bb 100644
--- a/ash/BUILD.gn
+++ b/ash/BUILD.gn
@@ -295,6 +295,8 @@
     "login/ui/note_action_launch_button.h",
     "login/ui/pin_keyboard_animation.cc",
     "login/ui/pin_keyboard_animation.h",
+    "login/ui/scrollable_users_list_view.cc",
+    "login/ui/scrollable_users_list_view.h",
     "login/ui/user_switch_flip_animation.cc",
     "login/ui/user_switch_flip_animation.h",
     "login_status.h",
diff --git a/ash/login/ui/layout_util.cc b/ash/login/ui/layout_util.cc
index a7a634d..26874f5 100644
--- a/ash/login/ui/layout_util.cc
+++ b/ash/login/ui/layout_util.cc
@@ -5,7 +5,10 @@
 #include "ash/login/ui/layout_util.h"
 
 #include "ash/login/ui/non_accessible_view.h"
+#include "ash/shell.h"
+#include "ui/display/manager/display_manager.h"
 #include "ui/views/layout/box_layout.h"
+#include "ui/views/widget/widget.h"
 
 namespace ash {
 namespace login_layout_util {
@@ -21,5 +24,33 @@
   return proxy;
 }
 
+bool ShouldShowLandscape(const views::Widget* widget) {
+  // |widget| is null when the view is being constructed. Default to landscape
+  // in that case. A new layout will happen when the view is attached to a
+  // widget (see LockContentsView::AddedToWidget), which will let us fetch the
+  // correct display orientation.
+  if (!widget)
+    return true;
+
+  // Get the orientation for |widget|.
+  const display::Display& display =
+      display::Screen::GetScreen()->GetDisplayNearestWindow(
+          widget->GetNativeWindow());
+  display::ManagedDisplayInfo info =
+      Shell::Get()->display_manager()->GetDisplayInfo(display.id());
+
+  // Return true if it is landscape.
+  switch (info.GetActiveRotation()) {
+    case display::Display::ROTATE_0:
+    case display::Display::ROTATE_180:
+      return true;
+    case display::Display::ROTATE_90:
+    case display::Display::ROTATE_270:
+      return false;
+  }
+  NOTREACHED();
+  return true;
+}
+
 }  // namespace login_layout_util
 }  // namespace ash
diff --git a/ash/login/ui/layout_util.h b/ash/login/ui/layout_util.h
index a97129b..314c058 100644
--- a/ash/login/ui/layout_util.h
+++ b/ash/login/ui/layout_util.h
@@ -9,6 +9,7 @@
 
 namespace views {
 class View;
+class Widget;
 }
 
 namespace ash {
@@ -19,6 +20,8 @@
 // size, regardless of the view's parent's layout manager.
 ASH_EXPORT views::View* WrapViewForPreferredSize(views::View* view);
 
+// Returns true if landscape constants should be used for UI shown in |widget|.
+ASH_EXPORT bool ShouldShowLandscape(const views::Widget* widget);
 }  // namespace login_layout_util
 
 }  // namespace ash
diff --git a/ash/login/ui/lock_contents_view.cc b/ash/login/ui/lock_contents_view.cc
index d414dc5..42a7ad1 100644
--- a/ash/login/ui/lock_contents_view.cc
+++ b/ash/login/ui/lock_contents_view.cc
@@ -9,13 +9,14 @@
 #include "ash/focus_cycler.h"
 #include "ash/ime/ime_controller.h"
 #include "ash/login/login_screen_controller.h"
+#include "ash/login/ui/layout_util.h"
 #include "ash/login/ui/lock_screen.h"
 #include "ash/login/ui/login_auth_user_view.h"
 #include "ash/login/ui/login_bubble.h"
-#include "ash/login/ui/login_display_style.h"
 #include "ash/login/ui/login_user_view.h"
 #include "ash/login/ui/non_accessible_view.h"
 #include "ash/login/ui/note_action_launch_button.h"
+#include "ash/login/ui/scrollable_users_list_view.h"
 #include "ash/root_window_controller.h"
 #include "ash/shelf/shelf.h"
 #include "ash/shelf/shelf_widget.h"
@@ -65,18 +66,6 @@
 constexpr int kMediumDensityDistanceBetweenAuthUserAndUsersLandscapeDp = 220;
 constexpr int kMediumDensityDistanceBetweenAuthUserAndUsersPortraitDp = 84;
 
-// Vertical padding between each entry in the medium density user row
-constexpr int kMediumDensityVerticalDistanceBetweenUsersDp = 53;
-
-// Horizontal padding left and right of the high density user list.
-constexpr int kHighDensityHorizontalPaddingLeftOfUserListLandscapeDp = 72;
-constexpr int kHighDensityHorizontalPaddingRightOfUserListLandscapeDp = 72;
-constexpr int kHighDensityHorizontalPaddingLeftOfUserListPortraitDp = 46;
-constexpr int kHighDensityHorizontalPaddingRightOfUserListPortraitDp = 12;
-
-// The vertical padding between each entry in the extra-small user row
-constexpr int kHighDensityVerticalDistanceBetweenUsersDp = 32;
-
 constexpr const char kLockContentsViewName[] = "LockContentsView";
 
 // A view which stores two preferred sizes. The embedder can control which one
@@ -100,35 +89,6 @@
   DISALLOW_COPY_AND_ASSIGN(MultiSizedView);
 };
 
-// Returns true if landscape constants should be used for UI shown in |widget|.
-bool ShouldShowLandscape(views::Widget* widget) {
-  // |widget| is null when the view is being constructed. Default to landscape
-  // in that case. A new layout will happen when the view is attached to a
-  // widget (see LockContentsView::AddedToWidget), which will let us fetch the
-  // correct display orientation.
-  if (!widget)
-    return true;
-
-  // Get the orientation for |widget|.
-  const display::Display& display =
-      display::Screen::GetScreen()->GetDisplayNearestWindow(
-          widget->GetNativeWindow());
-  display::ManagedDisplayInfo info =
-      Shell::Get()->display_manager()->GetDisplayInfo(display.id());
-
-  // Return true if it is landscape.
-  switch (info.GetActiveRotation()) {
-    case display::Display::ROTATE_0:
-    case display::Display::ROTATE_180:
-      return true;
-    case display::Display::ROTATE_90:
-    case display::Display::ROTATE_270:
-      return false;
-  }
-  NOTREACHED();
-  return true;
-}
-
 // Returns the first or last focusable child of |root|. If |reverse| is false,
 // this returns the first focusable child. If |reverse| is true, this returns
 // the last focusable child.
@@ -209,9 +169,8 @@
   return view_->opt_secondary_auth_;
 }
 
-const std::vector<LoginUserView*>& LockContentsView::TestApi::user_views()
-    const {
-  return view_->user_views_;
+ScrollableUsersListView* LockContentsView::TestApi::users_list() const {
+  return view_->users_list_;
 }
 
 views::View* LockContentsView::TestApi::note_action() const {
@@ -300,8 +259,8 @@
   View::Layout();
   LayoutTopHeader();
 
-  if (scroller_)
-    scroller_->ClipHeightTo(size().height(), size().height());
+  if (users_list_)
+    users_list_->Layout();
 }
 
 void LockContentsView::AddedToWidget() {
@@ -349,9 +308,8 @@
   // The debug view will potentially call this method many times. Make sure to
   // invalidate any child references.
   main_view_->RemoveAllChildViews(true /*delete_children*/);
-  user_views_.clear();
   opt_secondary_auth_ = nullptr;
-  scroller_ = nullptr;
+  users_list_ = nullptr;
   rotation_actions_.clear();
 
   // Build user state list.
@@ -573,21 +531,8 @@
       kMediumDensityDistanceBetweenAuthUserAndUsersLandscapeDp,
       kMediumDensityDistanceBetweenAuthUserAndUsersPortraitDp));
 
-  // Add additional users.
-  auto* row = new NonAccessibleView();
-  main_view_->AddChildView(row);
-  row->SetLayoutManager(std::make_unique<views::BoxLayout>(
-      views::BoxLayout::kVertical, gfx::Insets(),
-      kMediumDensityVerticalDistanceBetweenUsersDp));
-  for (std::size_t i = 1u; i < users.size(); ++i) {
-    auto* view =
-        new LoginUserView(LoginDisplayStyle::kSmall, false /*show_dropdown*/,
-                          base::Bind(&LockContentsView::SwapToAuthUser,
-                                     base::Unretained(this), i - 1) /*on_tap*/);
-    user_views_.push_back(view);
-    view->UpdateForUser(users[i], false /*animate*/);
-    row->AddChildView(view);
-  }
+  users_list_ = BuildScrollableUsersListView(users, LoginDisplayStyle::kSmall);
+  main_view_->AddChildView(users_list_);
 
   // Insert dynamic spacing on left/right of the content which changes based on
   // screen rotation and display size.
@@ -611,8 +556,6 @@
 
 void LockContentsView::CreateHighDensityLayout(
     const std::vector<mojom::LoginUserInfoPtr>& users) {
-  // TODO: Finish 7+ user layout.
-
   // Insert spacing before and after the auth view.
   auto* fill = new NonAccessibleView();
   main_view_->AddChildViewAt(fill, 0);
@@ -622,41 +565,13 @@
   main_view_->AddChildView(fill);
   main_layout_->SetFlexForView(fill, 1);
 
-  // Padding left of user list.
-  main_view_->AddChildView(MakeOrientationViewWithWidths(
-      kHighDensityHorizontalPaddingLeftOfUserListLandscapeDp,
-      kHighDensityHorizontalPaddingLeftOfUserListPortraitDp));
-
-  // Add user list.
-  auto* row = new NonAccessibleView();
-  auto row_layout = std::make_unique<views::BoxLayout>(
-      views::BoxLayout::kVertical, gfx::Insets(),
-      kHighDensityVerticalDistanceBetweenUsersDp);
-  row_layout->set_minimum_cross_axis_size(
-      LoginUserView::WidthForLayoutStyle(LoginDisplayStyle::kExtraSmall));
-  row->SetLayoutManager(std::move(row_layout));
-  for (std::size_t i = 1u; i < users.size(); ++i) {
-    auto* view = new LoginUserView(
-        LoginDisplayStyle::kExtraSmall, false /*show_dropdown*/,
-        base::Bind(&LockContentsView::SwapToAuthUser, base::Unretained(this),
-                   i - 1) /*on_tap*/);
-    user_views_.push_back(view);
-    view->UpdateForUser(users[i], false /*animate*/);
-    row->AddChildView(view);
-  }
-  scroller_ = new views::ScrollView();
-  scroller_->SetContents(row);
-  scroller_->ClipHeightTo(size().height(), size().height());
-  main_view_->AddChildView(scroller_);
-
-  // Padding right of user list.
-  main_view_->AddChildView(MakeOrientationViewWithWidths(
-      kHighDensityHorizontalPaddingRightOfUserListLandscapeDp,
-      kHighDensityHorizontalPaddingRightOfUserListPortraitDp));
+  users_list_ =
+      BuildScrollableUsersListView(users, LoginDisplayStyle::kExtraSmall);
+  main_view_->AddChildView(users_list_);
 }
 
 void LockContentsView::DoLayout() {
-  bool landscape = ShouldShowLandscape(GetWidget());
+  bool landscape = login_layout_util::ShouldShowLandscape(GetWidget());
   for (auto& action : rotation_actions_)
     action.Run(landscape);
 
@@ -693,7 +608,7 @@
 }
 
 void LockContentsView::AddRotationAction(const OnRotate& on_rotate) {
-  on_rotate.Run(ShouldShowLandscape(GetWidget()));
+  on_rotate.Run(login_layout_util::ShouldShowLandscape(GetWidget()));
   rotation_actions_.push_back(on_rotate);
 }
 
@@ -763,7 +678,9 @@
 }
 
 void LockContentsView::SwapToAuthUser(int user_index) {
-  auto* view = user_views_[user_index];
+  DCHECK(users_list_);
+  auto* view = users_list_->GetUserViewAtIndex(user_index);
+  DCHECK(view);
   mojom::LoginUserInfoPtr previous_auth_user =
       primary_auth_->current_user()->Clone();
   mojom::LoginUserInfoPtr new_auth_user = view->current_user()->Clone();
@@ -929,6 +846,18 @@
   }
 
   return view;
-};
+}
+
+ScrollableUsersListView* LockContentsView::BuildScrollableUsersListView(
+    const std::vector<mojom::LoginUserInfoPtr>& users,
+    LoginDisplayStyle display_style) {
+  auto* view = new ScrollableUsersListView(
+      users,
+      base::BindRepeating(&LockContentsView::SwapToAuthUser,
+                          base::Unretained(this)),
+      display_style);
+  view->ClipHeightTo(view->contents()->size().height(), size().height());
+  return view;
+}
 
 }  // namespace ash
diff --git a/ash/login/ui/lock_contents_view.h b/ash/login/ui/lock_contents_view.h
index dfd687d..1f1af85 100644
--- a/ash/login/ui/lock_contents_view.h
+++ b/ash/login/ui/lock_contents_view.h
@@ -12,6 +12,7 @@
 #include "ash/ash_export.h"
 #include "ash/login/lock_screen_apps_focus_observer.h"
 #include "ash/login/ui/login_data_dispatcher.h"
+#include "ash/login/ui/login_display_style.h"
 #include "ash/login/ui/non_accessible_view.h"
 #include "ash/session/session_observer.h"
 #include "ash/system/system_tray_focus_observer.h"
@@ -25,7 +26,6 @@
 
 namespace views {
 class BoxLayout;
-class ScrollView;
 class StyledLabel;
 }  // namespace views
 
@@ -33,8 +33,8 @@
 
 class LoginAuthUserView;
 class LoginBubble;
-class LoginUserView;
 class NoteActionLaunchButton;
+class ScrollableUsersListView;
 
 namespace mojom {
 enum class TrayActionState;
@@ -60,7 +60,7 @@
 
     LoginAuthUserView* primary_auth() const;
     LoginAuthUserView* opt_secondary_auth() const;
-    const std::vector<LoginUserView*>& user_views() const;
+    ScrollableUsersListView* users_list() const;
     views::View* note_action() const;
     LoginBubble* tooltip_bubble() const;
     views::View* dev_channel_info() const;
@@ -212,17 +212,18 @@
   LoginAuthUserView* TryToFindAuthUser(const AccountId& user,
                                        bool require_auth_active);
 
+  // Returns scrollable view with initialized size and rows for all |users|.
+  ScrollableUsersListView* BuildScrollableUsersListView(
+      const std::vector<mojom::LoginUserInfoPtr>& users,
+      LoginDisplayStyle display_style);
+
   std::vector<UserState> users_;
 
   LoginDataDispatcher* const data_dispatcher_;  // Unowned.
 
   LoginAuthUserView* primary_auth_ = nullptr;
   LoginAuthUserView* opt_secondary_auth_ = nullptr;
-
-  // All non-auth users; |primary_auth_| and |secondary_auth_| are not contained
-  // in this list.
-  std::vector<LoginUserView*> user_views_;
-  views::ScrollView* scroller_ = nullptr;
+  ScrollableUsersListView* users_list_ = nullptr;
 
   // View that contains the note action button and the dev channel info labels,
   // placed on the top right corner of the screen without affecting layout of
diff --git a/ash/login/ui/lock_contents_view_unittest.cc b/ash/login/ui/lock_contents_view_unittest.cc
index 0f630c93..ace1803 100644
--- a/ash/login/ui/lock_contents_view_unittest.cc
+++ b/ash/login/ui/lock_contents_view_unittest.cc
@@ -11,6 +11,7 @@
 #include "ash/login/ui/login_display_style.h"
 #include "ash/login/ui/login_test_base.h"
 #include "ash/login/ui/login_user_view.h"
+#include "ash/login/ui/scrollable_users_list_view.h"
 #include "ash/public/interfaces/tray_action.mojom.h"
 #include "ash/shell.h"
 #include "base/strings/utf_string_conversions.h"
@@ -33,21 +34,22 @@
   std::unique_ptr<views::Widget> widget = CreateWidgetWithContent(contents);
 
   // Verify user list and secondary auth are not shown for one user.
-  LockContentsView::TestApi test_api(contents);
-  EXPECT_EQ(0u, test_api.user_views().size());
-  EXPECT_FALSE(test_api.opt_secondary_auth());
+  LockContentsView::TestApi lock_contents(contents);
+  EXPECT_EQ(nullptr, lock_contents.users_list());
+  EXPECT_FALSE(lock_contents.opt_secondary_auth());
 
   // Verify user list is not shown for two users, but secondary auth is.
   SetUserCount(2);
-  EXPECT_EQ(0u, test_api.user_views().size());
-  EXPECT_TRUE(test_api.opt_secondary_auth());
+  EXPECT_EQ(nullptr, lock_contents.users_list());
+  EXPECT_TRUE(lock_contents.opt_secondary_auth());
 
   // Verify user names and pod style is set correctly for 3-25 users. This also
   // sanity checks that LockContentsView can respond to a multiple user change
   // events fired from the data dispatcher, which is needed for the debug UI.
   for (size_t user_count = 3; user_count < 25; ++user_count) {
     SetUserCount(user_count);
-    EXPECT_EQ(user_count - 1, test_api.user_views().size());
+    ScrollableUsersListView::TestApi users_list(lock_contents.users_list());
+    EXPECT_EQ(user_count - 1, users_list.user_views().size());
 
     // 1 extra user gets large style.
     LoginDisplayStyle expected_style = LoginDisplayStyle::kLarge;
@@ -58,8 +60,8 @@
     if (user_count >= 7)
       expected_style = LoginDisplayStyle::kExtraSmall;
 
-    for (size_t i = 0; i < test_api.user_views().size(); ++i) {
-      LoginUserView::TestApi user_test_api(test_api.user_views()[i]);
+    for (size_t i = 0; i < users_list.user_views().size(); ++i) {
+      LoginUserView::TestApi user_test_api(users_list.user_views()[i]);
       EXPECT_EQ(expected_style, user_test_api.display_style());
 
       const mojom::LoginUserInfoPtr& user = users()[i + 1];
@@ -117,18 +119,19 @@
   // Build lock screen with three users.
   auto* contents = new LockContentsView(mojom::TrayActionState::kNotAvailable,
                                         data_dispatcher());
-  LockContentsView::TestApi test_api(contents);
+  LockContentsView::TestApi lock_contents(contents);
   SetUserCount(3);
   std::unique_ptr<views::Widget> widget = CreateWidgetWithContent(contents);
 
   // Returns the distance between the auth user view and the user view.
   auto calculate_distance = [&]() {
-    if (test_api.opt_secondary_auth()) {
-      return test_api.opt_secondary_auth()->GetBoundsInScreen().x() -
-             test_api.primary_auth()->GetBoundsInScreen().x();
+    if (lock_contents.opt_secondary_auth()) {
+      return lock_contents.opt_secondary_auth()->GetBoundsInScreen().x() -
+             lock_contents.primary_auth()->GetBoundsInScreen().x();
     }
-    return test_api.user_views()[0]->GetBoundsInScreen().x() -
-           test_api.primary_auth()->GetBoundsInScreen().x();
+    ScrollableUsersListView::TestApi users_list(lock_contents.users_list());
+    return users_list.user_views()[0]->GetBoundsInScreen().x() -
+           lock_contents.primary_auth()->GetBoundsInScreen().x();
   };
 
   const display::Display& display =
@@ -211,14 +214,15 @@
   // Build lock screen with five users.
   auto* contents = new LockContentsView(mojom::TrayActionState::kNotAvailable,
                                         data_dispatcher());
-  LockContentsView::TestApi test_api(contents);
+  LockContentsView::TestApi lock_contents(contents);
   SetUserCount(5);
-  EXPECT_EQ(users().size() - 1, test_api.user_views().size());
+  ScrollableUsersListView::TestApi users_list(lock_contents.users_list());
+  EXPECT_EQ(users().size() - 1, users_list.user_views().size());
   std::unique_ptr<views::Widget> widget = CreateWidgetWithContent(contents);
 
-  LoginAuthUserView* auth_view = test_api.primary_auth();
+  LoginAuthUserView* auth_view = lock_contents.primary_auth();
 
-  for (const LoginUserView* const list_user_view : test_api.user_views()) {
+  for (const LoginUserView* const list_user_view : users_list.user_views()) {
     // Capture user info to validate it did not change during the swap.
     AccountId auth_id = auth_view->current_user()->basic_user_info->account_id;
     AccountId list_user_id =
@@ -238,7 +242,7 @@
 
     // Validate that every user is still unique.
     std::unordered_set<std::string> emails;
-    for (const LoginUserView* const view : test_api.user_views()) {
+    for (const LoginUserView* const view : users_list.user_views()) {
       std::string email =
           view->current_user()->basic_user_info->account_id.GetUserEmail();
       EXPECT_TRUE(emails.insert(email).second);
diff --git a/ash/login/ui/scrollable_users_list_view.cc b/ash/login/ui/scrollable_users_list_view.cc
new file mode 100644
index 0000000..297892d
--- /dev/null
+++ b/ash/login/ui/scrollable_users_list_view.cc
@@ -0,0 +1,205 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ash/login/ui/scrollable_users_list_view.h"
+
+#include "ash/login/ui/layout_util.h"
+#include "ash/login/ui/login_display_style.h"
+#include "ash/login/ui/login_user_view.h"
+#include "ash/login/ui/non_accessible_view.h"
+#include "ash/public/cpp/login_constants.h"
+#include "ash/public/interfaces/login_user_info.mojom.h"
+#include "ash/shell.h"
+#include "ash/wallpaper/wallpaper_controller.h"
+#include "ui/display/screen.h"
+#include "ui/gfx/canvas.h"
+#include "ui/gfx/color_analysis.h"
+#include "ui/gfx/color_utils.h"
+#include "ui/views/layout/box_layout.h"
+
+namespace ash {
+
+namespace {
+
+// Vertical padding between user rows in the small display style.
+constexpr int kSmallVerticalDistanceBetweenUsersDp = 53;
+
+// Horizontal padding left and right of the user list in the extra small display
+// style.
+constexpr int kExtraSmallHorizontalPaddingLeftOfUserListLandscapeDp = 72;
+constexpr int kExtraSmallHorizontalPaddingRightOfUserListLandscapeDp = 72;
+constexpr int kExtraSmallHorizontalPaddingLeftOfUserListPortraitDp = 46;
+constexpr int kExtraSmallHorizontalPaddingRightOfUserListPortraitDp = 12;
+
+// Vertical padding of the user list in the extra small display style.
+constexpr int kExtraSmallVerticalPaddingOfUserListLandscapeDp = 72;
+constexpr int kExtraSmallVerticalPaddingOfUserListPortraitDp = 66;
+
+// Vertical padding between user rows in extra small display style.
+constexpr int kExtraSmallVerticalDistanceBetweenUsersDp = 32;
+
+// Height of gradient shown at the top/bottom of the user list in the extra
+// small display style.
+constexpr int kExtraSmallGradientHeightDp = 112;
+
+}  // namespace
+
+ScrollableUsersListView::TestApi::TestApi(ScrollableUsersListView* view)
+    : view_(view) {}
+
+ScrollableUsersListView::TestApi::~TestApi() = default;
+
+const std::vector<LoginUserView*>&
+ScrollableUsersListView::TestApi::user_views() const {
+  return view_->user_views_;
+}
+
+ScrollableUsersListView::ScrollableUsersListView(
+    const std::vector<mojom::LoginUserInfoPtr>& users,
+    const OnUserViewTap& on_user_view_tap,
+    LoginDisplayStyle display_style)
+    : views::ScrollView() {
+  layout_params_ = GetLayoutParams(display_style);
+  gradient_params_ = GetGradientParams(display_style);
+
+  auto* contents = new NonAccessibleView();
+  layout_ = contents->SetLayoutManager(std::make_unique<views::BoxLayout>(
+      views::BoxLayout::kVertical, gfx::Insets(),
+      layout_params_.between_child_spacing));
+  layout_->SetDefaultFlex(1);
+  layout_->set_minimum_cross_axis_size(
+      LoginUserView::WidthForLayoutStyle(layout_params_.display_style));
+  layout_->set_main_axis_alignment(
+      views::BoxLayout::MainAxisAlignment::MAIN_AXIS_ALIGNMENT_CENTER);
+
+  for (std::size_t i = 1u; i < users.size(); ++i) {
+    auto* view = new LoginUserView(
+        layout_params_.display_style, false /*show_dropdown*/,
+        base::BindRepeating(on_user_view_tap, i - 1) /*on_tap*/);
+    user_views_.push_back(view);
+    view->UpdateForUser(users[i], false /*animate*/);
+    contents->AddChildView(view);
+  }
+
+  SetContents(contents);
+  SetBackgroundColor(SK_ColorTRANSPARENT);
+}
+
+ScrollableUsersListView::~ScrollableUsersListView() = default;
+
+LoginUserView* ScrollableUsersListView::GetUserViewAtIndex(int index) {
+  return static_cast<size_t>(index) < user_views_.size() ? user_views_[index]
+                                                         : nullptr;
+}
+
+void ScrollableUsersListView::Layout() {
+  DCHECK(layout_);
+  bool should_show_landscape =
+      login_layout_util::ShouldShowLandscape(GetWidget());
+  layout_->set_inside_border_insets(should_show_landscape
+                                        ? layout_params_.insets_landscape
+                                        : layout_params_.insets_portrait);
+  layout_->Layout(contents());
+
+  if (parent()) {
+    int contents_height = contents()->size().height();
+    int parent_height = parent()->size().height();
+    // Adjust height of the content. In extra small style, contents occupies the
+    // whole height of the parent. In small style, content is centered
+    // vertically.
+    ClipHeightTo(layout_params_.display_style == LoginDisplayStyle::kExtraSmall
+                     ? parent_height
+                     : contents_height,
+                 parent_height);
+  }
+  ScrollView::Layout();
+}
+
+void ScrollableUsersListView::OnPaintBackground(gfx::Canvas* canvas) {
+  // Draws symmetrical linear gradient at the top and bottom of the view.
+  SkScalar view_height = base::checked_cast<SkScalar>(height());
+  // Start and end point of the drawing in view space.
+  SkPoint in_view_coordinates[2] = {SkPoint(), SkPoint::Make(0.f, view_height)};
+  // Positions of colors to create gradient define in 0 to 1 range.
+  SkScalar top_gradient_end = gradient_params_.height / view_height;
+  SkScalar bottom_gradient_start = 1.f - top_gradient_end;
+  SkScalar color_positions[4] = {0.f, top_gradient_end, bottom_gradient_start,
+                                 1.f};
+  SkColor colors[4] = {gradient_params_.color_from, gradient_params_.color_to,
+                       gradient_params_.color_to, gradient_params_.color_from};
+
+  cc::PaintFlags flags;
+  flags.setShader(cc::PaintShader::MakeLinearGradient(
+      in_view_coordinates, colors, color_positions, 4,
+      SkShader::kClamp_TileMode));
+  flags.setStyle(cc::PaintFlags::kFill_Style);
+  canvas->DrawRect(GetLocalBounds(), flags);
+}
+
+ScrollableUsersListView::LayoutParams ScrollableUsersListView::GetLayoutParams(
+    LoginDisplayStyle style) {
+  switch (style) {
+    case LoginDisplayStyle::kExtraSmall: {
+      ScrollableUsersListView::LayoutParams params;
+      params.display_style = LoginDisplayStyle::kExtraSmall;
+      params.between_child_spacing = kExtraSmallVerticalDistanceBetweenUsersDp;
+      params.insets_landscape =
+          gfx::Insets(kExtraSmallVerticalPaddingOfUserListLandscapeDp,
+                      kExtraSmallHorizontalPaddingLeftOfUserListLandscapeDp,
+                      kExtraSmallVerticalPaddingOfUserListLandscapeDp,
+                      kExtraSmallHorizontalPaddingRightOfUserListLandscapeDp);
+      params.insets_portrait =
+          gfx::Insets(kExtraSmallVerticalPaddingOfUserListPortraitDp,
+                      kExtraSmallHorizontalPaddingLeftOfUserListPortraitDp,
+                      kExtraSmallVerticalPaddingOfUserListPortraitDp,
+                      kExtraSmallHorizontalPaddingRightOfUserListPortraitDp);
+      return params;
+    }
+    case LoginDisplayStyle::kSmall: {
+      ScrollableUsersListView::LayoutParams params;
+      params.between_child_spacing = kSmallVerticalDistanceBetweenUsersDp;
+      params.display_style = LoginDisplayStyle::kSmall;
+      return params;
+    }
+    default: {
+      NOTREACHED();
+      return ScrollableUsersListView::LayoutParams();
+    }
+  }
+}
+
+ScrollableUsersListView::GradientParams
+ScrollableUsersListView::GetGradientParams(LoginDisplayStyle style) {
+  switch (style) {
+    case LoginDisplayStyle::kExtraSmall: {
+      SkColor dark_muted_color =
+          Shell::Get()->wallpaper_controller()->GetProminentColor(
+              color_utils::ColorProfile(color_utils::LumaRange::DARK,
+                                        color_utils::SaturationRange::MUTED));
+      SkColor tint_color = color_utils::GetResultingPaintColor(
+          SkColorSetA(login_constants::kDefaultBaseColor,
+                      login_constants::kTranslucentColorDarkenAlpha),
+          SkColorSetA(dark_muted_color, SK_AlphaOPAQUE));
+      tint_color =
+          SkColorSetA(tint_color, login_constants::kScrollTranslucentAlpha);
+
+      ScrollableUsersListView::GradientParams params;
+      params.color_from = dark_muted_color;
+      params.color_to = tint_color;
+      params.height = kExtraSmallGradientHeightDp;
+      return params;
+    }
+    case LoginDisplayStyle::kSmall: {
+      ScrollableUsersListView::GradientParams params;
+      params.height = 0.f;
+      return params;
+    }
+    default: {
+      NOTREACHED();
+      return ScrollableUsersListView::GradientParams();
+    }
+  }
+}
+
+}  // namespace ash
diff --git a/ash/login/ui/scrollable_users_list_view.h b/ash/login/ui/scrollable_users_list_view.h
new file mode 100644
index 0000000..d5f17f5
--- /dev/null
+++ b/ash/login/ui/scrollable_users_list_view.h
@@ -0,0 +1,97 @@
+// 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 ASH_LOGIN_UI_SCROLLABLE_USERS_LIST_VIEW_H_
+#define ASH_LOGIN_UI_SCROLLABLE_USERS_LIST_VIEW_H_
+
+#include <vector>
+
+#include "ash/ash_export.h"
+#include "ash/login/ui/login_display_style.h"
+#include "ash/public/interfaces/login_user_info.mojom.h"
+#include "third_party/skia/include/core/SkColor.h"
+#include "ui/views/controls/scroll_view.h"
+
+namespace views {
+class View;
+class BoxLayout;
+}  // namespace views
+
+namespace ash {
+
+class LoginUserView;
+
+// Scrollable list of the users. Stores the list of login user views. Can be
+// styled with GradientParams that define gradient tinting at the top and at the
+// bottom. Can be styled with LayoutParams that define spacing and sizing.
+class ASH_EXPORT ScrollableUsersListView : public views::ScrollView {
+ public:
+  // TestApi is used for tests to get internal implementation details.
+  class ASH_EXPORT TestApi {
+   public:
+    explicit TestApi(ScrollableUsersListView* view);
+    ~TestApi();
+
+    const std::vector<LoginUserView*>& user_views() const;
+
+   private:
+    ScrollableUsersListView* const view_;
+  };
+
+  using OnUserViewTap = base::RepeatingCallback<void(int)>;
+
+  // Initializes users list with rows for all |users|. The |display_style| is
+  // used to determine layout and sizings. |on_user_view_tap| callback is
+  // invoked whenever user row is tapped.
+  ScrollableUsersListView(const std::vector<mojom::LoginUserInfoPtr>& users,
+                          const OnUserViewTap& on_user_view_tap,
+                          LoginDisplayStyle display_style);
+  ~ScrollableUsersListView() override;
+
+  // Returns user view at |index| if it exists or nullptr otherwise.
+  LoginUserView* GetUserViewAtIndex(int index);
+
+  // views::View:
+  void Layout() override;
+  void OnPaintBackground(gfx::Canvas* canvas) override;
+
+ private:
+  struct GradientParams {
+    // Start color for drawing linear gradient.
+    SkColor color_from;
+    // End color for drawing linear gradient.
+    SkColor color_to;
+    // Height of linear gradient.
+    SkScalar height;
+  };
+
+  struct LayoutParams {
+    // Display style to determine layout and sizing of users list.
+    LoginDisplayStyle display_style;
+    // Spacing between user entries on users list.
+    int between_child_spacing;
+    // Insets around users list used in landscape orientation.
+    gfx::Insets insets_landscape;
+    // Insets around users list used in portrait orientation.
+    gfx::Insets insets_portrait;
+  };
+
+  // Returns parameters of the layout for given display |style|.
+  LayoutParams GetLayoutParams(LoginDisplayStyle style);
+  // Returns parameters of the gradient for given display |style|.
+  GradientParams GetGradientParams(LoginDisplayStyle style);
+
+  views::BoxLayout* layout_ = nullptr;
+
+  std::vector<LoginUserView*> user_views_;
+
+  GradientParams gradient_params_;
+  LayoutParams layout_params_;
+
+  DISALLOW_COPY_AND_ASSIGN(ScrollableUsersListView);
+};
+
+}  // namespace ash
+
+#endif  // ASH_LOGIN_UI_SCROLLABLE_USERS_LIST_VIEW_H_
\ No newline at end of file
diff --git a/ash/wm/workspace/workspace_window_resizer.cc b/ash/wm/workspace/workspace_window_resizer.cc
index ace3d4d..f7ea0c7 100644
--- a/ash/wm/workspace/workspace_window_resizer.cc
+++ b/ash/wm/workspace/workspace_window_resizer.cc
@@ -489,7 +489,10 @@
 
   // A mousemove should still show the cursor even if the window is
   // being moved or resized with touch, so do not lock the cursor.
-  if (details().source != ::wm::WINDOW_MOVE_SOURCE_TOUCH) {
+  // If the window state is controlled by a client, which may set the
+  // cursor by itself, don't lock the cursor.
+  if (details().source != ::wm::WINDOW_MOVE_SOURCE_TOUCH &&
+      !window_state->allow_set_bounds_direct()) {
     ShellPort::Get()->LockCursor();
     did_lock_cursor_ = true;
   }
diff --git a/base/base_paths_fuchsia.cc b/base/base_paths_fuchsia.cc
index 0317929..af09390 100644
--- a/base/base_paths_fuchsia.cc
+++ b/base/base_paths_fuchsia.cc
@@ -21,7 +21,7 @@
 
 base::FilePath GetPackageRoot() {
   base::FilePath path_obj(kPackageRoot);
-  if (PathExists(path_obj)) {
+  if (path_obj.IsParent(base::CommandLine::ForCurrentProcess()->GetProgram())) {
     return path_obj;
   } else {
     return base::FilePath();
diff --git a/build/BUILD.gn b/build/BUILD.gn
new file mode 100644
index 0000000..7ab955a
--- /dev/null
+++ b/build/BUILD.gn
@@ -0,0 +1,9 @@
+# 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.
+
+source_set("buildflag_header_h") {
+  sources = [
+    "buildflag.h",
+  ]
+}
diff --git a/build/android/gyp/process_resources.py b/build/android/gyp/process_resources.py
index 72c9728..7df793e 100755
--- a/build/android/gyp/process_resources.py
+++ b/build/android/gyp/process_resources.py
@@ -751,7 +751,9 @@
     subprocess.check_call(args)
     os.remove(png_path)
   # Android requires pngs for 9-patch images.
-  pool.map(convert_image, [f for f in png_files if not f.endswith('.9.png')])
+  # Daydream (*.dd) requires pngs for icon files.
+  pool.map(convert_image, [f for f in png_files if not (f.endswith('.9.png') or
+                           f.endswith('.dd.png'))])
   pool.close()
   pool.join()
 
diff --git a/build/android/pylib/output/remote_output_manager.py b/build/android/pylib/output/remote_output_manager.py
index 1e624e1..425f143 100644
--- a/build/android/pylib/output/remote_output_manager.py
+++ b/build/android/pylib/output/remote_output_manager.py
@@ -88,4 +88,4 @@
     if self._datatype == output_manager.Datatype.HTML:
       content_type = 'text/html'
     google_storage_helper.upload(
-        self._upload_path, self.name, self._bucket, content_type)
+        self._upload_path, self.name, self._bucket, content_type=content_type)
diff --git a/build/buildflag_header.gni b/build/buildflag_header.gni
index 1c97741c..53db6a83 100644
--- a/build/buildflag_header.gni
+++ b/build/buildflag_header.gni
@@ -133,5 +133,9 @@
                              "testonly",
                              "visibility",
                            ])
+
+    public_deps = [
+      "//build:buildflag_header_h",
+    ]
   }
 }
diff --git a/build/config/android/config.gni b/build/config/android/config.gni
index a533ce9..bbaa4b5 100644
--- a/build/config/android/config.gni
+++ b/build/config/android/config.gni
@@ -39,16 +39,16 @@
       # Android SDK release. Currently, only "o_mr1" is publicly supported.
       android_sdk_release = default_android_sdk_release
     }
+  }
 
-    # This is the result of profiling Chromium. Blindly applying it to arbitrary
-    # downstream projects and hoping it'll grant a speedup seems fragile. (Not
-    # to mention that it resides in a Chromium-specific directory.)
-    if (build_with_chromium) {
-      # The default AFDO profile used by public builds. Value may differ in
-      # internal builds.
-      clang_default_afdo_profile =
-          rebase_path("//chrome/android/profiles/chrome-profile-3309-text.prof")
-    }
+  # This is the result of profiling Chromium. Blindly applying it to arbitrary
+  # downstream projects and hoping it'll grant a speedup seems fragile. (Not
+  # to mention that it resides in a Chromium-specific directory.)
+  # FIXME(gbiv): remove the !defined() check after removing custom profiling
+  # logic from //clank.
+  if (!defined(clang_default_afdo_profile) && build_with_chromium) {
+    clang_default_afdo_profile =
+        rebase_path("//chrome/android/profiles/afdo.prof")
   }
 
   if (!defined(extra_chrome_shared_library_configs)) {
diff --git a/build/install-build-deps-android.sh b/build/install-build-deps-android.sh
index 15fea85..860f8f5b 100755
--- a/build/install-build-deps-android.sh
+++ b/build/install-build-deps-android.sh
@@ -37,6 +37,9 @@
 # Required for apk-patch-size-estimator
 sudo apt-get -y install bsdiff
 
+# Needed to unpack the profiles we pull with `gclient runhooks`
+sudo apt-get -y install bzip2
+
 # Do our own error handling for java.
 set +e
 
diff --git a/cc/tiles/gpu_image_decode_cache.cc b/cc/tiles/gpu_image_decode_cache.cc
index 94146e8..d37dd45 100644
--- a/cc/tiles/gpu_image_decode_cache.cc
+++ b/cc/tiles/gpu_image_decode_cache.cc
@@ -25,7 +25,6 @@
 #include "components/viz/common/gpu/raster_context_provider.h"
 #include "gpu/command_buffer/client/context_support.h"
 #include "gpu/command_buffer/client/raster_interface.h"
-#include "gpu_image_decode_cache.h"
 #include "skia/ext/texture_handle.h"
 #include "third_party/skia/include/core/SkCanvas.h"
 #include "third_party/skia/include/core/SkRefCnt.h"
diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
index a5fa5a9..bb7543d4 100644
--- a/chrome/android/BUILD.gn
+++ b/chrome/android/BUILD.gn
@@ -637,6 +637,7 @@
       "javatests/src/org/chromium/chrome/browser/vr_shell/WebVrInputTest.java",
       "javatests/src/org/chromium/chrome/browser/vr_shell/WebVrTabTest.java",
       "javatests/src/org/chromium/chrome/browser/vr_shell/WebVrTransitionTest.java",
+      "javatests/src/org/chromium/chrome/browser/vr_shell/WebXrInputTest.java",
       "javatests/src/org/chromium/chrome/browser/vr_shell/WebXrTransitionTest.java",
       "javatests/src/org/chromium/chrome/browser/vr_shell/XrTestFramework.java",
       "javatests/src/org/chromium/chrome/browser/webapps/TestFetchStorageCallback.java",
diff --git a/chrome/android/java/res_vr/drawable-nodpi/daydream_icon_background.png b/chrome/android/java/res_vr/drawable-nodpi/daydream_icon_background.dd.png
similarity index 100%
rename from chrome/android/java/res_vr/drawable-nodpi/daydream_icon_background.png
rename to chrome/android/java/res_vr/drawable-nodpi/daydream_icon_background.dd.png
Binary files differ
diff --git a/chrome/android/java/res_vr/drawable-nodpi/daydream_icon_foreground.png b/chrome/android/java/res_vr/drawable-nodpi/daydream_icon_foreground.dd.png
similarity index 100%
rename from chrome/android/java/res_vr/drawable-nodpi/daydream_icon_foreground.png
rename to chrome/android/java/res_vr/drawable-nodpi/daydream_icon_foreground.dd.png
Binary files differ
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/snackbar/SnackbarView.java b/chrome/android/java/src/org/chromium/chrome/browser/snackbar/SnackbarView.java
index a36350925..9267086 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/snackbar/SnackbarView.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/snackbar/SnackbarView.java
@@ -240,14 +240,16 @@
         int backgroundColor = snackbar.getBackgroundColor();
         if (backgroundColor == 0) {
             backgroundColor = ApiCompatibilityUtils.getColor(mContainerView.getResources(),
-                    FeatureUtilities.isChromeHomeEnabled() ? R.color.modern_primary_color
-                                                           : R.color.snackbar_background_color);
+                    FeatureUtilities.isChromeModernDesignEnabled()
+                            ? R.color.modern_primary_color
+                            : R.color.snackbar_background_color);
         }
 
         int textAppearanceResId = snackbar.getTextAppearance();
         if (textAppearanceResId == 0) {
-            textAppearanceResId = FeatureUtilities.isChromeHomeEnabled() ? R.style.BlackBodyDefault
-                                                                         : R.style.WhiteBody;
+            textAppearanceResId = FeatureUtilities.isChromeModernDesignEnabled()
+                    ? R.style.BlackBodyDefault
+                    : R.style.WhiteBody;
         }
         ApiCompatibilityUtils.setTextAppearance(mMessageView, textAppearanceResId);
 
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/widget/ListMenuButton.java b/chrome/android/java/src/org/chromium/chrome/browser/widget/ListMenuButton.java
index a49ace4..45a0482b 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/widget/ListMenuButton.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/widget/ListMenuButton.java
@@ -146,8 +146,8 @@
 
     @Override
     protected void onDetachedFromWindow() {
-        super.onDetachedFromWindow();
         dismiss();
+        super.onDetachedFromWindow();
     }
 
     private void showMenu() {
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/vr_shell/WebXrInputTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/vr_shell/WebXrInputTest.java
new file mode 100644
index 0000000..d3ba909
--- /dev/null
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/vr_shell/WebXrInputTest.java
@@ -0,0 +1,216 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.chrome.browser.vr_shell;
+
+import static org.chromium.chrome.browser.vr_shell.VrTestFramework.PAGE_LOAD_TIMEOUT_S;
+import static org.chromium.chrome.browser.vr_shell.VrTestFramework.POLL_TIMEOUT_SHORT_MS;
+import static org.chromium.chrome.test.util.ChromeRestriction.RESTRICTION_TYPE_VIEWER_DAYDREAM;
+
+import android.os.Build;
+import android.support.test.filters.MediumTest;
+
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.RuleChain;
+import org.junit.runner.RunWith;
+
+import org.chromium.base.ThreadUtils;
+import org.chromium.base.test.params.ParameterAnnotations.ClassParameter;
+import org.chromium.base.test.params.ParameterAnnotations.UseRunnerDelegate;
+import org.chromium.base.test.params.ParameterSet;
+import org.chromium.base.test.params.ParameterizedRunner;
+import org.chromium.base.test.util.CommandLineFlags;
+import org.chromium.base.test.util.DisableIf;
+import org.chromium.base.test.util.MinAndroidSdkLevel;
+import org.chromium.base.test.util.Restriction;
+import org.chromium.base.test.util.RetryOnFailure;
+import org.chromium.chrome.browser.ChromeFeatureList;
+import org.chromium.chrome.browser.ChromeSwitches;
+import org.chromium.chrome.browser.vr_shell.mock.MockVrDaydreamApi;
+import org.chromium.chrome.browser.vr_shell.rules.VrActivityRestriction;
+import org.chromium.chrome.browser.vr_shell.util.VrShellDelegateUtils;
+import org.chromium.chrome.browser.vr_shell.util.VrTestRuleUtils;
+import org.chromium.chrome.browser.vr_shell.util.XrTransitionUtils;
+import org.chromium.chrome.test.ChromeActivityTestRule;
+import org.chromium.chrome.test.ChromeJUnit4RunnerDelegate;
+import org.chromium.content.browser.test.util.TouchCommon;
+
+import java.util.List;
+import java.util.concurrent.Callable;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * End-to-end tests for sending input while using WebXR.
+ */
+@RunWith(ParameterizedRunner.class)
+@UseRunnerDelegate(ChromeJUnit4RunnerDelegate.class)
+@CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE, "enable-features=WebXR"})
+@MinAndroidSdkLevel(Build.VERSION_CODES.KITKAT) // WebXR is only supported on K+
+public class WebXrInputTest {
+    @ClassParameter
+    private static List<ParameterSet> sClassParams =
+            VrTestRuleUtils.generateDefaultVrTestRuleParameters();
+    @Rule
+    public RuleChain mRuleChain;
+
+    private ChromeActivityTestRule mVrTestRule;
+    private XrTestFramework mXrTestFramework;
+
+    public WebXrInputTest(Callable<ChromeActivityTestRule> callable) throws Exception {
+        mVrTestRule = callable.call();
+        mRuleChain = VrTestRuleUtils.wrapRuleInVrActivityRestrictionRule(mVrTestRule);
+    }
+
+    @Before
+    public void setUp() throws Exception {
+        mXrTestFramework = new XrTestFramework(mVrTestRule);
+    }
+
+    /**
+     * Tests that screen touches are not registered when in an exclusive session.
+     */
+    @Test
+    @MediumTest
+    @DisableIf.
+    Build(message = "Flaky on K/L crbug.com/762126", sdk_is_less_than = Build.VERSION_CODES.M)
+    @VrActivityRestriction({VrActivityRestriction.SupportedActivity.ALL})
+    public void testScreenTapsNotRegistered() throws InterruptedException {
+        mXrTestFramework.loadUrlAndAwaitInitialization(
+                XrTestFramework.getHtmlTestFile("webxr_test_screen_taps_not_registered"),
+                PAGE_LOAD_TIMEOUT_S);
+        XrTestFramework.executeStepAndWait(
+                "stepVerifyNoInitialTaps()", mXrTestFramework.getFirstTabWebContents());
+        XrTransitionUtils.enterPresentationOrFail(mXrTestFramework.getFirstTabCvc());
+        // Wait on VrShellImpl to say that its parent consumed the touch event
+        // Set to 2 because there's an ACTION_DOWN followed by ACTION_UP
+        final CountDownLatch touchRegisteredLatch = new CountDownLatch(2);
+        ((VrShellImpl) TestVrShellDelegate.getVrShellForTesting())
+                .setOnDispatchTouchEventForTesting(new OnDispatchTouchEventCallback() {
+                    @Override
+                    public void onDispatchTouchEvent(boolean parentConsumed) {
+                        if (!parentConsumed) Assert.fail("Parent did not consume event");
+                        touchRegisteredLatch.countDown();
+                    }
+                });
+        TouchCommon.singleClickView(mVrTestRule.getActivity().getWindow().getDecorView());
+        Assert.assertTrue("VrShellImpl dispatched touches",
+                touchRegisteredLatch.await(POLL_TIMEOUT_SHORT_MS, TimeUnit.MILLISECONDS));
+        XrTestFramework.executeStepAndWait(
+                "stepVerifyNoAdditionalTaps()", mXrTestFramework.getFirstTabWebContents());
+        XrTestFramework.endTest(mXrTestFramework.getFirstTabWebContents());
+    }
+
+    /**
+     * Tests that focus is locked to the device with an exclusive session for the purposes of
+     * VR input.
+     */
+    @Test
+    @MediumTest
+    @VrActivityRestriction({VrActivityRestriction.SupportedActivity.ALL})
+    public void testPresentationLocksFocus() throws InterruptedException {
+        mXrTestFramework.loadUrlAndAwaitInitialization(
+                XrTestFramework.getHtmlTestFile("webxr_test_presentation_locks_focus"),
+                PAGE_LOAD_TIMEOUT_S);
+        XrTransitionUtils.enterPresentationOrFail(mXrTestFramework.getFirstTabCvc());
+        XrTestFramework.executeStepAndWait(
+                "stepSetupFocusLoss()", mXrTestFramework.getFirstTabWebContents());
+        XrTestFramework.endTest(mXrTestFramework.getFirstTabWebContents());
+    }
+
+    /**
+     * Tests that pressing the Daydream controller's 'app' button causes the user to exit a
+     * WebXR exclusive session.
+     */
+    @Test
+    @MediumTest
+    @Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM)
+    @RetryOnFailure(message = "Very rarely, button press not registered (race condition?)")
+    public void testAppButtonExitsPresentation() throws InterruptedException {
+        mXrTestFramework.loadUrlAndAwaitInitialization(
+                XrTestFramework.getHtmlTestFile("generic_webxr_page"), PAGE_LOAD_TIMEOUT_S);
+        XrTransitionUtils.enterPresentationOrFail(mXrTestFramework.getFirstTabCvc());
+        EmulatedVrController controller = new EmulatedVrController(mVrTestRule.getActivity());
+        controller.pressReleaseAppButton();
+        Assert.assertTrue("App button exited WebVR presentation",
+                XrTestFramework.pollJavaScriptBoolean("exclusiveSession == null",
+                        POLL_TIMEOUT_SHORT_MS, mXrTestFramework.getFirstTabWebContents()));
+    }
+
+    /**
+     * Verifies that pressing the Daydream controller's 'app' button does not cause the user to exit
+     * a WebXR exclusive session when VR browsing is disabled.
+     */
+    @Test
+    @MediumTest
+    @Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM)
+    @VrActivityRestriction({VrActivityRestriction.SupportedActivity.ALL})
+    @CommandLineFlags.Add({"disable-features=" + ChromeFeatureList.VR_BROWSING})
+    public void testAppButtonNoopsWhenBrowsingDisabled()
+            throws InterruptedException, ExecutionException {
+        appButtonNoopsTestImpl();
+    }
+
+    /**
+     * Verifies that pressing the Daydream controller's 'app' button does not cause the user to exit
+     * a WebXR exclusive session when VR browsing isn't supported by the Activity.
+     */
+    @Test
+    @MediumTest
+    @Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM)
+    @VrActivityRestriction({VrActivityRestriction.SupportedActivity.WAA,
+            VrActivityRestriction.SupportedActivity.CCT})
+    public void
+    testAppButtonNoopsWhenBrowsingNotSupported() throws InterruptedException, ExecutionException {
+        appButtonNoopsTestImpl();
+    }
+
+    private void appButtonNoopsTestImpl() throws InterruptedException, ExecutionException {
+        mXrTestFramework.loadUrlAndAwaitInitialization(
+                XrTestFramework.getHtmlTestFile("generic_webxr_page"), PAGE_LOAD_TIMEOUT_S);
+        XrTransitionUtils.enterPresentationOrFail(mXrTestFramework.getFirstTabCvc());
+
+        MockVrDaydreamApi mockApi = new MockVrDaydreamApi();
+        VrShellDelegateUtils.getDelegateInstance().overrideDaydreamApiForTesting(mockApi);
+
+        EmulatedVrController controller = new EmulatedVrController(mVrTestRule.getActivity());
+        controller.pressReleaseAppButton();
+        Assert.assertFalse("App button left Chrome",
+                ThreadUtils.runOnUiThreadBlocking(new Callable<Boolean>() {
+                    @Override
+                    public Boolean call() throws Exception {
+                        return mockApi.getExitFromVrCalled()
+                                || mockApi.getLaunchVrHomescreenCalled();
+                    }
+                }));
+        Assert.assertFalse("App button exited WebVR presentation",
+                XrTestFramework.pollJavaScriptBoolean("exclusiveSession == null",
+                        POLL_TIMEOUT_SHORT_MS, mXrTestFramework.getFirstTabWebContents()));
+    }
+
+    /**
+     * Verifies that pressing the Daydream controller's 'app' button causes the user to exit
+     * a WebXR presentation even when the page is not submitting frames.
+     */
+    @Test
+    @MediumTest
+    @Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM)
+    @RetryOnFailure(message = "Very rarely, button press not registered (race condition?)")
+    public void testAppButtonAfterPageStopsSubmitting() throws InterruptedException {
+        mXrTestFramework.loadUrlAndAwaitInitialization(
+                XrTestFramework.getHtmlTestFile("webxr_page_submits_once"), PAGE_LOAD_TIMEOUT_S);
+        XrTransitionUtils.enterPresentationOrFail(mXrTestFramework.getFirstTabCvc());
+        // Wait for page to stop submitting frames.
+        XrTestFramework.waitOnJavaScriptStep(mXrTestFramework.getFirstTabWebContents());
+        EmulatedVrController controller = new EmulatedVrController(mVrTestRule.getActivity());
+        controller.pressReleaseAppButton();
+        Assert.assertTrue("App button exited WebVR presentation",
+                XrTestFramework.pollJavaScriptBoolean("exclusiveSession == null",
+                        POLL_TIMEOUT_SHORT_MS, mXrTestFramework.getFirstTabWebContents()));
+    }
+}
\ No newline at end of file
diff --git a/chrome/android/profiles/cipd.yaml b/chrome/android/profiles/cipd.yaml
deleted file mode 100644
index 1e68d45..0000000
--- a/chrome/android/profiles/cipd.yaml
+++ /dev/null
@@ -1,13 +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.
-
-# To create a CIPD package, run the following command.
-# cipd create --pkg-def cipd.yaml -tag version:version-of-afdo-profile
-package: chromium/afdo/profiles/android
-description: AFDO profiles collected for Chromium on Android
-
-# FIXME(gbiv): When we can specify dependencies on the profile in the build
-# system, settle on a profile name that doesn't include the version.
-data:
-  - file: chrome-profile-3309-text.prof
diff --git a/chrome/android/profiles/newest.txt b/chrome/android/profiles/newest.txt
new file mode 100644
index 0000000..10e1f13
--- /dev/null
+++ b/chrome/android/profiles/newest.txt
@@ -0,0 +1 @@
+chromeos-chrome-amd64-65.0.3322.0_rc-r1.afdo.bz2
diff --git a/chrome/android/profiles/update_afdo_profile.py b/chrome/android/profiles/update_afdo_profile.py
new file mode 100755
index 0000000..e69f324
--- /dev/null
+++ b/chrome/android/profiles/update_afdo_profile.py
@@ -0,0 +1,119 @@
+#!/usr/bin/python
+# Copyright 2018 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""This script is used to update our local AFDO profiles.
+
+This uses profiles of Chrome provided by our friends from Chrome OS. Though the
+profiles are available externally, the bucket they sit in is otherwise
+unreadable by non-Googlers. Gsutil usage with this bucket is therefore quite
+awkward: you can't do anything but `cp` certain files with an external account,
+and you can't even do that if you're not yet authenticated.
+
+No authentication is necessary if you pull these profiles directly over
+https."""
+
+import argparse
+import os
+import subprocess
+import sys
+import urllib
+
+GS_BASE_URL = 'https://storage.googleapis.com/chromeos-prebuilt/afdo-job/llvm'
+PROFILE_DIRECTORY = os.path.abspath(os.path.dirname(__file__))
+LOCAL_PROFILE_PATH = os.path.join(PROFILE_DIRECTORY, 'afdo.prof')
+
+# We use these to track the local profile; newest.txt is owned by git and tracks
+# the name of the newest profile we should pull, and local.txt is the most
+# recent profile we've successfully pulled.
+NEWEST_PROFILE_NAME_PATH = os.path.join(PROFILE_DIRECTORY, 'newest.txt')
+LOCAL_PROFILE_NAME_PATH = os.path.join(PROFILE_DIRECTORY, 'local.txt')
+
+
+def ReadUpToDateProfileName():
+  with open(NEWEST_PROFILE_NAME_PATH) as f:
+    return f.read().strip()
+
+
+def ReadLocalProfileName():
+  try:
+    with open(LOCAL_PROFILE_NAME_PATH) as f:
+      return f.read().strip()
+  except IOError:
+    # Assume it either didn't exist, or we couldn't read it. In either case, we
+    # should probably grab a new profile (and, in doing so, make this file sane
+    # again)
+    return None
+
+
+def WriteLocalProfileName(name):
+  with open(LOCAL_PROFILE_NAME_PATH, 'w') as f:
+    f.write(name)
+
+
+def CheckCallOrExit(cmd):
+  proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+  stdout, stderr = proc.communicate()
+  exit_code = proc.wait()
+  if not exit_code:
+    return
+
+  complaint_lines = [
+      '## %s failed with exit code %d' % (cmd[0], exit_code),
+      '## Full command: %s' % cmd,
+      '## Stdout:\n' + stdout,
+      '## Stderr:\n' + stderr,
+  ]
+  print >>sys.stderr, '\n'.join(complaint_lines)
+  sys.exit(1)
+
+
+def RetrieveProfile(desired_profile_name, out_path):
+  # vpython is > python 2.7.9, so we can expect urllib to validate HTTPS certs
+  # properly.
+  compressed_path = out_path + '.bz2'
+  profile = urllib.urlretrieve(GS_BASE_URL + '/' + desired_profile_name,
+                               filename=compressed_path)
+
+  # NOTE: we can't use Python's bzip module, since it doesn't support
+  # multi-stream bzip files. It will silently succeed and give us a garbage
+  # profile.
+  # bzip2 removes the compressed file on success.
+  CheckCallOrExit(['bzip2', '-d', compressed_path])
+
+
+def CleanProfilesDirectory():
+  # Start with a clean slate, removing old profiles/downloads/etc.
+  old_artifacts = (p for p in os.listdir(PROFILE_DIRECTORY) if
+                   p.startswith('chromeos-chrome-'))
+  for artifact in old_artifacts:
+    os.remove(os.path.join(PROFILE_DIRECTORY, artifact))
+
+
+def main():
+  parser = argparse.ArgumentParser('Downloads profiles provided by Chrome OS')
+  parser.add_argument('-f', '--force', action='store_true',
+                      help='Fetch a profile even if the local one is current')
+  args = parser.parse_args()
+
+  up_to_date_profile = ReadUpToDateProfileName()
+  if not args.force:
+    local_profile_name = ReadLocalProfileName()
+    # In a perfect world, the local profile should always exist if we
+    # successfully read local_profile_name. If it's gone, though, the user
+    # probably removed it as a way to get us to download it again.
+    if local_profile_name == up_to_date_profile \
+        and os.path.exists(LOCAL_PROFILE_PATH):
+      return 0
+
+  CleanProfilesDirectory()
+
+  new_tmpfile = LOCAL_PROFILE_PATH + '.new'
+  RetrieveProfile(up_to_date_profile, new_tmpfile)
+  os.rename(new_tmpfile, LOCAL_PROFILE_PATH)
+  WriteLocalProfileName(up_to_date_profile)
+
+
+if __name__ == '__main__':
+  sys.exit(main())
diff --git a/chrome/app/BUILD.gn b/chrome/app/BUILD.gn
index b478b0c1..e7b4259 100644
--- a/chrome/app/BUILD.gn
+++ b/chrome/app/BUILD.gn
@@ -37,6 +37,11 @@
   sources = [
     "chrome_dll_resource.h",
   ]
+
+  deps = [
+    ":command_ids",
+  ]
+
   if (is_win) {
     sources += [ "chrome_dll.rc" ]
     if (enable_basic_printing) {
@@ -45,9 +50,7 @@
       # toggle off of the enable-basic-printing flag in the .rc file.
       defines = [ "ENABLE_BASIC_PRINTING_FOR_RC" ]
     }
-    deps = [
-      "//printing/features",
-    ]
+    deps += [ "//printing/features" ]
   }
 }
 
diff --git a/chrome/app/chrome_main_delegate.cc b/chrome/app/chrome_main_delegate.cc
index b7750340..06c6e31 100644
--- a/chrome/app/chrome_main_delegate.cc
+++ b/chrome/app/chrome_main_delegate.cc
@@ -149,7 +149,7 @@
 
 #if BUILDFLAG(ENABLE_PLUGINS) && (defined(CHROME_MULTIPLE_DLL_CHILD) || \
     !defined(CHROME_MULTIPLE_DLL_BROWSER))
-#include "pdf/pdf.h"
+#include "pdf/pdf_ppapi.h"
 #endif
 
 #if !defined(CHROME_MULTIPLE_DLL_CHILD)
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index 3880cd2..f5efb6d7 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -6965,16 +6965,13 @@
         Reload
       </message>
 
-      <!-- Accessiblility strings for Inforbars in Views -->
+      <!-- Accessiblility strings for Infobars in Views -->
       <if expr="toolkit_views">
         <message name="IDS_ACCNAME_INFOBAR_CONTAINER" desc="The accessible name for the infobar container.">
           Infobar Container
         </message>
-        <message name="IDS_ACCNAME_INFOBAR_WARNING" desc="The accessible name for the warning infobar type.">
-          Warning
-        </message>
-        <message name="IDS_ACCNAME_INFOBAR_PAGE_ACTION" desc="The accessible name for page action infobar type.">
-          Page Action
+        <message name="IDS_ACCNAME_INFOBAR" desc="The accessible name for an infobar.">
+          Infobar
         </message>
       </if>
 
diff --git a/chrome/app/theme/default_100_percent/legacy/throbber_waiting.png b/chrome/app/theme/default_100_percent/legacy/throbber_waiting.png
deleted file mode 100644
index f761ec2..0000000
--- a/chrome/app/theme/default_100_percent/legacy/throbber_waiting.png
+++ /dev/null
Binary files differ
diff --git a/chrome/app/theme/default_100_percent/mac/throbber_incognito.png b/chrome/app/theme/default_100_percent/mac/throbber_incognito.png
deleted file mode 100644
index 9b7065f..0000000
--- a/chrome/app/theme/default_100_percent/mac/throbber_incognito.png
+++ /dev/null
Binary files differ
diff --git a/chrome/app/theme/default_100_percent/mac/throbber_waiting_incognito.png b/chrome/app/theme/default_100_percent/mac/throbber_waiting_incognito.png
deleted file mode 100644
index e41bcf8..0000000
--- a/chrome/app/theme/default_100_percent/mac/throbber_waiting_incognito.png
+++ /dev/null
Binary files differ
diff --git a/chrome/app/theme/default_200_percent/legacy/throbber_waiting.png b/chrome/app/theme/default_200_percent/legacy/throbber_waiting.png
deleted file mode 100644
index 12de470..0000000
--- a/chrome/app/theme/default_200_percent/legacy/throbber_waiting.png
+++ /dev/null
Binary files differ
diff --git a/chrome/app/theme/default_200_percent/mac/throbber_incognito.png b/chrome/app/theme/default_200_percent/mac/throbber_incognito.png
deleted file mode 100644
index 106b89ee..0000000
--- a/chrome/app/theme/default_200_percent/mac/throbber_incognito.png
+++ /dev/null
Binary files differ
diff --git a/chrome/app/theme/default_200_percent/mac/throbber_waiting_incognito.png b/chrome/app/theme/default_200_percent/mac/throbber_waiting_incognito.png
deleted file mode 100644
index 8f86050..0000000
--- a/chrome/app/theme/default_200_percent/mac/throbber_waiting_incognito.png
+++ /dev/null
Binary files differ
diff --git a/chrome/app/theme/theme_resources.grd b/chrome/app/theme/theme_resources.grd
index b7bb5e6..89fef4f 100644
--- a/chrome/app/theme/theme_resources.grd
+++ b/chrome/app/theme/theme_resources.grd
@@ -446,11 +446,6 @@
       <!-- Instant Extended API toolbar background is common for all platforms. -->
       <structure type="chrome_scaled_image" name="IDR_THEME_WINDOW_CONTROL_BACKGROUND" file="notused.png" />
       <if expr="is_macosx">
-        <structure type="chrome_scaled_image" name="IDR_THROBBER_WAITING" file="legacy/throbber_waiting.png" />
-        <structure type="chrome_scaled_image" name="IDR_THROBBER_WAITING_INCOGNITO" file="mac/throbber_waiting_incognito.png" />
-        <structure type="chrome_scaled_image" name="IDR_THROBBER_INCOGNITO" file="mac/throbber_incognito.png" />
-      </if>
-      <if expr="is_macosx">
         <structure type="chrome_scaled_image" name="IDR_TOOLBAR_SHADE_TOP" file="mac/toolbar_shade_top.png" />
       </if>
       <if expr="is_macosx">
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index b372c15..28493e28 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -3518,6 +3518,12 @@
                                     kSpeculativePreconnectFeatureVariations,
                                     "SpeculativePreconnectValidation")},
 
+#if defined(OS_ANDROID)
+    {"enable-async-dns", flag_descriptions::kAsyncDnsName,
+     flag_descriptions::kAsyncDnsDescription, kOsAndroid,
+     FEATURE_VALUE_TYPE(features::kAsyncDns)},
+#endif  // defined(OS_ANDROID)
+
     {"enable-overflow-icons-for-media-controls",
      flag_descriptions::kOverflowIconsForMediaControlsName,
      flag_descriptions::kOverflowIconsForMediaControlsDescription, kOsAll,
diff --git a/chrome/browser/android/metrics/uma_session_stats.cc b/chrome/browser/android/metrics/uma_session_stats.cc
index d7917d35..332f1fd 100644
--- a/chrome/browser/android/metrics/uma_session_stats.cc
+++ b/chrome/browser/android/metrics/uma_session_stats.cc
@@ -110,7 +110,9 @@
     JNIEnv*,
     const JavaParamRef<jclass>&,
     jboolean consent) {
-  UpdateMetricsPrefsOnPermissionChange(consent);
+  UpdateMetricsPrefsOnPermissionChange(g_browser_process->local_state(),
+                                       g_browser_process->metrics_service(),
+                                       consent);
 
   // This function ensures a consent file in the data directory is either
   // created, or deleted, depending on consent. Starting up metrics services
diff --git a/chrome/browser/android/search_permissions/search_geolocation_disclosure_infobar_delegate.cc b/chrome/browser/android/search_permissions/search_geolocation_disclosure_infobar_delegate.cc
index a2953d3..4e5ca23 100644
--- a/chrome/browser/android/search_permissions/search_geolocation_disclosure_infobar_delegate.cc
+++ b/chrome/browser/android/search_permissions/search_geolocation_disclosure_infobar_delegate.cc
@@ -99,11 +99,6 @@
   pref_service_->SetBoolean(prefs::kSearchGeolocationDisclosureDismissed, true);
 }
 
-infobars::InfoBarDelegate::Type
-SearchGeolocationDisclosureInfoBarDelegate::GetInfoBarType() const {
-  return PAGE_ACTION_TYPE;
-}
-
 infobars::InfoBarDelegate::InfoBarIdentifier
 SearchGeolocationDisclosureInfoBarDelegate::GetIdentifier() const {
   return SEARCH_GEOLOCATION_DISCLOSURE_INFOBAR_DELEGATE_ANDROID;
diff --git a/chrome/browser/android/search_permissions/search_geolocation_disclosure_infobar_delegate.h b/chrome/browser/android/search_permissions/search_geolocation_disclosure_infobar_delegate.h
index 471bb60..d0f96cb 100644
--- a/chrome/browser/android/search_permissions/search_geolocation_disclosure_infobar_delegate.h
+++ b/chrome/browser/android/search_permissions/search_geolocation_disclosure_infobar_delegate.h
@@ -63,7 +63,6 @@
 
   // InfoBarDelegate:
   void InfoBarDismissed() override;
-  Type GetInfoBarType() const override;
   infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override;
   int GetIconId() const override;
 
diff --git a/chrome/browser/android/vr_shell/vr_shell.cc b/chrome/browser/android/vr_shell/vr_shell.cc
index 41e58f5..893fda4 100644
--- a/chrome/browser/android/vr_shell/vr_shell.cc
+++ b/chrome/browser/android/vr_shell/vr_shell.cc
@@ -857,6 +857,9 @@
   if (content_id_ != content_id)
     return;
 
+  if (!android_ui_gesture_target_)
+    return;
+
   android_ui_gesture_target_->DispatchWebInputEvent(std::move(event));
 }
 
diff --git a/chrome/browser/background/background_contents_service.cc b/chrome/browser/background/background_contents_service.cc
index b4be647..1e20f68 100644
--- a/chrome/browser/background/background_contents_service.cc
+++ b/chrome/browser/background/background_contents_service.cc
@@ -74,7 +74,7 @@
 
 namespace {
 
-const char kNotificationPrefix[] = "app.background.crashed.";
+const char kCrashedNotificationPrefix[] = "app.background.crashed.";
 const char kNotifierId[] = "app.background.crashed";
 bool g_disable_close_balloon_for_testing = false;
 
@@ -83,7 +83,8 @@
     return;
 
   NotificationDisplayService::GetForProfile(profile)->Close(
-      NotificationHandler::Type::TRANSIENT, kNotificationPrefix + extension_id);
+      NotificationHandler::Type::TRANSIENT,
+      kCrashedNotificationPrefix + extension_id);
 }
 
 // Delegate for the app/extension crash notification balloon. Restarts the
@@ -155,7 +156,7 @@
   // Origin URL must be different from the crashed extension to avoid the
   // conflict. NotificationSystemObserver will cancel all notifications from
   // the same origin when OnExtensionUnloaded() is called.
-  std::string id = kNotificationPrefix + extension_id;
+  std::string id = kCrashedNotificationPrefix + extension_id;
   message_center::Notification notification(
       message_center::NOTIFICATION_TYPE_SIMPLE, id, base::string16(), message,
       notification_icon, base::string16(), GURL("chrome://extension-crash"),
@@ -278,7 +279,7 @@
 std::string
 BackgroundContentsService::GetNotificationDelegateIdForExtensionForTesting(
     const std::string& extension_id) {
-  return kNotificationPrefix + extension_id;
+  return kCrashedNotificationPrefix + extension_id;
 }
 
 // static
diff --git a/chrome/browser/banners/app_banner_infobar_delegate_desktop.cc b/chrome/browser/banners/app_banner_infobar_delegate_desktop.cc
index 380528d1..8acfa20 100644
--- a/chrome/browser/banners/app_banner_infobar_delegate_desktop.cc
+++ b/chrome/browser/banners/app_banner_infobar_delegate_desktop.cc
@@ -50,11 +50,6 @@
     TrackUserResponse(USER_RESPONSE_WEB_APP_IGNORED);
 }
 
-infobars::InfoBarDelegate::Type
-AppBannerInfoBarDelegateDesktop::GetInfoBarType() const {
-  return PAGE_ACTION_TYPE;
-}
-
 infobars::InfoBarDelegate::InfoBarIdentifier
 AppBannerInfoBarDelegateDesktop::GetIdentifier() const {
   return APP_BANNER_INFOBAR_DELEGATE;
diff --git a/chrome/browser/banners/app_banner_infobar_delegate_desktop.h b/chrome/browser/banners/app_banner_infobar_delegate_desktop.h
index 640d606..85ef505 100644
--- a/chrome/browser/banners/app_banner_infobar_delegate_desktop.h
+++ b/chrome/browser/banners/app_banner_infobar_delegate_desktop.h
@@ -44,7 +44,6 @@
   ~AppBannerInfoBarDelegateDesktop() override;
 
   // ConfirmInfoBarDelegate:
-  Type GetInfoBarType() const override;
   infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override;
   const gfx::VectorIcon& GetVectorIcon() const override;
   void InfoBarDismissed() override;
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
index 91b83f36..bf4b6ef1 100644
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
@@ -529,9 +529,11 @@
   if (!metrics_services_manager_) {
     auto client =
         base::MakeUnique<ChromeMetricsServicesManagerClient>(local_state());
+    ChromeMetricsServicesManagerClient* client_ptr = client.get();
     metrics_services_manager_ =
         base::MakeUnique<metrics_services_manager::MetricsServicesManager>(
             std::move(client));
+    client_ptr->OnMetricsServiceManagerCreated(metrics_services_manager_.get());
   }
   return metrics_services_manager_.get();
 }
@@ -1343,7 +1345,8 @@
       FROM_HERE,
       base::BindOnce(
           base::IgnoreResult(&GoogleUpdateSettings::SetCollectStatsConsent),
-          ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled()));
+          ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled(
+              local_state())));
 }
 #endif
 
diff --git a/chrome/browser/browser_resources.grd b/chrome/browser/browser_resources.grd
index 826deaf..2d41b9a9 100644
--- a/chrome/browser/browser_resources.grd
+++ b/chrome/browser/browser_resources.grd
@@ -404,8 +404,6 @@
                  file="resources\print_preview\images\google_doc.png" type="BINDATA" />
         <include name="IDR_PRINT_PREVIEW_IMAGES_PDF"
                  file="resources\print_preview\images\pdf.png" type="BINDATA" />
-        <include name="IDR_PRINT_PREVIEW_IMAGES_THIRD_PARTY"
-                 file="resources\print_preview\images\third_party.png" type="BINDATA" />
         <include name="IDR_PRINT_PREVIEW_IMAGES_MOBILE"
                  file="resources\print_preview\images\mobile.png" type="BINDATA" />
         <include name="IDR_PRINT_PREVIEW_IMAGES_MOBILE_SHARED"
diff --git a/chrome/browser/chromeos/arc/optin/arc_optin_preference_handler.cc b/chrome/browser/chromeos/arc/optin/arc_optin_preference_handler.cc
index c0871080..4e19e70 100644
--- a/chrome/browser/chromeos/arc/optin/arc_optin_preference_handler.cc
+++ b/chrome/browser/chromeos/arc/optin/arc_optin_preference_handler.cc
@@ -67,7 +67,9 @@
     const bool exists = chromeos::CrosSettings::Get()->GetBoolean(
         chromeos::kStatsReportingPref, &enabled);
     DCHECK(exists);
-    observer_->OnMetricsModeChanged(enabled, IsMetricsReportingPolicyManaged());
+    observer_->OnMetricsModeChanged(
+        enabled,
+        IsMetricsReportingPolicyManaged(g_browser_process->local_state()));
   }
 }
 
diff --git a/chrome/browser/chromeos/extensions/file_manager/private_api_file_system.cc b/chrome/browser/chromeos/extensions/file_manager/private_api_file_system.cc
index 5c5ef7e1..9893156 100644
--- a/chrome/browser/chromeos/extensions/file_manager/private_api_file_system.cc
+++ b/chrome/browser/chromeos/extensions/file_manager/private_api_file_system.cc
@@ -974,7 +974,8 @@
 ExtensionFunction::ResponseAction
 FileManagerPrivateIsUMAEnabledFunction::Run() {
   return RespondNow(OneArgument(std::make_unique<base::Value>(
-      ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled())));
+      ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled(
+          g_browser_process->local_state()))));
 }
 
 FileManagerPrivateInternalSetEntryTagFunction::
diff --git a/chrome/browser/chromeos/login/wizard_controller.cc b/chrome/browser/chromeos/login/wizard_controller.cc
index b6aa02d8..5f4d10a5 100644
--- a/chrome/browser/chromeos/login/wizard_controller.cc
+++ b/chrome/browser/chromeos/login/wizard_controller.cc
@@ -761,6 +761,8 @@
   time_eula_accepted_ = base::Time::Now();
   StartupUtils::MarkEulaAccepted();
   ChangeMetricsReportingStateWithReply(
+      g_browser_process->local_state(),
+      g_browser_process->GetMetricsServicesManager(),
       usage_statistics_reporting_,
       base::Bind(&WizardController::OnChangedMetricsReportingState,
                  weak_factory_.GetWeakPtr()));
diff --git a/chrome/browser/chromeos/settings/device_settings_cache.cc b/chrome/browser/chromeos/settings/device_settings_cache.cc
index e8348c3..a2f6ff0 100644
--- a/chrome/browser/chromeos/settings/device_settings_cache.cc
+++ b/chrome/browser/chromeos/settings/device_settings_cache.cc
@@ -25,17 +25,15 @@
 }
 
 bool Store(const em::PolicyData& policy, PrefService* local_state) {
-  if (local_state) {
-    std::string policy_string = policy.SerializeAsString();
-    std::string encoded;
-    base::Base64Encode(policy_string, &encoded);
-    local_state->SetString(prefs::kDeviceSettingsCache, encoded);
-    return true;
-  }
-  return false;
+  if (!local_state)
+    return false;
+
+  local_state->SetString(prefs::kDeviceSettingsCache,
+                         PolicyDataToString(policy));
+  return true;
 }
 
-bool Retrieve(em::PolicyData *policy, PrefService* local_state) {
+bool Retrieve(em::PolicyData* policy, PrefService* local_state) {
   if (local_state) {
     std::string encoded =
         local_state->GetString(prefs::kDeviceSettingsCache);
@@ -50,6 +48,13 @@
   return false;
 }
 
+std::string PolicyDataToString(const em::PolicyData& policy) {
+  const std::string policy_string = policy.SerializeAsString();
+  std::string encoded;
+  base::Base64Encode(policy_string, &encoded);
+  return encoded;
+}
+
 }  // namespace device_settings_cache
 
 }  // namespace chromeos
diff --git a/chrome/browser/chromeos/settings/device_settings_cache.h b/chrome/browser/chromeos/settings/device_settings_cache.h
index ac2028c..3aa28ee 100644
--- a/chrome/browser/chromeos/settings/device_settings_cache.h
+++ b/chrome/browser/chromeos/settings/device_settings_cache.h
@@ -5,6 +5,8 @@
 #ifndef CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_SETTINGS_CACHE_H_
 #define CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_SETTINGS_CACHE_H_
 
+#include <string>
+
 namespace enterprise_management {
 class PolicyData;
 }
@@ -23,16 +25,20 @@
 void RegisterPrefs(PrefRegistrySimple* registry);
 
 // Stores a new policy blob inside the cache stored in |local_state|.
-bool Store(const enterprise_management::PolicyData &policy,
+bool Store(const enterprise_management::PolicyData& policy,
            PrefService* local_state);
 
 // Retrieves the policy blob from the cache stored in |local_state|.
-bool Retrieve(enterprise_management::PolicyData *policy,
+bool Retrieve(enterprise_management::PolicyData* policy,
               PrefService* local_state);
 
 // Call this after owner has been assigned to persist settings into
 // DeviceSettings storage.
 void Finalize(PrefService* local_state);
+
+// Used to convert |policy| into a string that is saved to prefs.
+std::string PolicyDataToString(const enterprise_management::PolicyData& policy);
+
 }  // namespace device_settings_cache
 
 }  // namespace chromeos
diff --git a/chrome/browser/component_updater/supervised_user_whitelist_installer_unittest.cc b/chrome/browser/component_updater/supervised_user_whitelist_installer_unittest.cc
index b9dcb7ab..7a4ec7a 100644
--- a/chrome/browser/component_updater/supervised_user_whitelist_installer_unittest.cc
+++ b/chrome/browser/component_updater/supervised_user_whitelist_installer_unittest.cc
@@ -20,7 +20,6 @@
 #include "base/sequenced_task_runner.h"
 #include "base/strings/string_util.h"
 #include "base/strings/utf_string_conversions.h"
-#include "base/test/scoped_path_override.h"
 #include "base/threading/thread_task_runner_handle.h"
 #include "base/values.h"
 #include "chrome/browser/component_updater/supervised_user_whitelist_installer.h"
@@ -198,8 +197,7 @@
 class SupervisedUserWhitelistInstallerTest : public testing::Test {
  public:
   SupervisedUserWhitelistInstallerTest()
-      : testing_profile_manager_(TestingBrowserProcess::GetGlobal()),
-        user_data_dir_override_(chrome::DIR_USER_DATA) {}
+      : testing_profile_manager_(TestingBrowserProcess::GetGlobal()) {}
 
   ~SupervisedUserWhitelistInstallerTest() override {}
 
@@ -297,7 +295,6 @@
 
   content::TestBrowserThreadBundle thread_bundle_;
   TestingProfileManager testing_profile_manager_;
-  base::ScopedPathOverride user_data_dir_override_;
   data_decoder::TestingJsonParser::ScopedFactoryOverride json_parser_override_;
   TestingPrefServiceSimple local_state_;
   content::TestServiceManagerContext service_manager_context_;
diff --git a/chrome/browser/domain_reliability/service_factory.cc b/chrome/browser/domain_reliability/service_factory.cc
index ba9957c..0aafe7c 100644
--- a/chrome/browser/domain_reliability/service_factory.cc
+++ b/chrome/browser/domain_reliability/service_factory.cc
@@ -7,6 +7,7 @@
 #include "base/command_line.h"
 #include "base/metrics/field_trial.h"
 #include "build/build_config.h"
+#include "chrome/browser/browser_process.h"
 #include "chrome/browser/metrics/chrome_metrics_service_accessor.h"
 #include "chrome/common/chrome_switches.h"
 #include "components/domain_reliability/service.h"
@@ -69,7 +70,8 @@
     return false;
   if (command_line->HasSwitch(switches::kEnableDomainReliability))
     return true;
-  if (!ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled())
+  if (!ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled(
+          g_browser_process->local_state()))
     return false;
   if (base::FieldTrialList::TrialExists(kFieldTrialName)) {
     std::string value = base::FieldTrialList::FindFullName(kFieldTrialName);
diff --git a/chrome/browser/extensions/api/debugger/extension_dev_tools_infobar.cc b/chrome/browser/extensions/api/debugger/extension_dev_tools_infobar.cc
index 6b187e3..41b8582 100644
--- a/chrome/browser/extensions/api/debugger/extension_dev_tools_infobar.cc
+++ b/chrome/browser/extensions/api/debugger/extension_dev_tools_infobar.cc
@@ -26,7 +26,6 @@
   ~ExtensionDevToolsInfoBarDelegate() override;
 
   // ConfirmInfoBarDelegate:
-  Type GetInfoBarType() const override;
   infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override;
   bool ShouldExpire(const NavigationDetails& details) const override;
   void InfoBarDismissed() override;
@@ -50,11 +49,6 @@
 
 ExtensionDevToolsInfoBarDelegate::~ExtensionDevToolsInfoBarDelegate() {}
 
-infobars::InfoBarDelegate::Type
-ExtensionDevToolsInfoBarDelegate::GetInfoBarType() const {
-  return WARNING_TYPE;
-}
-
 infobars::InfoBarDelegate::InfoBarIdentifier
 ExtensionDevToolsInfoBarDelegate::GetIdentifier() const {
   return EXTENSION_DEV_TOOLS_INFOBAR_DELEGATE;
diff --git a/chrome/browser/extensions/api/messaging/incognito_connectability_infobar_delegate.cc b/chrome/browser/extensions/api/messaging/incognito_connectability_infobar_delegate.cc
index 17963d1..7171d62 100644
--- a/chrome/browser/extensions/api/messaging/incognito_connectability_infobar_delegate.cc
+++ b/chrome/browser/extensions/api/messaging/incognito_connectability_infobar_delegate.cc
@@ -36,11 +36,6 @@
   }
 }
 
-infobars::InfoBarDelegate::Type
-IncognitoConnectabilityInfoBarDelegate::GetInfoBarType() const {
-  return PAGE_ACTION_TYPE;
-}
-
 infobars::InfoBarDelegate::InfoBarIdentifier
 IncognitoConnectabilityInfoBarDelegate::GetIdentifier() const {
   return INCOGNITO_CONNECTABILITY_INFOBAR_DELEGATE;
diff --git a/chrome/browser/extensions/api/messaging/incognito_connectability_infobar_delegate.h b/chrome/browser/extensions/api/messaging/incognito_connectability_infobar_delegate.h
index 8b06701..002dfe9c 100644
--- a/chrome/browser/extensions/api/messaging/incognito_connectability_infobar_delegate.h
+++ b/chrome/browser/extensions/api/messaging/incognito_connectability_infobar_delegate.h
@@ -36,7 +36,6 @@
   ~IncognitoConnectabilityInfoBarDelegate() override;
 
   // ConfirmInfoBarDelegate:
-  Type GetInfoBarType() const override;
   infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override;
   base::string16 GetMessageText() const override;
   base::string16 GetButtonLabel(InfoBarButton button) const override;
diff --git a/chrome/browser/extensions/api/metrics_private/chrome_metrics_private_delegate.cc b/chrome/browser/extensions/api/metrics_private/chrome_metrics_private_delegate.cc
index 9771932b..a919810 100644
--- a/chrome/browser/extensions/api/metrics_private/chrome_metrics_private_delegate.cc
+++ b/chrome/browser/extensions/api/metrics_private/chrome_metrics_private_delegate.cc
@@ -4,12 +4,14 @@
 
 #include "chrome/browser/extensions/api/metrics_private/chrome_metrics_private_delegate.h"
 
+#include "chrome/browser/browser_process.h"
 #include "chrome/browser/metrics/chrome_metrics_service_accessor.h"
 
 namespace extensions {
 
 bool ChromeMetricsPrivateDelegate::IsCrashReportingEnabled() {
-  return ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled();
+  return ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled(
+      g_browser_process->local_state());
 }
 
 }  // namespace extensions
diff --git a/chrome/browser/extensions/theme_installed_infobar_delegate.cc b/chrome/browser/extensions/theme_installed_infobar_delegate.cc
index 8605e84..4938865 100644
--- a/chrome/browser/extensions/theme_installed_infobar_delegate.cc
+++ b/chrome/browser/extensions/theme_installed_infobar_delegate.cc
@@ -88,11 +88,6 @@
   theme_service_->OnInfobarDestroyed();
 }
 
-infobars::InfoBarDelegate::Type
-ThemeInstalledInfoBarDelegate::GetInfoBarType() const {
-  return PAGE_ACTION_TYPE;
-}
-
 infobars::InfoBarDelegate::InfoBarIdentifier
 ThemeInstalledInfoBarDelegate::GetIdentifier() const {
   return THEME_INSTALLED_INFOBAR_DELEGATE;
diff --git a/chrome/browser/extensions/theme_installed_infobar_delegate.h b/chrome/browser/extensions/theme_installed_infobar_delegate.h
index 61faab109..0bd4172 100644
--- a/chrome/browser/extensions/theme_installed_infobar_delegate.h
+++ b/chrome/browser/extensions/theme_installed_infobar_delegate.h
@@ -42,7 +42,6 @@
   ~ThemeInstalledInfoBarDelegate() override;
 
   // ConfirmInfoBarDelegate:
-  Type GetInfoBarType() const override;
   infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override;
   const gfx::VectorIcon& GetVectorIcon() const override;
   ThemeInstalledInfoBarDelegate* AsThemePreviewInfobarDelegate() override;
diff --git a/chrome/browser/first_run/first_run_internal_posix.cc b/chrome/browser/first_run/first_run_internal_posix.cc
index 3af5f979..01aaa0532 100644
--- a/chrome/browser/first_run/first_run_internal_posix.cc
+++ b/chrome/browser/first_run/first_run_internal_posix.cc
@@ -63,7 +63,7 @@
   // in enterprise scenarios. If that is the case, skip the dialog entirely, as
   // it's not worth bothering the user for only the default browser question
   // (which is likely to be forced in enterprise deployments anyway).
-  if (IsMetricsReportingPolicyManaged())
+  if (IsMetricsReportingPolicyManaged(g_browser_process->local_state()))
     return false;
 
   // For real first runs, Mac and Desktop Linux initialize the default metrics
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
index cc4a04e..69869d5 100644
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -1683,6 +1683,9 @@
 const char kAndroidViewPasswordsDescription[] =
     "Enables copying and viewing passwords in settings.";
 
+const char kAsyncDnsName[] = "Async DNS resolver";
+const char kAsyncDnsDescription[] = "Enables the built-in DNS resolver.";
+
 const char kAutofillAccessoryViewName[] =
     "Autofill suggestions as keyboard accessory view";
 const char kAutofillAccessoryViewDescription[] =
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
index 3c52bac..b34b428 100644
--- a/chrome/browser/flag_descriptions.h
+++ b/chrome/browser/flag_descriptions.h
@@ -1035,6 +1035,9 @@
 extern const char kAndroidViewPasswordsName[];
 extern const char kAndroidViewPasswordsDescription[];
 
+extern const char kAsyncDnsName[];
+extern const char kAsyncDnsDescription[];
+
 extern const char kAutofillAccessoryViewName[];
 extern const char kAutofillAccessoryViewDescription[];
 
diff --git a/chrome/browser/lifetime/application_lifetime.cc b/chrome/browser/lifetime/application_lifetime.cc
index 29181adf..44b609b9 100644
--- a/chrome/browser/lifetime/application_lifetime.cc
+++ b/chrome/browser/lifetime/application_lifetime.cc
@@ -228,7 +228,8 @@
   // environment variable is defined. So we undefine this environment variable
   // before restarting, as the restarted processes will inherit their
   // environment variables from ours, thus suppressing crash uploads.
-  if (!ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled()) {
+  if (!ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled(
+          g_browser_process->local_state())) {
     HMODULE exe_module = GetModuleHandle(kBrowserProcessExecutableName);
     if (exe_module) {
       typedef void (__cdecl *ClearBreakpadPipeEnvVar)();
diff --git a/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc b/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc
index d0f605cb..38502e4 100644
--- a/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc
+++ b/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc
@@ -414,6 +414,27 @@
   }
 }
 
+void LogCommittedPreviewsDecision(
+    ProfileIOData* io_data,
+    const GURL& url,
+    previews::PreviewsUserData* previews_user_data) {
+  previews::PreviewsIOData* previews_io_data = io_data->previews_io_data();
+  if (previews_io_data && previews_user_data) {
+    std::vector<previews::PreviewsEligibilityReason> passed_reasons;
+    if (previews_user_data->cache_control_no_transform_directive()) {
+      previews_io_data->LogPreviewDecisionMade(
+          previews::PreviewsEligibilityReason::CACHE_CONTROL_NO_TRANSFORM, url,
+          base::Time::Now(), previews::PreviewsType::UNSPECIFIED,
+          std::move(passed_reasons), previews_user_data->page_id());
+    } else {
+      previews_io_data->LogPreviewDecisionMade(
+          previews::PreviewsEligibilityReason::COMMITTED, url,
+          base::Time::Now(), previews_user_data->committed_previews_type(),
+          std::move(passed_reasons), previews_user_data->page_id());
+    }
+  }
+}
+
 }  // namespace
 
 ChromeResourceDispatcherHostDelegate::ChromeResourceDispatcherHostDelegate()
@@ -828,11 +849,11 @@
     // url), are not set here.
     previews::PreviewsType committed_type =
         previews::GetMainFramePreviewsType(committed_state);
-    if (committed_type != previews::PreviewsType::NONE) {
-      previews::PreviewsUserData* previews_user_data =
-          previews::PreviewsUserData::GetData(*request);
-      if (previews_user_data)
-        previews_user_data->SetCommittedPreviewsType(committed_type);
+    previews::PreviewsUserData* previews_user_data =
+        previews::PreviewsUserData::GetData(*request);
+    if (previews_user_data) {
+      previews_user_data->SetCommittedPreviewsType(committed_type);
+      LogCommittedPreviewsDecision(io_data, request->url(), previews_user_data);
     }
   }
 
diff --git a/chrome/browser/metrics/chrome_metrics_service_accessor.cc b/chrome/browser/metrics/chrome_metrics_service_accessor.cc
index 5f0fb03e..034bbcea 100644
--- a/chrome/browser/metrics/chrome_metrics_service_accessor.cc
+++ b/chrome/browser/metrics/chrome_metrics_service_accessor.cc
@@ -31,7 +31,8 @@
 }
 
 // static
-bool ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled() {
+bool ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled(
+    PrefService* local_state) {
   if (g_metrics_consent_for_testing)
     return *g_metrics_consent_for_testing;
 
@@ -44,12 +45,12 @@
   // This is only possible during unit tests. If the unit test didn't set the
   // local_state then it doesn't care about pref value and therefore we return
   // false.
-  if (!g_browser_process->local_state()) {
+  if (!local_state) {
     DLOG(WARNING) << "Local state has not been set and pref cannot be read";
     return false;
   }
 
-  return IsMetricsReportingEnabled(g_browser_process->local_state());
+  return IsMetricsReportingEnabled(local_state);
 }
 
 // static
@@ -76,3 +77,10 @@
       RegisterSyntheticFieldTrialWithNameHash(
           g_browser_process->metrics_service(), trial_name_hash, group_name);
 }
+
+// static
+void ChromeMetricsServiceAccessor::SetForceIsMetricsReportingEnabledPrefLookup(
+    bool value) {
+  metrics::MetricsServiceAccessor::SetForceIsMetricsReportingEnabledPrefLookup(
+      value);
+}
diff --git a/chrome/browser/metrics/chrome_metrics_service_accessor.h b/chrome/browser/metrics/chrome_metrics_service_accessor.h
index 8ba63904..076a9777 100644
--- a/chrome/browser/metrics/chrome_metrics_service_accessor.h
+++ b/chrome/browser/metrics/chrome_metrics_service_accessor.h
@@ -18,6 +18,7 @@
 class ChromeMetricsServiceClient;
 class ChromePasswordManagerClient;
 class NavigationMetricsRecorder;
+class PrefService;
 class Profile;
 
 namespace {
@@ -44,6 +45,10 @@
 class FileManagerPrivateIsUMAEnabledFunction;
 }
 
+namespace metrics_services_manager {
+class MetricsServicesManager;
+}
+
 namespace options {
 class BrowserOptionsHandler;
 }
@@ -109,6 +114,8 @@
   friend class extensions::ChromeMetricsPrivateDelegate;
   friend class extensions::FileManagerPrivateIsUMAEnabledFunction;
   friend void ChangeMetricsReportingStateWithReply(
+      PrefService*,
+      metrics_services_manager::MetricsServicesManager*,
       bool,
       const OnMetricsReportingCallbackType&);
   friend class options::BrowserOptionsHandler;
@@ -130,13 +137,19 @@
   friend class ChromePasswordManagerClient;
   friend class NavigationMetricsRecorder;
 
+  // Testing related friends.
+  friend class MetricsReportingStateTest;
   FRIEND_TEST_ALL_PREFIXES(ChromeMetricsServiceAccessorTest,
                            MetricsReportingEnabled);
 
-  // Returns true if metrics reporting is enabled.
+  // Returns true if metrics reporting is enabled. |local_state| is the
+  // PrefService for local state. Typically this comes from
+  // g_browser_process->local_state(), but during startup |g_browser_process|
+  // may not have been created, in which case it's the local state that will
+  // eventually be assigned to |g_browser_process|.
   // TODO(gayane): Consolidate metric prefs on all platforms.
   // http://crbug.com/362192,  http://crbug.com/532084
-  static bool IsMetricsAndCrashReportingEnabled();
+  static bool IsMetricsAndCrashReportingEnabled(PrefService* local_state);
 
   // Calls metrics::MetricsServiceAccessor::RegisterSyntheticFieldTrial() with
   // g_browser_process->metrics_service(). See that function's declaration for
@@ -159,6 +172,10 @@
       uint32_t trial_name_hash,
       base::StringPiece group_name);
 
+  // Cover for function of same name in MetricsServiceAccssor. See
+  // ChromeMetricsServiceAccessor for details.
+  static void SetForceIsMetricsReportingEnabledPrefLookup(bool value);
+
   DISALLOW_IMPLICIT_CONSTRUCTORS(ChromeMetricsServiceAccessor);
 };
 
diff --git a/chrome/browser/metrics/chrome_metrics_service_accessor_unittest.cc b/chrome/browser/metrics/chrome_metrics_service_accessor_unittest.cc
index 6da420e..3fd4140b 100644
--- a/chrome/browser/metrics/chrome_metrics_service_accessor_unittest.cc
+++ b/chrome/browser/metrics/chrome_metrics_service_accessor_unittest.cc
@@ -38,27 +38,27 @@
   GetLocalState()->SetDefaultPrefValue(pref, base::Value(false));
 
   GetLocalState()->SetBoolean(pref, false);
-  EXPECT_FALSE(
-      ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled());
+  EXPECT_FALSE(ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled(
+      GetLocalState()));
   GetLocalState()->SetBoolean(pref, true);
-  EXPECT_TRUE(
-      ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled());
+  EXPECT_TRUE(ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled(
+      GetLocalState()));
   GetLocalState()->ClearPref(pref);
-  EXPECT_FALSE(
-      ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled());
+  EXPECT_FALSE(ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled(
+      GetLocalState()));
 
   // If field trials are forced, metrics should always be disabled, regardless
   // of the value of the pref.
   base::CommandLine::ForCurrentProcess()->AppendSwitch(
       switches::kForceFieldTrials);
-  EXPECT_FALSE(
-      ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled());
+  EXPECT_FALSE(ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled(
+      GetLocalState()));
   GetLocalState()->SetBoolean(pref, true);
-  EXPECT_FALSE(
-      ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled());
+  EXPECT_FALSE(ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled(
+      GetLocalState()));
 #else
   // Metrics Reporting is never enabled when GOOGLE_CHROME_BUILD is undefined.
-  EXPECT_FALSE(
-      ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled());
+  EXPECT_FALSE(ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled(
+      GetLocalState()));
 #endif
 }
diff --git a/chrome/browser/metrics/chrome_metrics_service_client.cc b/chrome/browser/metrics/chrome_metrics_service_client.cc
index 287c125..7e905f89 100644
--- a/chrome/browser/metrics/chrome_metrics_service_client.cc
+++ b/chrome/browser/metrics/chrome_metrics_service_client.cc
@@ -529,7 +529,7 @@
 }
 
 bool ChromeMetricsServiceClient::IsReportingPolicyManaged() {
-  return IsMetricsReportingPolicyManaged();
+  return IsMetricsReportingPolicyManaged(g_browser_process->local_state());
 }
 
 metrics::EnableMetricsDefault
@@ -600,7 +600,8 @@
       base::MakeUnique<metrics::ScreenInfoMetricsProvider>());
 
   metrics_service_->RegisterMetricsProvider(CreateFileMetricsProvider(
-      ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled()));
+      ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled(
+          local_state)));
 
   metrics_service_->RegisterMetricsProvider(
       base::MakeUnique<metrics::DriveMetricsProvider>(
diff --git a/chrome/browser/metrics/chrome_metrics_services_manager_client.cc b/chrome/browser/metrics/chrome_metrics_services_manager_client.cc
index fdf915f..9c33e0e4 100644
--- a/chrome/browser/metrics/chrome_metrics_services_manager_client.cc
+++ b/chrome/browser/metrics/chrome_metrics_services_manager_client.cc
@@ -94,11 +94,13 @@
 #if defined(OS_CHROMEOS)
 // Callback to update the metrics reporting state when the Chrome OS metrics
 // reporting setting changes.
-void OnCrosMetricsReportingSettingChange() {
+void OnCrosMetricsReportingSettingChange(
+    PrefService* local_state,
+    metrics_services_manager::MetricsServicesManager* manager) {
   bool enable_metrics = false;
   chromeos::CrosSettings::Get()->GetBoolean(chromeos::kStatsReportingPref,
                                             &enable_metrics);
-  ChangeMetricsReportingState(enable_metrics);
+  ChangeMetricsReportingState(local_state, manager, enable_metrics);
 }
 #endif
 
@@ -118,11 +120,13 @@
 class ChromeMetricsServicesManagerClient::ChromeEnabledStateProvider
     : public metrics::EnabledStateProvider {
  public:
-  ChromeEnabledStateProvider() {}
+  explicit ChromeEnabledStateProvider(PrefService* local_state)
+      : local_state_(local_state) {}
   ~ChromeEnabledStateProvider() override {}
 
   bool IsConsentGiven() const override {
-    return ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled();
+    return ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled(
+        local_state_);
   }
 
   bool IsReportingEnabled() const override {
@@ -130,21 +134,31 @@
            ChromeMetricsServicesManagerClient::IsClientInSample();
   }
 
+ private:
+  // This code may be run before |g_browser_process| has been created so it
+  // needs to cache |local_state_|. This cached value will be the same as
+  // g_browser_process->local_state() once created.
+  PrefService* local_state_;
+
   DISALLOW_COPY_AND_ASSIGN(ChromeEnabledStateProvider);
 };
 
 ChromeMetricsServicesManagerClient::ChromeMetricsServicesManagerClient(
     PrefService* local_state)
-    : enabled_state_provider_(new ChromeEnabledStateProvider()),
+    : enabled_state_provider_(
+          std::make_unique<ChromeEnabledStateProvider>(local_state)),
       local_state_(local_state) {
   DCHECK(local_state);
+}
 
+void ChromeMetricsServicesManagerClient::OnMetricsServiceManagerCreated(
+    metrics_services_manager::MetricsServicesManager* manager) {
 #if defined(OS_CHROMEOS)
   cros_settings_observer_ = chromeos::CrosSettings::Get()->AddSettingsObserver(
       chromeos::kStatsReportingPref,
-      base::Bind(&OnCrosMetricsReportingSettingChange));
+      base::Bind(&OnCrosMetricsReportingSettingChange, local_state_, manager));
   // Invoke the callback once initially to set the metrics reporting state.
-  OnCrosMetricsReportingSettingChange();
+  OnCrosMetricsReportingSettingChange(local_state_, manager);
 #endif
 }
 
diff --git a/chrome/browser/metrics/chrome_metrics_services_manager_client.h b/chrome/browser/metrics/chrome_metrics_services_manager_client.h
index 9101d19..f15093f 100644
--- a/chrome/browser/metrics/chrome_metrics_services_manager_client.h
+++ b/chrome/browser/metrics/chrome_metrics_services_manager_client.h
@@ -19,6 +19,10 @@
 
 class PrefService;
 
+namespace metrics_services_manager {
+class MetricsServicesManager;
+}
+
 namespace metrics {
 class EnabledStateProvider;
 class MetricsStateManager;
@@ -40,6 +44,11 @@
   explicit ChromeMetricsServicesManagerClient(PrefService* local_state);
   ~ChromeMetricsServicesManagerClient() override;
 
+  // Called once MetricsServicesManager has been created. Used to attach state
+  // associated with the MetricsServicesManager.
+  void OnMetricsServiceManagerCreated(
+      metrics_services_manager::MetricsServicesManager* manager);
+
   // Unconditionally attempts to create a field trial to control client side
   // metrics/crash sampling to use as a fallback when one hasn't been
   // provided. This is expected to occur on first-run on platforms that don't
diff --git a/chrome/browser/metrics/metrics_reporting_state.cc b/chrome/browser/metrics/metrics_reporting_state.cc
index 2592dea8..947136f 100644
--- a/chrome/browser/metrics/metrics_reporting_state.cc
+++ b/chrome/browser/metrics/metrics_reporting_state.cc
@@ -8,7 +8,6 @@
 #include "base/metrics/histogram_macros.h"
 #include "base/task_runner_util.h"
 #include "build/build_config.h"
-#include "chrome/browser/browser_process.h"
 #include "chrome/browser/metrics/chrome_metrics_service_accessor.h"
 #include "chrome/common/pref_names.h"
 #include "chrome/installer/util/google_update_settings.h"
@@ -54,16 +53,20 @@
 //  |updated_pref| is the result of attempted update.
 // Update considers to be successful if |to_update_pref| and |updated_pref| are
 // the same.
-void SetMetricsReporting(bool to_update_pref,
-                         const OnMetricsReportingCallbackType& callback_fn,
-                         bool updated_pref) {
-  g_browser_process->local_state()->SetBoolean(
-      metrics::prefs::kMetricsReportingEnabled, updated_pref);
+void SetMetricsReporting(
+    PrefService* local_state,
+    metrics_services_manager::MetricsServicesManager* metrics_services_manager,
+    bool to_update_pref,
+    const OnMetricsReportingCallbackType& callback_fn,
+    bool updated_pref) {
+  local_state->SetBoolean(metrics::prefs::kMetricsReportingEnabled,
+                          updated_pref);
 
-  UpdateMetricsPrefsOnPermissionChange(updated_pref);
+  UpdateMetricsPrefsOnPermissionChange(
+      local_state, metrics_services_manager->GetMetricsService(), updated_pref);
 
   // Uses the current state of whether reporting is enabled to enable services.
-  g_browser_process->GetMetricsServicesManager()->UpdateUploadPermissions(true);
+  metrics_services_manager->UpdateUploadPermissions(true);
 
   if (to_update_pref == updated_pref) {
     RecordMetricsReportingHistogramValue(updated_pref ?
@@ -77,21 +80,28 @@
 
 }  // namespace
 
-void ChangeMetricsReportingState(bool enabled) {
-  ChangeMetricsReportingStateWithReply(enabled,
+void ChangeMetricsReportingState(
+    PrefService* local_state,
+    metrics_services_manager::MetricsServicesManager* metrics_services_manager,
+    bool enabled) {
+  ChangeMetricsReportingStateWithReply(local_state, metrics_services_manager,
+                                       enabled,
                                        OnMetricsReportingCallbackType());
 }
 
 // TODO(gayane): Instead of checking policy before setting the metrics pref set
 // the pref and register for notifications for the rest of the changes.
 void ChangeMetricsReportingStateWithReply(
+    PrefService* local_state,
+    metrics_services_manager::MetricsServicesManager* metrics_services_manager,
     bool enabled,
     const OnMetricsReportingCallbackType& callback_fn) {
 #if !defined(OS_ANDROID)
-  if (IsMetricsReportingPolicyManaged()) {
+  if (IsMetricsReportingPolicyManaged(local_state)) {
     if (!callback_fn.is_null()) {
       callback_fn.Run(
-          ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled());
+          ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled(
+              local_state));
     }
     return;
   }
@@ -99,30 +109,31 @@
   base::PostTaskAndReplyWithResult(
       GoogleUpdateSettings::CollectStatsConsentTaskRunner(), FROM_HERE,
       base::Bind(&SetGoogleUpdateSettings, enabled),
-      base::Bind(&SetMetricsReporting, enabled, callback_fn));
+      base::Bind(&SetMetricsReporting, local_state, metrics_services_manager,
+                 enabled, callback_fn));
 }
 
-void UpdateMetricsPrefsOnPermissionChange(bool metrics_enabled) {
+void UpdateMetricsPrefsOnPermissionChange(
+    PrefService* local_state,
+    metrics::MetricsService* metrics_service,
+    bool metrics_enabled) {
   if (metrics_enabled) {
     // When a user opts in to the metrics reporting service, the previously
     // collected data should be cleared to ensure that nothing is reported
     // before a user opts in and all reported data is accurate.
-    g_browser_process->metrics_service()->ClearSavedStabilityMetrics();
+    metrics_service->ClearSavedStabilityMetrics();
   } else {
     // Clear the client id pref when opting out.
     // Note: Clearing client id will not affect the running state (e.g. field
     // trial randomization), as the pref is only read on startup.
-    g_browser_process->local_state()->ClearPref(
-        metrics::prefs::kMetricsClientID);
-    g_browser_process->local_state()->ClearPref(
-        metrics::prefs::kMetricsReportingEnabledTimestamp);
+    local_state->ClearPref(metrics::prefs::kMetricsClientID);
+    local_state->ClearPref(metrics::prefs::kMetricsReportingEnabledTimestamp);
     crash_keys::ClearMetricsClientId();
   }
 }
 
-bool IsMetricsReportingPolicyManaged() {
-  const PrefService* pref_service = g_browser_process->local_state();
+bool IsMetricsReportingPolicyManaged(PrefService* local_state) {
   const PrefService::Preference* pref =
-      pref_service->FindPreference(metrics::prefs::kMetricsReportingEnabled);
+      local_state->FindPreference(metrics::prefs::kMetricsReportingEnabled);
   return pref && pref->IsManaged();
 }
diff --git a/chrome/browser/metrics/metrics_reporting_state.h b/chrome/browser/metrics/metrics_reporting_state.h
index 06893c2..79f6977 100644
--- a/chrome/browser/metrics/metrics_reporting_state.h
+++ b/chrome/browser/metrics/metrics_reporting_state.h
@@ -8,28 +8,55 @@
 #include "base/callback.h"
 #include "components/metrics/metrics_service_client.h"
 
+class PrefService;
+
 typedef base::Callback<void(bool)> OnMetricsReportingCallbackType;
 
+namespace metrics {
+class MetricsService;
+}
+
+namespace metrics_services_manager {
+class MetricsServicesManager;
+}
+
+// Many of these functions take objects available from |g_browser_process|. For
+// example, ChangeMetricsReportingState() takes local state. This is done as
+// during startup some of this code is run at a point when |g_browser_process|
+// may not have been created. Unless your code is run during early
+// initialization use |g_browser_process| to obtain the appropriate value.
+
 // Changes metrics reporting state without caring about the success of the
-// change.
-void ChangeMetricsReportingState(bool enabled);
+// change. See early comment for details on args.
+void ChangeMetricsReportingState(
+    PrefService* local_state,
+    metrics_services_manager::MetricsServicesManager* metrics_services_manager,
+    bool enabled);
 
 // Changes metrics reporting state to the new value of |enabled|. Starts or
 // stops the metrics service based on the new state and then runs |callback_fn|
 // (which can be null) with the updated state (as the operation may fail). On
 // platforms other than CrOS and Android, also updates the underlying pref.
+// See early comment for details on args.
 // TODO(gayane): Support setting the pref on all platforms.
 void ChangeMetricsReportingStateWithReply(
+    PrefService* local_state,
+    metrics_services_manager::MetricsServicesManager* metrics_services_manager,
     bool enabled,
     const OnMetricsReportingCallbackType& callback_fn);
 
 // Update metrics prefs on a permission (opt-in/out) change. When opting out,
 // this clears various client ids. When opting in, this resets saving crash
 // prefs, so as not to trigger upload of various stale data.
-void UpdateMetricsPrefsOnPermissionChange(bool metrics_enabled);
+// See early comment for details on args.
+void UpdateMetricsPrefsOnPermissionChange(
+    PrefService* local_state,
+    metrics::MetricsService* metrics_service,
+    bool metrics_enabled);
 
 // Returns whether MetricsReporting can be modified by the user (except
 // Android).
-bool IsMetricsReportingPolicyManaged();
+// See early comment for details on args.
+bool IsMetricsReportingPolicyManaged(PrefService* local_state);
 
 #endif  // CHROME_BROWSER_METRICS_METRICS_REPORTING_STATE_H_
diff --git a/chrome/browser/metrics/metrics_reporting_state_browsertest.cc b/chrome/browser/metrics/metrics_reporting_state_browsertest.cc
new file mode 100644
index 0000000..76f1105
--- /dev/null
+++ b/chrome/browser/metrics/metrics_reporting_state_browsertest.cc
@@ -0,0 +1,171 @@
+// 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 "chrome/browser/metrics/metrics_reporting_state.h"
+
+#include <string>
+
+#include "base/bind.h"
+#include "base/files/file_path.h"
+#include "base/json/json_file_value_serializer.h"
+#include "base/path_service.h"
+#include "base/run_loop.h"
+#include "base/values.h"
+#include "chrome/browser/browser_process.h"
+#include "chrome/browser/chrome_browser_main.h"
+#include "chrome/browser/chrome_browser_main_extra_parts.h"
+#include "chrome/browser/metrics/chrome_metrics_service_accessor.h"
+#include "chrome/common/chrome_constants.h"
+#include "chrome/common/chrome_paths.h"
+#include "chrome/common/pref_names.h"
+#include "chrome/test/base/in_process_browser_test.h"
+#include "components/metrics/metrics_pref_names.h"
+#include "components/metrics/metrics_service_accessor.h"
+
+#if defined(OS_CHROMEOS)
+#include "chrome/browser/chromeos/settings/device_settings_cache.h"
+#include "components/policy/proto/chrome_device_policy.pb.h"
+#include "components/policy/proto/device_management_backend.pb.h"
+#endif
+
+#if defined(OS_CHROMEOS)
+void SetMetricsReportingEnabledChromeOS(
+    bool value,
+    base::DictionaryValue* local_state_dict) {
+  namespace em = enterprise_management;
+  em::ChromeDeviceSettingsProto device_settings_proto;
+  device_settings_proto.mutable_metrics_enabled()->set_metrics_enabled(value);
+  em::PolicyData policy_data;
+  policy_data.set_policy_type("google/chromeos/device");
+  policy_data.set_policy_value(device_settings_proto.SerializeAsString());
+  local_state_dict->SetString(
+      prefs::kDeviceSettingsCache,
+      chromeos::device_settings_cache::PolicyDataToString(policy_data));
+}
+#endif
+
+// ChromeBrowserMainExtraParts implementation that asserts the metrics and
+// reporting state matches a particular value in PreCreateThreads().
+class ChromeBrowserMainExtraPartsChecker : public ChromeBrowserMainExtraParts {
+ public:
+  explicit ChromeBrowserMainExtraPartsChecker(
+      bool expected_metrics_reporting_enabled)
+      : expected_metrics_reporting_enabled_(
+            expected_metrics_reporting_enabled) {}
+
+  // ChromeBrowserMainExtraParts:
+  void PreCreateThreads() override;
+
+ private:
+  // Expected value of reporting state.
+  const bool expected_metrics_reporting_enabled_;
+
+  DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainExtraPartsChecker);
+};
+
+// This class is used to verify the value for
+// IsMetricsAndCrashReportingEnabled() is honored from prefs and when changing
+// the value it is correctly written to disk. The parameter of this test
+// corresponds to the initial value of IsMetricsAndCrashReportingEnabled().
+class MetricsReportingStateTest : public InProcessBrowserTest,
+                                  public testing::WithParamInterface<bool> {
+ public:
+  MetricsReportingStateTest() = default;
+  ~MetricsReportingStateTest() override = default;
+
+  static bool IsMetricsAndCrashReportingEnabled() {
+    return ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled(
+        g_browser_process->local_state());
+  }
+
+  bool is_metrics_reporting_enabled_initial_value() const { return GetParam(); }
+
+  // InProcessBrowserTest overrides:
+  bool SetUpUserDataDirectory() override {
+    // Set up local state so that that value for reporting is
+    // is_metrics_reporting_enabled_initial_value().
+    base::DictionaryValue local_state_dict;
+    local_state_dict.SetBoolean(metrics::prefs::kMetricsReportingEnabled,
+                                is_metrics_reporting_enabled_initial_value());
+
+    base::FilePath user_data_dir;
+    if (!PathService::Get(chrome::DIR_USER_DATA, &user_data_dir))
+      return false;
+
+#if defined(OS_CHROMEOS)
+    // ChromeOS checks a separate place for reporting enabled.
+    SetMetricsReportingEnabledChromeOS(
+        is_metrics_reporting_enabled_initial_value(), &local_state_dict);
+#endif
+
+    local_state_path_ = user_data_dir.Append(chrome::kLocalStateFilename);
+    return JSONFileValueSerializer(local_state_path_)
+        .Serialize(local_state_dict);
+  }
+
+  void CreatedBrowserMainParts(content::BrowserMainParts* parts) override {
+    // IsMetricsReportingEnabled() in non-official builds always returns false.
+    // Enable the official build checks so that this test can work in both
+    // official and non-official builds.
+    ChromeMetricsServiceAccessor::SetForceIsMetricsReportingEnabledPrefLookup(
+        true);
+    static_cast<ChromeBrowserMainParts*>(parts)->AddParts(
+        new ChromeBrowserMainExtraPartsChecker(
+            is_metrics_reporting_enabled_initial_value()));
+  }
+
+  void TearDown() override {
+    // Verify the changed value was written to disk.
+    JSONFileValueDeserializer deserializer(local_state_path_);
+    int error_code = 0;
+    std::string error_message;
+    std::unique_ptr<base::Value> pref_values =
+        deserializer.Deserialize(&error_code, &error_message);
+    ASSERT_TRUE(pref_values) << error_message;
+    base::DictionaryValue* pref_dict_values = nullptr;
+    ASSERT_TRUE(pref_values->GetAsDictionary(&pref_dict_values));
+    bool enabled = false;
+    ASSERT_TRUE(pref_dict_values->GetBoolean(
+        metrics::prefs::kMetricsReportingEnabled, &enabled));
+    EXPECT_EQ(!is_metrics_reporting_enabled_initial_value(), enabled);
+    InProcessBrowserTest::TearDown();
+  }
+
+ private:
+  base::FilePath local_state_path_;
+
+  DISALLOW_COPY_AND_ASSIGN(MetricsReportingStateTest);
+};
+
+void ChromeBrowserMainExtraPartsChecker::PreCreateThreads() {
+  ASSERT_EQ(expected_metrics_reporting_enabled_,
+            MetricsReportingStateTest::IsMetricsAndCrashReportingEnabled());
+}
+
+// Callback from changing whether reporting is enabled.
+void OnMetricsReportingStateChanged(bool* new_state_ptr,
+                                    base::Closure run_loop_closure,
+                                    bool new_state) {
+  *new_state_ptr = new_state;
+  run_loop_closure.Run();
+}
+
+IN_PROC_BROWSER_TEST_P(MetricsReportingStateTest, ChangeMetricsReportingState) {
+  ASSERT_EQ(is_metrics_reporting_enabled_initial_value(),
+            MetricsReportingStateTest::IsMetricsAndCrashReportingEnabled());
+  base::RunLoop run_loop;
+  bool value_after_change = false;
+  ChangeMetricsReportingStateWithReply(
+      g_browser_process->local_state(),
+      g_browser_process->GetMetricsServicesManager(),
+      !is_metrics_reporting_enabled_initial_value(),
+      base::Bind(&OnMetricsReportingStateChanged, &value_after_change,
+                 run_loop.QuitClosure()));
+  run_loop.Run();
+  EXPECT_EQ(!is_metrics_reporting_enabled_initial_value(), value_after_change);
+}
+
+INSTANTIATE_TEST_CASE_P(MetricsReportingStateTests,
+                        MetricsReportingStateTest,
+                        testing::Bool());
diff --git a/chrome/browser/password_manager/chrome_password_manager_client.cc b/chrome/browser/password_manager/chrome_password_manager_client.cc
index 60b8e50..d409469 100644
--- a/chrome/browser/password_manager/chrome_password_manager_client.cc
+++ b/chrome/browser/password_manager/chrome_password_manager_client.cc
@@ -707,7 +707,8 @@
     Profile* profile) {
   // Only annotate PasswordState onto the navigation entry if user is
   // opted into UMA and they're not syncing w/ a custom passphrase.
-  if (!ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled())
+  if (!ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled(
+          g_browser_process->local_state()))
     return false;
 
   browser_sync::ProfileSyncService* profile_sync_service =
diff --git a/chrome/browser/password_manager/generated_password_saved_infobar_delegate_android.cc b/chrome/browser/password_manager/generated_password_saved_infobar_delegate_android.cc
index ceffdce..186f9f0c 100644
--- a/chrome/browser/password_manager/generated_password_saved_infobar_delegate_android.cc
+++ b/chrome/browser/password_manager/generated_password_saved_infobar_delegate_android.cc
@@ -34,11 +34,6 @@
   inline_link_range_ = gfx::Range(offset, offset + link.length());
 }
 
-infobars::InfoBarDelegate::Type
-GeneratedPasswordSavedInfoBarDelegateAndroid::GetInfoBarType() const {
-  return PAGE_ACTION_TYPE;
-}
-
 infobars::InfoBarDelegate::InfoBarIdentifier
 GeneratedPasswordSavedInfoBarDelegateAndroid::GetIdentifier() const {
   return GENERATED_PASSWORD_SAVED_INFOBAR_DELEGATE_ANDROID;
diff --git a/chrome/browser/password_manager/generated_password_saved_infobar_delegate_android.h b/chrome/browser/password_manager/generated_password_saved_infobar_delegate_android.h
index 3ce24e4..34b58d6 100644
--- a/chrome/browser/password_manager/generated_password_saved_infobar_delegate_android.h
+++ b/chrome/browser/password_manager/generated_password_saved_infobar_delegate_android.h
@@ -40,7 +40,6 @@
   GeneratedPasswordSavedInfoBarDelegateAndroid();
 
   // infobars::InfoBarDelegate:
-  Type GetInfoBarType() const override;
   infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override;
   int GetIconId() const override;
 
diff --git a/chrome/browser/password_manager/password_manager_infobar_delegate_android.cc b/chrome/browser/password_manager/password_manager_infobar_delegate_android.cc
index 777c8521..af8a58d 100644
--- a/chrome/browser/password_manager/password_manager_infobar_delegate_android.cc
+++ b/chrome/browser/password_manager/password_manager_infobar_delegate_android.cc
@@ -15,11 +15,6 @@
 PasswordManagerInfoBarDelegate::PasswordManagerInfoBarDelegate()
     : ConfirmInfoBarDelegate(), message_link_range_(gfx::Range()) {}
 
-infobars::InfoBarDelegate::Type PasswordManagerInfoBarDelegate::GetInfoBarType()
-    const {
-  return PAGE_ACTION_TYPE;
-}
-
 infobars::InfoBarDelegate::InfoBarAutomationType
 PasswordManagerInfoBarDelegate::GetInfoBarAutomationType() const {
   return PASSWORD_INFOBAR;
diff --git a/chrome/browser/password_manager/password_manager_infobar_delegate_android.h b/chrome/browser/password_manager/password_manager_infobar_delegate_android.h
index 2c91026..8f7f87d4 100644
--- a/chrome/browser/password_manager/password_manager_infobar_delegate_android.h
+++ b/chrome/browser/password_manager/password_manager_infobar_delegate_android.h
@@ -18,7 +18,6 @@
   const gfx::Range& message_link_range() const { return message_link_range_; }
 
   // ConfirmInfoBarDelegate:
-  Type GetInfoBarType() const override;
   InfoBarAutomationType GetInfoBarAutomationType() const override;
   int GetIconId() const override;
   bool ShouldExpire(const NavigationDetails& details) const override;
diff --git a/chrome/browser/permissions/grouped_permission_infobar_delegate_android.cc b/chrome/browser/permissions/grouped_permission_infobar_delegate_android.cc
index f9a2158..aa542f8 100644
--- a/chrome/browser/permissions/grouped_permission_infobar_delegate_android.cc
+++ b/chrome/browser/permissions/grouped_permission_infobar_delegate_android.cc
@@ -73,11 +73,6 @@
   return GROUPED_PERMISSION_INFOBAR_DELEGATE_ANDROID;
 }
 
-infobars::InfoBarDelegate::Type
-GroupedPermissionInfoBarDelegate::GetInfoBarType() const {
-  return PAGE_ACTION_TYPE;
-}
-
 int GroupedPermissionInfoBarDelegate::GetButtons() const {
   return BUTTON_OK | BUTTON_CANCEL;
 }
diff --git a/chrome/browser/permissions/grouped_permission_infobar_delegate_android.h b/chrome/browser/permissions/grouped_permission_infobar_delegate_android.h
index 91851bd..9b8a553 100644
--- a/chrome/browser/permissions/grouped_permission_infobar_delegate_android.h
+++ b/chrome/browser/permissions/grouped_permission_infobar_delegate_android.h
@@ -46,7 +46,6 @@
 
   // ConfirmInfoBarDelegate:
   InfoBarIdentifier GetIdentifier() const override;
-  Type GetInfoBarType() const override;
   int GetButtons() const override;
   base::string16 GetButtonLabel(InfoBarButton button) const override;
 
diff --git a/chrome/browser/previews/previews_infobar_delegate.cc b/chrome/browser/previews/previews_infobar_delegate.cc
index 1052f56..57360b0d3 100644
--- a/chrome/browser/previews/previews_infobar_delegate.cc
+++ b/chrome/browser/previews/previews_infobar_delegate.cc
@@ -78,7 +78,9 @@
       web_contents->ReloadLoFiImages();
       break;
     case previews::PreviewsType::NONE:
+    case previews::PreviewsType::UNSPECIFIED:
     case previews::PreviewsType::LAST:
+      NOTREACHED();
       break;
   }
 }
@@ -172,7 +174,10 @@
       message_text_(l10n_util::GetStringUTF16(
           is_data_saver_user ? IDS_PREVIEWS_INFOBAR_SAVED_DATA_TITLE
                              : IDS_PREVIEWS_INFOBAR_FASTER_PAGE_TITLE)),
-      on_dismiss_callback_(std::move(on_dismiss_callback)) {}
+      on_dismiss_callback_(std::move(on_dismiss_callback)) {
+  DCHECK(previews_type_ != previews::PreviewsType::NONE &&
+         previews_type_ != previews::PreviewsType::UNSPECIFIED);
+}
 
 infobars::InfoBarDelegate::InfoBarIdentifier
 PreviewsInfoBarDelegate::GetIdentifier() const {
diff --git a/chrome/browser/previews/previews_service.cc b/chrome/browser/previews/previews_service.cc
index e7ae3b5..6a3b3dc 100644
--- a/chrome/browser/previews/previews_service.cc
+++ b/chrome/browser/previews/previews_service.cc
@@ -39,6 +39,9 @@
       return previews::params::IsAMPRedirectionPreviewEnabled();
     case previews::PreviewsType::NOSCRIPT:
       return previews::params::IsNoScriptPreviewsEnabled();
+    case previews::PreviewsType::UNSPECIFIED:
+      // Not a real previews type so treat as false.
+      return false;
     case previews::PreviewsType::NONE:
     case previews::PreviewsType::LAST:
       break;
@@ -62,6 +65,7 @@
     case previews::PreviewsType::NOSCRIPT:
       return previews::params::NoScriptPreviewsVersion();
     case previews::PreviewsType::NONE:
+    case previews::PreviewsType::UNSPECIFIED:
     case previews::PreviewsType::LAST:
       break;
   }
diff --git a/chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc b/chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc
index 09cd9bb6..9c54646 100644
--- a/chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc
+++ b/chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc
@@ -13,6 +13,7 @@
 
 #include "base/bind.h"
 #include "base/command_line.h"
+#include "base/files/scoped_temp_dir.h"
 #include "base/message_loop/message_loop.h"
 #include "base/process/kill.h"
 #include "base/process/process.h"
@@ -43,8 +44,6 @@
 #include "chrome/test/base/chrome_unit_test_suite.h"
 #include "chrome/test/base/test_launcher_utils.h"
 #include "chrome/test/base/testing_browser_process.h"
-#include "chrome/test/base/testing_profile.h"
-#include "chrome/test/base/testing_profile_manager.h"
 #include "components/sync_preferences/testing_pref_service_syncable.h"
 #include "content/public/browser/notification_service.h"
 #include "content/public/common/content_paths.h"
@@ -481,11 +480,6 @@
       BrowserThread::GetTaskRunnerForThread(BrowserThread::IO),
       mojo::edk::ScopedIPCSupport::ShutdownPolicy::FAST);
 
-  TestingBrowserProcess* browser_process =
-      TestingBrowserProcess::GetGlobal();
-  TestingProfileManager profile_manager(browser_process);
-  ASSERT_TRUE(profile_manager.SetUp());
-
   base::Process process =
       Launch("CloudPrintMockService_StartEnabledWaitForQuit");
   mojo::edk::PeerConnection peer_connection;
diff --git a/chrome/browser/profiles/profile_attributes_storage_unittest.cc b/chrome/browser/profiles/profile_attributes_storage_unittest.cc
index 1a04ad7..010296b 100644
--- a/chrome/browser/profiles/profile_attributes_storage_unittest.cc
+++ b/chrome/browser/profiles/profile_attributes_storage_unittest.cc
@@ -804,8 +804,11 @@
       profiles::GetPathOfHighResAvatarAtIndex(kIconIndex);
 
   // Create the avatar on the disk, which is a valid 1x1 transparent png.
+  base::FilePath dir = icon_path.DirName();
+  ASSERT_FALSE(base::DirectoryExists(dir));
+  ASSERT_TRUE(base::CreateDirectory(dir));
   ASSERT_FALSE(base::PathExists(icon_path));
-  const char* bitmap =
+  const char bitmap[] =
       "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A\x00\x00\x00\x0D\x49\x48\x44\x52"
       "\x00\x00\x00\x01\x00\x00\x00\x01\x01\x00\x00\x00\x00\x37\x6E\xF9"
       "\x24\x00\x00\x00\x0A\x49\x44\x41\x54\x08\x1D\x63\x60\x00\x00\x00"
diff --git a/chrome/browser/profiles/profile_info_cache_unittest.cc b/chrome/browser/profiles/profile_info_cache_unittest.cc
index 60edb57..2838bf6 100644
--- a/chrome/browser/profiles/profile_info_cache_unittest.cc
+++ b/chrome/browser/profiles/profile_info_cache_unittest.cc
@@ -22,7 +22,6 @@
 #include "chrome/browser/profiles/profile_avatar_icon_util.h"
 #include "chrome/browser/profiles/profile_info_cache.h"
 #include "chrome/browser/profiles/profile_manager.h"
-#include "chrome/common/chrome_paths.h"
 #include "chrome/common/chrome_switches.h"
 #include "chrome/common/pref_names.h"
 #include "chrome/test/base/testing_browser_process.h"
@@ -95,9 +94,7 @@
 
 ProfileInfoCacheTest::ProfileInfoCacheTest()
     : testing_profile_manager_(TestingBrowserProcess::GetGlobal()),
-      name_observer_(&testing_profile_manager_),
-      user_data_dir_override_(chrome::DIR_USER_DATA) {
-}
+      name_observer_(&testing_profile_manager_) {}
 
 ProfileInfoCacheTest::~ProfileInfoCacheTest() {
 }
diff --git a/chrome/browser/profiles/profile_info_cache_unittest.h b/chrome/browser/profiles/profile_info_cache_unittest.h
index c783e61..f7ad7fd 100644
--- a/chrome/browser/profiles/profile_info_cache_unittest.h
+++ b/chrome/browser/profiles/profile_info_cache_unittest.h
@@ -8,7 +8,6 @@
 #include <set>
 
 #include "base/macros.h"
-#include "base/test/scoped_path_override.h"
 #include "chrome/browser/profiles/profile_info_cache_observer.h"
 #include "chrome/test/base/testing_profile_manager.h"
 #include "content/public/test/test_browser_thread_bundle.h"
@@ -66,7 +65,6 @@
 
  private:
   ProfileNameVerifierObserver name_observer_;
-  base::ScopedPathOverride user_data_dir_override_;
 };
 
 #endif  // CHROME_BROWSER_PROFILES_PROFILE_INFO_CACHE_UNITTEST_H_
diff --git a/chrome/browser/profiling_host/background_profiling_triggers.cc b/chrome/browser/profiling_host/background_profiling_triggers.cc
index c88f9fbf..d9f624c2 100644
--- a/chrome/browser/profiling_host/background_profiling_triggers.cc
+++ b/chrome/browser/profiling_host/background_profiling_triggers.cc
@@ -82,7 +82,8 @@
 }
 
 bool BackgroundProfilingTriggers::IsAllowedToUpload() const {
-  if (!ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled()) {
+  if (!ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled(
+          g_browser_process->local_state())) {
     return false;
   }
 
diff --git a/chrome/browser/renderer_host/chrome_extension_message_filter.cc b/chrome/browser/renderer_host/chrome_extension_message_filter.cc
index 5b98dda9..30897fe 100644
--- a/chrome/browser/renderer_host/chrome_extension_message_filter.cc
+++ b/chrome/browser/renderer_host/chrome_extension_message_filter.cc
@@ -37,7 +37,7 @@
 
 namespace {
 
-const uint32_t kFilteredMessageClasses[] = {
+const uint32_t kExtensionFilteredMessageClasses[] = {
     ChromeExtensionMsgStart, ExtensionMsgStart,
 };
 
@@ -59,8 +59,8 @@
 ChromeExtensionMessageFilter::ChromeExtensionMessageFilter(
     int render_process_id,
     Profile* profile)
-    : BrowserMessageFilter(kFilteredMessageClasses,
-                           arraysize(kFilteredMessageClasses)),
+    : BrowserMessageFilter(kExtensionFilteredMessageClasses,
+                           arraysize(kExtensionFilteredMessageClasses)),
       render_process_id_(render_process_id),
       profile_(profile),
       activity_log_(extensions::ActivityLog::GetInstance(profile)),
diff --git a/chrome/browser/renderer_host/chrome_render_message_filter.cc b/chrome/browser/renderer_host/chrome_render_message_filter.cc
index af9cadb..b6b84220 100644
--- a/chrome/browser/renderer_host/chrome_render_message_filter.cc
+++ b/chrome/browser/renderer_host/chrome_render_message_filter.cc
@@ -43,7 +43,7 @@
 
 namespace {
 
-const uint32_t kFilteredMessageClasses[] = {
+const uint32_t kRenderFilteredMessageClasses[] = {
     ChromeMsgStart, NetworkHintsMsgStart,
 };
 
@@ -51,8 +51,8 @@
 
 ChromeRenderMessageFilter::ChromeRenderMessageFilter(int render_process_id,
                                                      Profile* profile)
-    : BrowserMessageFilter(kFilteredMessageClasses,
-                           arraysize(kFilteredMessageClasses)),
+    : BrowserMessageFilter(kRenderFilteredMessageClasses,
+                           arraysize(kRenderFilteredMessageClasses)),
       render_process_id_(render_process_id),
       profile_(profile),
       predictor_(profile_->GetNetworkPredictor()),
@@ -304,6 +304,7 @@
 
 #if BUILDFLAG(ENABLE_PLUGINS)
 void ChromeRenderMessageFilter::OnIsCrashReportingEnabled(bool* enabled) {
-  *enabled = ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled();
+  *enabled = ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled(
+      g_browser_process->local_state());
 }
 #endif
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_predicate.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_predicate.js
index 59704ef..4172ef4 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_predicate.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_predicate.js
@@ -162,7 +162,7 @@
  */
 AutomationPredicate.leaf = function(node) {
   return !node.firstChild || node.role == Role.BUTTON ||
-      node.role == Role.BUTTON_DROP_DOWN || node.role == Role.POP_UP_BUTTON ||
+      node.role == Role.POP_UP_BUTTON ||
       node.role == Role.SLIDER || node.role == Role.TEXT_FIELD ||
       node.state[State.INVISIBLE] || node.children.every(function(n) {
         return n.state[State.INVISIBLE];
diff --git a/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.css b/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.css
index 7ae1c39..9cc5423 100644
--- a/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.css
+++ b/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.css
@@ -137,7 +137,7 @@
   border: 0;
 }
 
-paper-menu {
+paper-listbox {
   color: rgba(0, 0, 0, 0.87);
   overflow-x: hidden;
   overflow-y: auto;
diff --git a/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.html b/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.html
index 9a9e850..6b606df 100644
--- a/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.html
+++ b/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.html
@@ -3,7 +3,7 @@
 <link rel="import" href="chrome://resources/polymer/v1_0/paper-checkbox/paper-checkbox.html">
 <link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input.html">
 <link rel="import" href="chrome://resources/polymer/v1_0/paper-item/paper-item.html">
-<link rel="import" href="chrome://resources/polymer/v1_0/paper-menu/paper-menu.html">
+<link rel="import" href="chrome://resources/polymer/v1_0/paper-listbox/paper-listbox.html">
 <link rel="import" href="chrome://resources/polymer/v1_0/paper-spinner/paper-spinner-lite.html">
 <link rel="import" href="../media_router_header/media_router_header.html">
 <link rel="import" href="../route_details/route_details.html">
@@ -57,7 +57,7 @@
     </media-router-header>
     <div id="content">
       <template is="dom-if" if="[[!computeCastModeListHidden_(currentView_)]]">
-        <paper-menu id="cast-mode-list" role="presentation"
+        <paper-listbox id="cast-mode-list" role="presentation"
             selectable="paper-item" selected="{{selectedCastModeMenuItem_}}">
           <template is="dom-repeat" id="presentationCastModeList"
               items="[[computePresentationCastModeList_(castModeList)]]">
@@ -94,7 +94,7 @@
               <div><span>[[item.description]]</span></div>
             </paper-item>
           </template>
-        </paper-menu>
+        </paper-listbox>
       </template>
       <template is="dom-if"
           if="[[!computeRouteDetailsHidden_(currentView_, issue)]]">
@@ -121,7 +121,7 @@
         </div>
         <template is="dom-if" if="[[!computeSinkListHidden_(sinksToShow_)]]">
           <div id="sink-list" hidden$="[[hideSinkListForAnimation_]]">
-            <paper-menu id="sink-list-paper-menu" role="presentation">
+            <paper-listbox id="sink-list-paper-menu" role="presentation">
               <template is="dom-repeat" id="sinkList" items="[[sinksToShow_]]">
                 <paper-item on-tap="onSinkClick_">
                   <div class="sink-content">
@@ -158,7 +158,7 @@
                   </div>
                 </paper-item>
               </template>
-            </paper-menu>
+            </paper-listbox>
           </div>
         </template>
         <template is="dom-if" if="[[searchEnabled_]]">
@@ -185,7 +185,8 @@
             </div>
             <div id="search-results"
                 hidden$="[[computeSearchResultsHidden_(searchResultsToShow_, isSearchListHidden_)]]">
-              <paper-menu id="search-results-paper-menu" selected="0" role="presentation">
+              <paper-listbox id="search-results-paper-menu" selected="0"
+                  role="presentation">
                 <template is="dom-repeat" id="searchResults"
                     items="[[searchResultsToShow_]]">
                   <paper-item class="search-item" on-tap="onSinkClick_">
@@ -226,7 +227,7 @@
                     </div>
                   </paper-item>
                 </template>
-              </paper-menu>
+              </paper-listbox>
             </div>
           </div>
         </template>
diff --git a/chrome/browser/resources/print_preview/data/destination.js b/chrome/browser/resources/print_preview/data/destination.js
index 46f97789..5d32c947 100644
--- a/chrome/browser/resources/print_preview/data/destination.js
+++ b/chrome/browser/resources/print_preview/data/destination.js
@@ -781,7 +781,6 @@
     LOCAL_2X: 'images/2x/printer.png',
     MOBILE: 'images/mobile.png',
     MOBILE_SHARED: 'images/mobile_shared.png',
-    THIRD_PARTY: 'images/third_party.png',
     PDF: 'images/pdf.png',
     DOCS: 'images/google_doc.png',
     ENTERPRISE: 'images/business.svg'
diff --git a/chrome/browser/resources/print_preview/images/third_party.png b/chrome/browser/resources/print_preview/images/third_party.png
deleted file mode 100644
index d15552d..0000000
--- a/chrome/browser/resources/print_preview/images/third_party.png
+++ /dev/null
Binary files differ
diff --git a/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_impl_win.cc b/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_impl_win.cc
index d7e89945..0c87139 100644
--- a/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_impl_win.cc
+++ b/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_impl_win.cc
@@ -195,7 +195,8 @@
 }
 
 bool ChromeCleanerControllerDelegate::IsMetricsAndCrashReportingEnabled() {
-  return ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled();
+  return ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled(
+      g_browser_process->local_state());
 }
 
 void ChromeCleanerControllerDelegate::TagForResetting(Profile* profile) {
diff --git a/chrome/browser/safe_browsing/chrome_cleaner/reporter_runner_win.cc b/chrome/browser/safe_browsing/chrome_cleaner/reporter_runner_win.cc
index 323ab2f..00b81a3 100644
--- a/chrome/browser/safe_browsing/chrome_cleaner/reporter_runner_win.cc
+++ b/chrome/browser/safe_browsing/chrome_cleaner/reporter_runner_win.cc
@@ -900,7 +900,8 @@
       invocation->set_reporter_logs_upload_enabled(false);
     }
 
-    if (ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled()) {
+    if (ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled(
+            local_state)) {
       invocation->mutable_command_line().AppendSwitch(
           chrome_cleaner::kEnableCrashReportingSwitch);
     }
diff --git a/chrome/browser/safe_browsing/download_protection/download_url_sb_client.cc b/chrome/browser/safe_browsing/download_protection/download_url_sb_client.cc
index 7b97d19..a41ae90 100644
--- a/chrome/browser/safe_browsing/download_protection/download_url_sb_client.cc
+++ b/chrome/browser/safe_browsing/download_protection/download_url_sb_client.cc
@@ -6,6 +6,7 @@
 
 #include "base/metrics/histogram_macros.h"
 #include "base/strings/string_number_conversions.h"
+#include "chrome/browser/browser_process.h"
 #include "chrome/browser/metrics/chrome_metrics_service_accessor.h"
 #include "chrome/browser/profiles/profile_manager.h"
 #include "chrome/browser/safe_browsing/download_protection/download_protection_service.h"
@@ -119,7 +120,8 @@
   hit_report.post_data = post_data;
   hit_report.extended_reporting_level = extended_reporting_level_;
   hit_report.is_metrics_reporting_active =
-      ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled();
+      ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled(
+          g_browser_process->local_state());
 
   ui_manager_->MaybeReportSafeBrowsingHit(hit_report, item_->GetWebContents());
 }
diff --git a/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc b/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc
index 6b704cd..f4cffcf 100644
--- a/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc
+++ b/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc
@@ -22,6 +22,7 @@
 #include "base/task_scheduler/task_traits.h"
 #include "base/threading/thread_task_runner_handle.h"
 #include "build/build_config.h"
+#include "chrome/browser/browser_process.h"
 #include "chrome/browser/chrome_notification_types.h"
 #include "chrome/browser/metrics/chrome_metrics_service_accessor.h"
 #include "chrome/browser/profiles/profile.h"
@@ -824,7 +825,8 @@
       report->mutable_environment()->mutable_process();
 
   process->set_metrics_consent(
-      ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled());
+      ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled(
+          g_browser_process->local_state()));
 
   // Associate process-wide incidents with any eligible profile. If there is no
   // eligible profile, drop the incidents.
diff --git a/chrome/browser/safe_browsing/ui_manager.cc b/chrome/browser/safe_browsing/ui_manager.cc
index 83f3da7..65f7fd7 100644
--- a/chrome/browser/safe_browsing/ui_manager.cc
+++ b/chrome/browser/safe_browsing/ui_manager.cc
@@ -90,7 +90,8 @@
       profile ? GetExtendedReportingLevel(*profile->GetPrefs())
               : SBER_LEVEL_OFF;
   hit_report.is_metrics_reporting_active =
-      ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled();
+      ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled(
+          g_browser_process->local_state());
 
   MaybeReportSafeBrowsingHit(hit_report, web_contents);
 
diff --git a/chrome/browser/ssl/ssl_browsertest.cc b/chrome/browser/ssl/ssl_browsertest.cc
index 4fc7638..ba058dc 100644
--- a/chrome/browser/ssl/ssl_browsertest.cc
+++ b/chrome/browser/ssl/ssl_browsertest.cc
@@ -1904,22 +1904,6 @@
       browser()->tab_strip_model()->GetActiveWebContents(), AuthState::NONE);
 }
 
-IN_PROC_BROWSER_TEST_P(SSLUITest, CommonNameIsDefaultDisabled) {
-  bool net::SSLConfig::*member =
-      &net::SSLConfig::common_name_fallback_local_anchors_enabled;
-
-  ASSERT_NO_FATAL_FAILURE(
-      CheckSSLConfig(browser()->profile()->GetRequestContext(), member, false));
-
-  ASSERT_TRUE(https_server_common_name_only_.Start());
-  ui_test_utils::NavigateToURL(
-      browser(), https_server_common_name_only_.GetURL("/ssl/google.html"));
-
-  CheckAuthenticationBrokenState(
-      browser()->tab_strip_model()->GetActiveWebContents(),
-      net::CERT_STATUS_COMMON_NAME_INVALID, AuthState::SHOWING_INTERSTITIAL);
-}
-
 IN_PROC_BROWSER_TEST_P(SSLUITest, SymantecEnforcementIsNotDisabled) {
   bool net::SSLConfig::*member = &net::SSLConfig::symantec_enforcement_disabled;
   ASSERT_NO_FATAL_FAILURE(
diff --git a/chrome/browser/status_icons/desktop_notification_balloon.cc b/chrome/browser/status_icons/desktop_notification_balloon.cc
index 06ea657..6ac06d5 100644
--- a/chrome/browser/status_icons/desktop_notification_balloon.cc
+++ b/chrome/browser/status_icons/desktop_notification_balloon.cc
@@ -19,7 +19,7 @@
 namespace {
 
 // Prefix added to the notification ids.
-const char kNotificationPrefix[] = "desktop_notification_balloon.";
+const char kDesktopNotificationPrefix[] = "desktop_notification_balloon.";
 
 }  // anonymous namespace
 
@@ -44,7 +44,7 @@
   }
 
   const std::string notification_id =
-      kNotificationPrefix + base::IntToString(id_count_++);
+      kDesktopNotificationPrefix + base::IntToString(id_count_++);
   message_center::Notification notification(
       message_center::NOTIFICATION_TYPE_SIMPLE, notification_id, title,
       contents, gfx::Image(icon), base::string16(), GURL(), notifier_id, {},
diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn
index 612f143..d576073 100644
--- a/chrome/browser/ui/BUILD.gn
+++ b/chrome/browser/ui/BUILD.gn
@@ -1762,6 +1762,7 @@
       "cocoa/bookmarks/bookmark_menu_cocoa_controller.mm",
       "cocoa/browser_window_command_handler.h",
       "cocoa/browser_window_command_handler.mm",
+      "cocoa/browser_window_views_mac.h",
       "cocoa/chrome_command_dispatcher_delegate.h",
       "cocoa/chrome_command_dispatcher_delegate.mm",
       "cocoa/chrome_style.cc",
@@ -1871,6 +1872,7 @@
       # MacViews sources that we still want to keep behind a compile-time flag.
       # TODO(jackhou): Move items to general views sources out of here.
       sources += [
+        "cocoa/browser_window_views_mac.mm",
         "views/apps/chrome_app_window_client_views_mac.mm",
         "views/certificate_viewer_mac_views.mm",
         "views/dropdown_bar_host_mac.mm",
@@ -1994,6 +1996,7 @@
         "cocoa/browser_dialogs_views_mac.h",
         "cocoa/browser_window_cocoa.h",
         "cocoa/browser_window_cocoa.mm",
+        "cocoa/browser_window_cocoa_views_mac.mm",
         "cocoa/browser_window_controller.h",
         "cocoa/browser_window_controller.mm",
         "cocoa/browser_window_controller_private.h",
@@ -2374,8 +2377,6 @@
         "cocoa/single_web_contents_dialog_manager_cocoa.mm",
         "cocoa/spinner_view.h",
         "cocoa/spinner_view.mm",
-        "cocoa/sprite_view.h",
-        "cocoa/sprite_view.mm",
         "cocoa/ssl_client_certificate_selector_cocoa.h",
         "cocoa/ssl_client_certificate_selector_cocoa.mm",
         "cocoa/status_bubble_mac.h",
@@ -2408,6 +2409,10 @@
         "cocoa/tabs/tab_controller.h",
         "cocoa/tabs/tab_controller.mm",
         "cocoa/tabs/tab_controller_target.h",
+        "cocoa/tabs/tab_favicon_view.h",
+        "cocoa/tabs/tab_favicon_view.mm",
+        "cocoa/tabs/tab_spinner_view.h",
+        "cocoa/tabs/tab_spinner_view.mm",
         "cocoa/tabs/tab_strip_background_view.h",
         "cocoa/tabs/tab_strip_background_view.mm",
         "cocoa/tabs/tab_strip_controller.h",
diff --git a/chrome/browser/ui/android/infobars/infobar_container_android.cc b/chrome/browser/ui/android/infobars/infobar_container_android.cc
index 6280bb2..04266940 100644
--- a/chrome/browser/ui/android/infobars/infobar_container_android.cc
+++ b/chrome/browser/ui/android/infobars/infobar_container_android.cc
@@ -49,10 +49,8 @@
   InfoBarAndroid* android_bar = static_cast<InfoBarAndroid*>(infobar);
   if (!android_bar) {
     // TODO(bulach): CLANK: implement other types of InfoBars.
-    // TODO(jrg): this will always print out WARNING_TYPE as an int.
-    // Try and be more helpful.
-    NOTIMPLEMENTED() << "CLANK: infobar type "
-                     << infobar->delegate()->GetInfoBarType();
+    NOTIMPLEMENTED() << "CLANK: infobar identifier "
+                     << infobar->delegate()->GetIdentifier();
     return;
   }
 
diff --git a/chrome/browser/ui/browser_browsertest.cc b/chrome/browser/ui/browser_browsertest.cc
index 07ce8a50..d2ba296 100644
--- a/chrome/browser/ui/browser_browsertest.cc
+++ b/chrome/browser/ui/browser_browsertest.cc
@@ -1928,7 +1928,13 @@
   EXPECT_EQ(title, title_watcher.WaitAndGetTitle());
 }
 
-IN_PROC_BROWSER_TEST_F(BrowserTest, WindowOpenClose3) {
+#if defined(OS_WIN) && !defined(NDEBUG)
+// Times out on windows (dbg). https://crbug.com/753691.
+#define MAYBE_WindowOpenClose3 DISABLED_WindowOpenClose3
+#else
+#define MAYBE_WindowOpenClose3 WindowOpenClose3
+#endif
+IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_WindowOpenClose3) {
   base::CommandLine::ForCurrentProcess()->AppendSwitch(
       switches::kDisablePopupBlocking);
   ASSERT_TRUE(embedded_test_server()->Start());
diff --git a/chrome/browser/ui/cocoa/browser_window_cocoa_views_mac.mm b/chrome/browser/ui/cocoa/browser_window_cocoa_views_mac.mm
new file mode 100644
index 0000000..ecfa2bbe
--- /dev/null
+++ b/chrome/browser/ui/cocoa/browser_window_cocoa_views_mac.mm
@@ -0,0 +1,16 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#import "chrome/browser/ui/cocoa/browser_window_views_mac.h"
+
+#import "chrome/browser/ui/cocoa/browser_window_controller.h"
+#import "chrome/browser/ui/cocoa/tabs/tab_window_controller.h"
+
+BrowserWindowController* BrowserWindowControllerForWindow(NSWindow* window) {
+  return [BrowserWindowController browserWindowControllerForWindow:window];
+}
+
+TabWindowController* TabWindowControllerForWindow(NSWindow* window) {
+  return [TabWindowController tabWindowControllerForWindow:window];
+}
diff --git a/chrome/browser/ui/cocoa/browser_window_command_handler.mm b/chrome/browser/ui/cocoa/browser_window_command_handler.mm
index 1a1ff7a..3148257d 100644
--- a/chrome/browser/ui/cocoa/browser_window_command_handler.mm
+++ b/chrome/browser/ui/cocoa/browser_window_command_handler.mm
@@ -14,7 +14,8 @@
 #include "chrome/browser/ui/browser_commands.h"
 #include "chrome/browser/ui/browser_finder.h"
 #include "chrome/browser/ui/browser_window.h"
-#import "chrome/browser/ui/cocoa/browser_window_controller_private.h"
+#import "chrome/browser/ui/cocoa/browser_window_controller.h"
+#import "chrome/browser/ui/cocoa/browser_window_views_mac.h"
 #include "chrome/common/chrome_features.h"
 #include "chrome/common/pref_names.h"
 #include "chrome/grit/generated_resources.h"
@@ -96,7 +97,7 @@
 NSString* GetTitleForFullscreenMenuItem(Browser* browser) {
   NSWindow* ns_window = browser->window()->GetNativeWindow();
   BrowserWindowController* controller =
-      [BrowserWindowController browserWindowControllerForWindow:ns_window];
+      BrowserWindowControllerForWindow(ns_window);
   if (controller) {
     return l10n_util::GetNSString([controller isInAppKitFullscreen]
                                       ? IDS_EXIT_FULLSCREEN_MAC
diff --git a/chrome/browser/ui/cocoa/browser_window_views_mac.h b/chrome/browser/ui/cocoa/browser_window_views_mac.h
new file mode 100644
index 0000000..24c0170d
--- /dev/null
+++ b/chrome/browser/ui/cocoa/browser_window_views_mac.h
@@ -0,0 +1,27 @@
+// 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 CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_VIEWS_MAC_H_
+#define CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_VIEWS_MAC_H_
+
+// This file contains functions to support browser window code on Mac which may
+// need to deal with either a views browser window or a Cocoa browser window.
+
+// TODO(tapted): BrowserWindowController and TabWindowController shouldn't be
+// visible here (or in any files that import this header). Declare a protocol
+// instead that describes the dependencies needed outside of Cocoa-specific
+// code.
+@class BrowserWindowController;
+@class NSWindow;
+@class TabWindowController;
+
+// Returns the BrowserWindowController backing a Cocoa browser window. Always
+// returns nil if |window| is a views browser window.
+BrowserWindowController* BrowserWindowControllerForWindow(NSWindow* window);
+
+// Returns the TabWindowController backing a Cocoa browser window. Always
+// returns nil if |window| is a views browser window.
+TabWindowController* TabWindowControllerForWindow(NSWindow* window);
+
+#endif  // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_VIEWS_MAC_H_
diff --git a/chrome/browser/ui/cocoa/browser_window_views_mac.mm b/chrome/browser/ui/cocoa/browser_window_views_mac.mm
new file mode 100644
index 0000000..a95fb6d1
--- /dev/null
+++ b/chrome/browser/ui/cocoa/browser_window_views_mac.mm
@@ -0,0 +1,16 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#import "chrome/browser/ui/cocoa/browser_window_views_mac.h"
+
+// Currently this file is only linked in when all browser windows are views, so
+// the implementations just return null.
+
+BrowserWindowController* BrowserWindowControllerForWindow(NSWindow* window) {
+  return nullptr;
+}
+
+TabWindowController* TabWindowControllerForWindow(NSWindow* window) {
+  return nullptr;
+}
diff --git a/chrome/browser/ui/cocoa/chrome_command_dispatcher_delegate.mm b/chrome/browser/ui/cocoa/chrome_command_dispatcher_delegate.mm
index f6e7eb96..2925a67 100644
--- a/chrome/browser/ui/cocoa/chrome_command_dispatcher_delegate.mm
+++ b/chrome/browser/ui/cocoa/chrome_command_dispatcher_delegate.mm
@@ -9,6 +9,7 @@
 #include "chrome/browser/ui/browser_commands.h"
 #include "chrome/browser/ui/browser_finder.h"
 #import "chrome/browser/ui/cocoa/browser_window_controller_private.h"
+#import "chrome/browser/ui/cocoa/browser_window_views_mac.h"
 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h"
 
 namespace {
@@ -89,8 +90,8 @@
   // let the extension system try to handle the event. In case this is a
   // redispatched event, [event window] gives the correct window.
   if ([event window]) {
-    BrowserWindowController* controller = [BrowserWindowController
-        browserWindowControllerForWindow:[event window]];
+    BrowserWindowController* controller =
+        BrowserWindowControllerForWindow([event window]);
     // |controller| is only set in Cocoa. In toolkit-views extension commands
     // are handled by BrowserView.
     if ([controller respondsToSelector:@selector(handledByExtensionCommand:
diff --git a/chrome/browser/ui/cocoa/first_run_dialog.mm b/chrome/browser/ui/cocoa/first_run_dialog.mm
index b27dc8c..0b01a37 100644
--- a/chrome/browser/ui/cocoa/first_run_dialog.mm
+++ b/chrome/browser/ui/cocoa/first_run_dialog.mm
@@ -13,6 +13,7 @@
 #include "base/run_loop.h"
 #include "base/strings/sys_string_conversions.h"
 #include "base/threading/thread_task_runner_handle.h"
+#include "chrome/browser/browser_process.h"
 #include "chrome/browser/first_run/first_run.h"
 #include "chrome/browser/first_run/first_run_dialog.h"
 #include "chrome/browser/metrics/metrics_reporting_state.h"
@@ -71,7 +72,9 @@
   // If the dialog asked the user to opt-in for stats and crash reporting,
   // record the decision and enable the crash reporter if appropriate.
   bool consent_given = [dialog.get() isStatsReportingEnabled];
-  ChangeMetricsReportingState(consent_given);
+  ChangeMetricsReportingState(g_browser_process->local_state(),
+                              g_browser_process->GetMetricsServicesManager(),
+                              consent_given);
 
   // If selected, set as default browser. Skip in automated tests so that an OS
   // dialog confirming the default browser choice isn't left on screen.
diff --git a/chrome/browser/ui/cocoa/infobars/infobar_controller.mm b/chrome/browser/ui/cocoa/infobars/infobar_controller.mm
index b495a2c..917841c 100644
--- a/chrome/browser/ui/cocoa/infobars/infobar_controller.mm
+++ b/chrome/browser/ui/cocoa/infobars/infobar_controller.mm
@@ -83,7 +83,7 @@
     [nextSubview setFrame:frame];
   }
 
-  [infoBarView_ setInfobarType:[self delegate]->GetInfoBarType()];
+  [infoBarView_ setInfobarBackgroundColor:infobars::InfoBar::kBackgroundColor];
   [infoBarView_ setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
   cocoa_l10n_util::FlipAllSubviewsIfNecessary(
       base::mac::ObjCCast<NSView>(infoBarView_));
diff --git a/chrome/browser/ui/cocoa/infobars/infobar_gradient_view.h b/chrome/browser/ui/cocoa/infobars/infobar_gradient_view.h
index 4621f4f..6da46b4 100644
--- a/chrome/browser/ui/cocoa/infobars/infobar_gradient_view.h
+++ b/chrome/browser/ui/cocoa/infobars/infobar_gradient_view.h
@@ -6,7 +6,7 @@
 #define CHROME_BROWSER_UI_COCOA_INFOBARS_INFOBAR_GRADIENT_VIEW_H_
 
 #import "chrome/browser/ui/cocoa/vertical_gradient_view.h"
-#include "components/infobars/core/infobar_delegate.h"
+#include "third_party/skia/include/core/SkColor.h"
 
 #import <Cocoa/Cocoa.h>
 
@@ -24,8 +24,8 @@
 @property(assign, nonatomic) CGFloat arrowX;
 @property(assign, nonatomic) BOOL hasTip;
 
-// Sets the infobar type. This will change the view's gradient.
-- (void)setInfobarType:(infobars::InfoBarDelegate::Type)infobarType;
+// Sets the infobar background color.
+- (void)setInfobarBackgroundColor:(SkColor)color;
 
 @end
 
diff --git a/chrome/browser/ui/cocoa/infobars/infobar_gradient_view.mm b/chrome/browser/ui/cocoa/infobars/infobar_gradient_view.mm
index 43a95853..a1e99a8 100644
--- a/chrome/browser/ui/cocoa/infobars/infobar_gradient_view.mm
+++ b/chrome/browser/ui/cocoa/infobars/infobar_gradient_view.mm
@@ -7,11 +7,9 @@
 #include "base/mac/scoped_nsobject.h"
 #import "chrome/browser/themes/theme_properties.h"
 #import "chrome/browser/ui/cocoa/browser_window_controller.h"
-#import "chrome/browser/ui/cocoa/infobars/infobar_container_controller.h"
 #import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h"
 #import "chrome/browser/ui/cocoa/themed_window.h"
 #include "chrome/browser/ui/infobar_container_delegate.h"
-#include "components/infobars/core/infobar.h"
 #include "skia/ext/skia_utils_mac.h"
 #import "ui/base/cocoa/nsview_additions.h"
 #include "ui/base/material_design/material_design_controller.h"
@@ -38,13 +36,11 @@
   return self;
 }
 
-- (void)setInfobarType:(infobars::InfoBarDelegate::Type)infobarType {
+- (void)setInfobarBackgroundColor:(SkColor)color {
   // TODO(ellyjones): no need to use a gradient here.
-  SkColor topColor = infobars::InfoBar::GetBackgroundColor(infobarType);
-  SkColor bottomColor = topColor;
   base::scoped_nsobject<NSGradient> gradient([[NSGradient alloc]
-      initWithStartingColor:skia::SkColorToCalibratedNSColor(topColor)
-                endingColor:skia::SkColorToCalibratedNSColor(bottomColor)]);
+      initWithStartingColor:skia::SkColorToCalibratedNSColor(color)
+                endingColor:skia::SkColorToCalibratedNSColor(color)]);
   [self setGradient:gradient];
 }
 
diff --git a/chrome/browser/ui/cocoa/share_menu_controller.mm b/chrome/browser/ui/cocoa/share_menu_controller.mm
index dc36394..17abf62 100644
--- a/chrome/browser/ui/cocoa/share_menu_controller.mm
+++ b/chrome/browser/ui/cocoa/share_menu_controller.mm
@@ -15,6 +15,7 @@
 #include "chrome/browser/ui/browser_window.h"
 #import "chrome/browser/ui/cocoa/accelerators_cocoa.h"
 #import "chrome/browser/ui/cocoa/browser_window_controller.h"
+#import "chrome/browser/ui/cocoa/browser_window_views_mac.h"
 #import "chrome/browser/ui/cocoa/fast_resize_view.h"
 #import "chrome/browser/ui/cocoa/last_active_browser_cocoa.h"
 #include "chrome/grit/generated_resources.h"
@@ -156,7 +157,7 @@
   windowForShare_ = browser->window()->GetNativeWindow();
 
   TabWindowController* tabWindowController =
-      [TabWindowController tabWindowControllerForWindow:windowForShare_];
+      TabWindowControllerForWindow(windowForShare_);
   NSView* contentsView = [tabWindowController tabContentArea];
   NSRect rectInWindow =
       [[contentsView superview] convertRect:[contentsView frame] toView:nil];
diff --git a/chrome/browser/ui/cocoa/spinner_view.h b/chrome/browser/ui/cocoa/spinner_view.h
index e2c6249..93e8516 100644
--- a/chrome/browser/ui/cocoa/spinner_view.h
+++ b/chrome/browser/ui/cocoa/spinner_view.h
@@ -8,16 +8,58 @@
 #import <Cocoa/Cocoa.h>
 
 #import "base/mac/scoped_nsobject.h"
+#include "base/mac/sdk_forward_declarations.h"
+#include "third_party/skia/include/core/SkColor.h"
 
 // A view that displays a Material Design Circular Activity Indicator (aka a
 // "spinner") for Mac Chrome. To use, create a SpinnerView of the desired size
 // and add to a view hierarchy. SpinnerView uses Core Animation to achieve GPU-
 // accelerated animation and smooth scaling to any size.
 @interface SpinnerView : NSView
+@property(retain, nonatomic) CAAnimation* spinnerAnimation;
+@property(retain, nonatomic) CAAnimation* rotationAnimation;
+
+// Returns the time in seconds for one full arc rotation.
++ (CGFloat)arcRotationTime;
+
+// Returns the spinner arc's radius when unscaled.
++ (CGFloat)arcUnitRadius;
+
+// Returns the spinner arc's starting angle.
+- (CGFloat)arcStartAngle;
+
+// Returns the spinner arc's end angle delta (i.e. the spinner adds the
+// absolute value of this delta to arcStartAngle to compute the end angle).
+// Return a negative delta to rotate the spinner counter clockwise.
+- (CGFloat)arcEndAngleDelta;
+
+// Returns the arc's length (the distance from arcStart to arcEnd along the
+// circumference of a circle with radius arcRadius).
+- (CGFloat)arcLength;
+
+// Returns the scale factor for sizing the vector strokes to fit the
+// SpinnerView's bounds.
+- (CGFloat)scaleFactor;
+
+// Returns the SpinnerView's custom CALayer (called from setWantsLayer:).
+- (CALayer*)makeBackingLayer;
+
+// Override point for subclasses to perform animation initialization.
+- (void)initializeAnimation;
 
 // Return YES if the spinner is animating.
 - (BOOL)isAnimating;
 
+// Returns the default theme's throbber color. Subclasses can override to
+// return a custom spinner color.
+- (NSColor*)spinnerColor;
+
+// Updates the spinner to the color returned from -spinnerColor.
+- (void)updateSpinnerColor;
+
+// Restarts the spinner's animation.
+- (void)restartAnimation;
+
 @end
 
 #endif  // CHROME_BROWSER_UI_COCOA_SPINNER_VIEW_H_
diff --git a/chrome/browser/ui/cocoa/spinner_view.mm b/chrome/browser/ui/cocoa/spinner_view.mm
index 07bf5ec..f1c89167 100644
--- a/chrome/browser/ui/cocoa/spinner_view.mm
+++ b/chrome/browser/ui/cocoa/spinner_view.mm
@@ -15,33 +15,40 @@
 #include "ui/native_theme/native_theme.h"
 
 namespace {
-const CGFloat kDegrees90 = gfx::DegToRad(90.0f);
-const CGFloat kDegrees180 = gfx::DegToRad(180.0f);
-const CGFloat kDegrees270 = gfx::DegToRad(270.0f);
-const CGFloat kDegrees360 = gfx::DegToRad(360.0f);
-const CGFloat kDesignWidth             = 28.0;
-const CGFloat kArcRadius               = 12.5;
-const CGFloat kArcDiameter             = kArcRadius * 2.0;
-const CGFloat kArcLength               = 58.9;
-const CGFloat kArcStrokeWidth          = 3.0;
-const CGFloat kArcAnimationTime        = 1.333;
-const CGFloat kArcStartAngle           = kDegrees180;
-const CGFloat kArcEndAngle             = (kArcStartAngle + kDegrees270);
-const CGFloat kRotationTime            = 1.56863;
+constexpr CGFloat kDegrees90 = gfx::DegToRad(90.0f);
+constexpr CGFloat kDegrees135 = gfx::DegToRad(135.0f);
+constexpr CGFloat kDegrees180 = gfx::DegToRad(180.0f);
+constexpr CGFloat kDegrees270 = gfx::DegToRad(270.0f);
+constexpr CGFloat kDegrees360 = gfx::DegToRad(360.0f);
+constexpr CGFloat kSpinnerViewUnitWidth = 28.0;
+constexpr CGFloat kSpinnerUnitInset = 2.0;
+constexpr CGFloat kArcDiameter =
+    (kSpinnerViewUnitWidth - kSpinnerUnitInset * 2.0);
+constexpr CGFloat kArcRadius = kArcDiameter / 2.0;
+constexpr CGFloat kArcLength =
+    kDegrees135 * kArcDiameter;  // 135 degrees of circumference.
+constexpr CGFloat kArcStrokeWidth = 3.0;
+constexpr CGFloat kArcAnimationTime = 1.333;
+constexpr CGFloat kRotationTime = 1.56863;
 NSString* const kSpinnerAnimationName  = @"SpinnerAnimationName";
 NSString* const kRotationAnimationName = @"RotationAnimationName";
 }
 
-@interface SpinnerView () <CALayerDelegate> {
-  base::scoped_nsobject<CAAnimationGroup> spinnerAnimation_;
-  base::scoped_nsobject<CABasicAnimation> rotationAnimation_;
+@implementation SpinnerView {
   CAShapeLayer* shapeLayer_;  // Weak.
-  CALayer* rotationLayer_;  // Weak.
+  CALayer* rotationLayer_;    // Weak.
 }
-@end
 
+@synthesize spinnerAnimation = spinnerAnimation_;
+@synthesize rotationAnimation = rotationAnimation_;
 
-@implementation SpinnerView
++ (CGFloat)arcRotationTime {
+  return kRotationTime;
+}
+
++ (CGFloat)arcUnitRadius {
+  return kArcRadius;
+}
 
 - (instancetype)initWithFrame:(NSRect)frame {
   if (self = [super initWithFrame:frame]) {
@@ -52,9 +59,15 @@
 
 - (void)dealloc {
   [[NSNotificationCenter defaultCenter] removeObserver:self];
+  self.spinnerAnimation = nil;
+  self.rotationAnimation = nil;
   [super dealloc];
 }
 
+- (CGFloat)scaleFactor {
+  return [self bounds].size.width / kSpinnerViewUnitWidth;
+}
+
 // Register/unregister for window miniaturization event notifications so that
 // the spinner can stop animating if the window is minaturized
 // (i.e. not visible).
@@ -91,22 +104,64 @@
 }
 
 - (BOOL)isAnimating {
-  return [shapeLayer_ animationForKey:kSpinnerAnimationName] != nil;
+  return [shapeLayer_ animationForKey:kSpinnerAnimationName] != nil ||
+         [rotationLayer_ animationForKey:kRotationAnimationName] != nil;
 }
 
-// Overridden to return a custom CALayer for the view (called from
-// setWantsLayer:).
-- (CALayer*)makeBackingLayer {
-  CGRect bounds = [self bounds];
-  // The spinner was designed to be |kDesignWidth| points wide. Compute the
-  // scale factor needed to scale design parameters like |RADIUS| so that the
-  // spinner scales to fit the view's bounds.
-  CGFloat scaleFactor = bounds.size.width / kDesignWidth;
+- (NSColor*)spinnerColor {
+  SkColor skSpinnerColor =
+      ui::NativeTheme::GetInstanceForNativeUi()->GetSystemColor(
+          ui::NativeTheme::kColorId_ThrobberSpinningColor);
+  return skia::SkColorToSRGBNSColor(skSpinnerColor);
+}
 
+- (CGFloat)arcStartAngle {
+  return kDegrees180;
+}
+
+- (CGFloat)arcEndAngleDelta {
+  return -kDegrees270;
+}
+
+- (CGFloat)arcLength {
+  return kArcLength;
+}
+
+- (void)updateSpinnerColor {
+  [shapeLayer_ setStrokeColor:[[self spinnerColor] CGColor]];
+}
+
+- (void)updateSpinnerPath {
+  CGRect bounds = [self bounds];
+  CGFloat scaleFactor = [self scaleFactor];
+
+  // Create the arc that, when stroked, creates the spinner.
+  base::ScopedCFTypeRef<CGMutablePathRef> shapePath(CGPathCreateMutable());
+  CGFloat startAngle = [self arcStartAngle];
+  CGFloat endAngleDelta = [self arcEndAngleDelta];
+  bool counterClockwise = endAngleDelta < 0;
+  endAngleDelta = ABS(endAngleDelta);
+
+  CGPathAddArc(shapePath, NULL, bounds.size.width / 2.0,
+               bounds.size.height / 2.0, kArcRadius * scaleFactor, startAngle,
+               startAngle + endAngleDelta, !counterClockwise);
+  [shapeLayer_ setPath:shapePath];
+
+  // Set the line dash pattern. Animating the pattern causes the arc to
+  // grow from start angle to end angle.
+  [shapeLayer_ setLineDashPattern:@[ @([self arcLength] * scaleFactor) ]];
+
+  [self updateSpinnerColor];
+}
+
+- (CALayer*)makeBackingLayer {
   shapeLayer_ = [CAShapeLayer layer];
-  [shapeLayer_ setDelegate:self];
+
+  CGRect bounds = [self bounds];
   [shapeLayer_ setBounds:bounds];
+
   // Per the design, the line width does not scale linearly.
+  CGFloat scaleFactor = [self scaleFactor];
   CGFloat scaledDiameter = kArcDiameter * scaleFactor;
   CGFloat lineWidth;
   if (scaledDiameter < kArcDiameter) {
@@ -116,21 +171,9 @@
   }
   [shapeLayer_ setLineWidth:lineWidth];
   [shapeLayer_ setLineCap:kCALineCapRound];
-  [shapeLayer_ setLineDashPattern:@[ @(kArcLength * scaleFactor) ]];
   [shapeLayer_ setFillColor:NULL];
-  SkColor throbberBlueColor =
-      ui::NativeTheme::GetInstanceForNativeUi()->GetSystemColor(
-          ui::NativeTheme::kColorId_ThrobberSpinningColor);
-  CGColorRef blueColor = skia::CGColorCreateFromSkColor(throbberBlueColor);
-  [shapeLayer_ setStrokeColor:blueColor];
-  CGColorRelease(blueColor);
 
-  // Create the arc that, when stroked, creates the spinner.
-  base::ScopedCFTypeRef<CGMutablePathRef> shapePath(CGPathCreateMutable());
-  CGPathAddArc(shapePath, NULL, bounds.size.width / 2.0,
-               bounds.size.height / 2.0, kArcRadius * scaleFactor,
-               kArcStartAngle, kArcEndAngle, 0);
-  [shapeLayer_ setPath:shapePath];
+  [self updateSpinnerPath];
 
   // Place |shapeLayer_| in a layer so that it's easy to rotate the entire
   // spinner animation.
@@ -149,19 +192,15 @@
   return parentLayer;
 }
 
-// Overridden to start or stop the animation whenever the view is unhidden or
-// hidden.
+// Starts or stops the animation whenever the view's visibility changes.
 - (void)setHidden:(BOOL)flag {
-  [super setHidden:flag];
-  [self updateAnimation:nil];
-}
+  BOOL wasHidden = [self isHidden];
 
-// Make sure the layer's backing store matches the window as the window moves
-// between screens.
-- (BOOL)layer:(CALayer*)layer
-    shouldInheritContentsScale:(CGFloat)newScale
-                    fromWindow:(NSWindow*)window {
-  return YES;
+  [super setHidden:flag];
+
+  if (wasHidden != flag) {
+    [self updateAnimation:nil];
+  }
 }
 
 // The spinner animation consists of four cycles that it continuously repeats.
@@ -172,9 +211,6 @@
 // the arc using a (solid) dashed line pattern and animating the "lineDashPhase"
 // property.
 - (void)initializeAnimation {
-  CGRect bounds = [self bounds];
-  CGFloat scaleFactor = bounds.size.width / kDesignWidth;
-
   // Make sure |shapeLayer_|'s content scale factor matches the window's
   // backing depth (e.g. it's 2.0 on Retina Macs). Don't worry about adjusting
   // any other layers because |shapeLayer_| is the only one displaying content.
@@ -191,6 +227,7 @@
   [firstHalfAnimation setKeyPath:@"lineDashPhase"];
   // Begin the lineDashPhase animation just short of the full arc length,
   // otherwise the arc will be zero length at start.
+  CGFloat scaleFactor = [self scaleFactor];
   NSArray* animationValues = @[ @(-(kArcLength - 0.4) * scaleFactor), @(0.0) ];
   [firstHalfAnimation setValues:animationValues];
   NSArray* keyTimes = @[ @(0.0), @(1.0) ];
@@ -264,7 +301,7 @@
   [group setRemovedOnCompletion:NO];
   [group setAnimations:animations];
 
-  spinnerAnimation_.reset([group retain]);
+  self.spinnerAnimation = group;
 
   // Finally, create an animation that rotates the entire spinner layer.
   CABasicAnimation* rotationAnimation = [CABasicAnimation animation];
@@ -276,7 +313,7 @@
   [rotationAnimation setFillMode:kCAFillModeForwards];
   [rotationAnimation setRepeatCount:HUGE_VALF];
 
-  rotationAnimation_.reset([rotationAnimation retain]);
+  self.rotationAnimation = rotationAnimation;
 }
 
 - (void)updateAnimation:(NSNotification*)notification {
@@ -285,13 +322,13 @@
   if ([self window] && ![[self window] isMiniaturized] && ![self isHidden] &&
       ![[notification name] isEqualToString:
            NSWindowWillMiniaturizeNotification]) {
-    if (spinnerAnimation_.get() == nil) {
+    [self updateSpinnerPath];
+    if (!spinnerAnimation_) {
       [self initializeAnimation];
     }
     if (![self isAnimating]) {
-      [shapeLayer_ addAnimation:spinnerAnimation_.get()
-                         forKey:kSpinnerAnimationName];
-      [rotationLayer_ addAnimation:rotationAnimation_.get()
+      [shapeLayer_ addAnimation:spinnerAnimation_ forKey:kSpinnerAnimationName];
+      [rotationLayer_ addAnimation:rotationAnimation_
                             forKey:kRotationAnimationName];
     }
   } else {
@@ -300,4 +337,13 @@
   }
 }
 
+- (void)restartAnimation {
+  self.spinnerAnimation = nil;
+  self.rotationAnimation = nil;
+  [shapeLayer_ removeAllAnimations];
+  [rotationLayer_ removeAllAnimations];
+
+  [self updateAnimation:nil];
+}
+
 @end
diff --git a/chrome/browser/ui/cocoa/sprite_view.h b/chrome/browser/ui/cocoa/sprite_view.h
deleted file mode 100644
index 005cb6a5..0000000
--- a/chrome/browser/ui/cocoa/sprite_view.h
+++ /dev/null
@@ -1,35 +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 CHROME_BROWSER_UI_COCOA_SPRITE_VIEW_H_
-#define CHROME_BROWSER_UI_COCOA_SPRITE_VIEW_H_
-
-#import <Cocoa/Cocoa.h>
-
-#include "base/mac/scoped_nsobject.h"
-
-@class CAKeyframeAnimation;
-
-// A class that knows how to repeatedly animate sprites from an image containing
-// the sprites in the form of a horizontal strip.
-@interface SpriteView : NSView {
- @private
-  base::scoped_nsobject<CAKeyframeAnimation> spriteAnimation_;
-  CALayer* imageLayer_;
-}
-
-// |image| contains square sprites in a horizontal strip.
-// The sprites will be animated, with each sprite shown for 30ms.
-// It is OK to pass in a single sprite (a square image), in which case there
-// will be no animation.
-- (void)setImage:(NSImage*)image;
-
-// Same as above, with a toast animation to transition to the new image.
-// The old image will animate to the bottom, and then the new image will
-// animate back up to position.
-- (void)setImage:(NSImage*)image withToastAnimation:(BOOL)animate;
-
-@end
-
-#endif  // CHROME_BROWSER_UI_COCOA_SPRITE_VIEW_H_
diff --git a/chrome/browser/ui/cocoa/sprite_view.mm b/chrome/browser/ui/cocoa/sprite_view.mm
deleted file mode 100644
index 32d01a79..0000000
--- a/chrome/browser/ui/cocoa/sprite_view.mm
+++ /dev/null
@@ -1,176 +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.
-
-#import "chrome/browser/ui/cocoa/sprite_view.h"
-
-#import <QuartzCore/CAAnimation.h>
-#import <QuartzCore/CATransaction.h>
-
-#include "base/logging.h"
-#import "base/mac/sdk_forward_declarations.h"
-#include "ui/base/cocoa/animation_utils.h"
-
-static const CGFloat kFrameDuration = 0.03;  // 30ms for each animation frame.
-
-@interface SpriteView (Private) <CALayerDelegate>
-@end
-
-@implementation SpriteView
-
-- (instancetype)initWithFrame:(NSRect)frame {
-  if (self = [super initWithFrame:frame]) {
-    // A layer-hosting view. It will clip its sublayers,
-    // if they exceed the boundary.
-    CALayer* layer = [CALayer layer];
-    layer.masksToBounds = YES;
-
-    imageLayer_ = [CALayer layer];
-    imageLayer_.autoresizingMask = kCALayerWidthSizable | kCALayerHeightSizable;
-
-    [layer addSublayer:imageLayer_];
-    imageLayer_.frame = layer.bounds;
-    [layer setDelegate:self];
-    [self setLayer:layer];
-    [self setWantsLayer:YES];
-  }
-  return self;
-}
-
-- (void)dealloc {
-  [[NSNotificationCenter defaultCenter] removeObserver:self];
-  [super dealloc];
-}
-
-- (void)viewWillMoveToWindow:(NSWindow*)newWindow {
-  if ([self window]) {
-    [[NSNotificationCenter defaultCenter]
-        removeObserver:self
-                  name:NSWindowWillMiniaturizeNotification
-                object:[self window]];
-    [[NSNotificationCenter defaultCenter]
-        removeObserver:self
-                  name:NSWindowDidDeminiaturizeNotification
-                object:[self window]];
-  }
-
-  if (newWindow) {
-    [[NSNotificationCenter defaultCenter]
-        addObserver:self
-           selector:@selector(updateAnimation:)
-               name:NSWindowWillMiniaturizeNotification
-             object:newWindow];
-    [[NSNotificationCenter defaultCenter]
-        addObserver:self
-           selector:@selector(updateAnimation:)
-               name:NSWindowDidDeminiaturizeNotification
-             object:newWindow];
-  }
-}
-
-- (void)viewDidMoveToWindow {
-  [self updateAnimation:nil];
-}
-
-- (void)updateAnimation:(NSNotification*)notification {
-  if (spriteAnimation_.get()) {
-    // Only animate the sprites if we are attached to a window, and that window
-    // is not currently minimized or in the middle of a minimize animation.
-    // http://crbug.com/350329
-    if ([self window] && ![[self window] isMiniaturized] &&
-        ![[notification name] isEqualToString:
-             NSWindowWillMiniaturizeNotification]) {
-      if ([imageLayer_ animationForKey:[spriteAnimation_ keyPath]] == nil) {
-        [imageLayer_ addAnimation:spriteAnimation_.get()
-                     forKey:[spriteAnimation_ keyPath]];
-      }
-    } else {
-      [imageLayer_ removeAnimationForKey:[spriteAnimation_ keyPath]];
-    }
-  }
-}
-
-- (void)setImage:(NSImage*)image {
-  ScopedCAActionDisabler disabler;
-
-  if (spriteAnimation_.get()) {
-    [imageLayer_ removeAnimationForKey:[spriteAnimation_ keyPath]];
-    spriteAnimation_.reset();
-  }
-
-  [imageLayer_ setContents:image];
-
-  if (image != nil) {
-    NSSize imageSize = [image size];
-    NSSize spriteSize = NSMakeSize(imageSize.height, imageSize.height);
-    [self setFrameSize:spriteSize];
-
-    const NSUInteger spriteCount = imageSize.width / spriteSize.width;
-    const CGFloat unitWidth = 1.0 / spriteCount;
-
-    // Show the first (leftmost) sprite.
-    [imageLayer_ setContentsRect:CGRectMake(0, 0, unitWidth, 1.0)];
-
-    if (spriteCount > 1) {
-      // Animate the sprite offsets, we use a keyframe animation with discrete
-      // calculation mode to prevent interpolation.
-      NSMutableArray* xOffsets = [NSMutableArray arrayWithCapacity:spriteCount];
-      for (NSUInteger i = 0; i < spriteCount; ++i) {
-        [xOffsets addObject:@(i * unitWidth)];
-      }
-      CAKeyframeAnimation* animation =
-          [CAKeyframeAnimation animationWithKeyPath:@"contentsRect.origin.x"];
-      [animation setValues:xOffsets];
-      [animation setCalculationMode:kCAAnimationDiscrete];
-      [animation setRepeatCount:HUGE_VALF];
-      [animation setDuration:kFrameDuration * [xOffsets count]];
-      spriteAnimation_.reset([animation retain]);
-
-      [self updateAnimation:nil];
-    }
-  }
-}
-
-- (void)setImage:(NSImage*)image withToastAnimation:(BOOL)animate {
-  if (!animate || [imageLayer_ contents] == nil) {
-    [self setImage:image];
-  } else {
-    // Animate away the icon.
-    CABasicAnimation* animation =
-        [CABasicAnimation animationWithKeyPath:@"position.y"];
-    CGFloat height = CGRectGetHeight([imageLayer_ bounds]);
-    [animation setToValue:@(-height)];
-    [animation setDuration:kFrameDuration * height];
-
-    // Don't remove on completion to prevent the presentation layer from
-    // snapping back to the model layer's value.
-    // It will instead be removed when we add the return animation because they
-    // have the same key.
-    [animation setRemovedOnCompletion:NO];
-    [animation setFillMode:kCAFillModeForwards];
-
-    [CATransaction begin];
-    [CATransaction setCompletionBlock:^{
-        // At the end of the animation, change to the new image and animate
-        // it back to position.
-        [self setImage:image];
-
-        CABasicAnimation* reverseAnimation =
-            [CABasicAnimation animationWithKeyPath:[animation keyPath]];
-        [reverseAnimation setFromValue:[animation toValue]];
-        [reverseAnimation setToValue:[animation fromValue]];
-        [reverseAnimation setDuration:[animation duration]];
-        [imageLayer_ addAnimation:reverseAnimation forKey:@"position"];
-    }];
-    [imageLayer_ addAnimation:animation forKey:@"position"];
-    [CATransaction commit];
-  }
-}
-
-- (BOOL)layer:(CALayer*)layer
-    shouldInheritContentsScale:(CGFloat)scale
-                    fromWindow:(NSWindow*)window {
-  return YES;
-}
-
-@end
diff --git a/chrome/browser/ui/cocoa/sprite_view_unittest.mm b/chrome/browser/ui/cocoa/sprite_view_unittest.mm
deleted file mode 100644
index 64af444..0000000
--- a/chrome/browser/ui/cocoa/sprite_view_unittest.mm
+++ /dev/null
@@ -1,82 +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.
-
-#import <Cocoa/Cocoa.h>
-
-#include "base/mac/mac_util.h"
-#include "base/mac/scoped_nsobject.h"
-#import "chrome/browser/ui/cocoa/sprite_view.h"
-#import "chrome/browser/ui/cocoa/test/cocoa_test_helper.h"
-#include "testing/gtest/include/gtest/gtest.h"
-#include "testing/platform_test.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/gfx/image/image.h"
-#include "ui/resources/grit/ui_resources.h"
-
-@interface SpriteView (ExposedForTesting)
-
-- (BOOL)isAnimating;
-
-@end
-
-@implementation SpriteView (ExposedForTesting)
-
-- (BOOL)isAnimating {
-  return [imageLayer_ animationForKey:[spriteAnimation_ keyPath]] != nil;
-}
-
-@end
-
-namespace {
-
-class SpriteViewTest : public CocoaTest {
- public:
-  SpriteViewTest() {
-    image_.reset(ui::ResourceBundle::GetSharedInstance()
-                     .GetNativeImageNamed(IDR_THROBBER)
-                     .CopyNSImage());
-    view_.reset([[SpriteView alloc] init]);
-    [view_ setImage:image_];
-    [[test_window() contentView] addSubview:view_];
-  }
-
-  base::scoped_nsobject<NSImage> image_;
-  base::scoped_nsobject<SpriteView> view_;
-};
-
-TEST_VIEW(SpriteViewTest, view_)
-
-TEST_F(SpriteViewTest, TestViewFrame) {
-  NSSize imageSize = [image_ size];
-  NSRect frame = [view_ frame];
-  EXPECT_EQ(0.0, frame.origin.x);
-  EXPECT_EQ(0.0, frame.origin.y);
-  EXPECT_EQ(imageSize.height, NSWidth(frame));
-  EXPECT_EQ(imageSize.height, NSHeight(frame));
-}
-
-TEST_F(SpriteViewTest, StopAnimationOnMiniaturize) {
-  if (base::mac::IsOS10_10())
-    return;  // Fails when swarmed. http://crbug.com/660582
-  EXPECT_TRUE([view_ isAnimating]);
-
-  [test_window() miniaturize:nil];
-  EXPECT_FALSE([view_ isAnimating]);
-
-  [test_window() deminiaturize:nil];
-  EXPECT_TRUE([view_ isAnimating]);
-}
-
-TEST_F(SpriteViewTest,
-       StopAnimationOnRemoveFromSuperview) {
-  EXPECT_TRUE([view_ isAnimating]);
-
-  [view_ removeFromSuperview];
-  EXPECT_FALSE([view_ isAnimating]);
-
-  [[test_window() contentView] addSubview:view_];
-  EXPECT_TRUE([view_ isAnimating]);
-}
-
-}  // namespace
diff --git a/chrome/browser/ui/cocoa/tabs/tab_controller.h b/chrome/browser/ui/cocoa/tabs/tab_controller.h
index 8674cca..5a584d9 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_controller.h
+++ b/chrome/browser/ui/cocoa/tabs/tab_controller.h
@@ -25,7 +25,6 @@
 
 @class AlertIndicatorButton;
 @class MenuControllerCocoa;
-@class SpriteView;
 @class TabView;
 @protocol TabControllerTarget;
 
diff --git a/chrome/browser/ui/cocoa/tabs/tab_controller.mm b/chrome/browser/ui/cocoa/tabs/tab_controller.mm
index d83f7e4..4c5aa42e 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_controller.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_controller.mm
@@ -16,21 +16,18 @@
 #import "chrome/browser/themes/theme_properties.h"
 #import "chrome/browser/themes/theme_service.h"
 #include "chrome/browser/ui/cocoa/l10n_util.h"
-#import "chrome/browser/ui/cocoa/sprite_view.h"
 #import "chrome/browser/ui/cocoa/tabs/alert_indicator_button_cocoa.h"
 #import "chrome/browser/ui/cocoa/tabs/tab_controller_target.h"
+#include "chrome/browser/ui/cocoa/tabs/tab_favicon_view.h"
 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h"
 #import "chrome/browser/ui/cocoa/tabs/tab_view.h"
 #import "chrome/browser/ui/cocoa/themed_window.h"
-#include "chrome/grit/theme_resources.h"
-#include "components/grit/components_scaled_resources.h"
 #import "extensions/common/extension.h"
 #include "skia/ext/skia_utils_mac.h"
 #import "ui/base/cocoa/menu_controller.h"
-#include "ui/base/resource/resource_bundle.h"
+#include "ui/base/material_design/material_design_controller.h"
 #include "ui/gfx/favicon_size.h"
 #include "ui/native_theme/native_theme.h"
-#include "ui/resources/grit/ui_resources.h"
 
 namespace {
 
@@ -64,7 +61,7 @@
 }  // namespace
 
 @interface TabController () {
-  base::scoped_nsobject<SpriteView> iconView_;
+  base::scoped_nsobject<TabFaviconView> iconView_;
   base::scoped_nsobject<NSImage> icon_;
   base::scoped_nsobject<NSView> attentionDotView_;
   base::scoped_nsobject<AlertIndicatorButton> alertIndicatorButton_;
@@ -101,16 +98,19 @@
 @synthesize url = url_;
 
 namespace {
-static const CGFloat kTabLeadingPadding = 18;
-static const CGFloat kTabTrailingPadding = 15;
-static const CGFloat kCloseButtonSize = 16;
-static const CGFloat kInitialTabWidth = 160;
-static const CGFloat kTitleLeadingPadding = 4;
-static const CGFloat kInitialTitleWidth = 92;
-static const CGFloat kTitleHeight = 17;
-static const CGFloat kTabElementYOrigin = 6;
-static const CGFloat kDefaultTabHeight = 29;
-static const CGFloat kPinnedTabWidth = kDefaultTabHeight * 2;
+constexpr CGFloat kTabLeadingPadding = 18;
+constexpr CGFloat kTabTrailingPadding = 15;
+constexpr CGFloat kMinTabWidth = 36;
+constexpr CGFloat kMinActiveTabWidth = 52;
+constexpr CGFloat kMaxTabWidth = 246;
+constexpr CGFloat kCloseButtonSize = 16;
+constexpr CGFloat kInitialTabWidth = 160;
+constexpr CGFloat kTitleLeadingPadding = 4;
+constexpr CGFloat kInitialTitleWidth = 92;
+constexpr CGFloat kTitleHeight = 17;
+constexpr CGFloat kTabElementYOrigin = 6;
+constexpr CGFloat kDefaultTabHeight = 29;
+constexpr CGFloat kPinnedTabWidth = kDefaultTabHeight * 2;
 }  // namespace
 
 + (CGFloat)defaultTabHeight {
@@ -121,9 +121,15 @@
 // tab border image is not visibly clipped.  It is a bit smaller than the sum
 // of the two tab edge bitmaps because these bitmaps have a few transparent
 // pixels on the side.  The selected tab width includes the close button width.
-+ (CGFloat)minTabWidth { return 36; }
-+ (CGFloat)minActiveTabWidth { return 52; }
-+ (CGFloat)maxTabWidth { return 246; }
++ (CGFloat)minTabWidth {
+  return kMinTabWidth;
+}
++ (CGFloat)minActiveTabWidth {
+  return kMinActiveTabWidth;
+}
++ (CGFloat)maxTabWidth {
+  return kMaxTabWidth;
+}
 
 + (CGFloat)pinnedTabWidth {
   return kPinnedTabWidth;
@@ -166,7 +172,7 @@
     // Add the favicon view.
     NSRect iconViewFrame =
         NSMakeRect(0, kTabElementYOrigin, gfx::kFaviconSize, gfx::kFaviconSize);
-    iconView_.reset([[SpriteView alloc] initWithFrame:iconViewFrame]);
+    iconView_.reset([[TabFaviconView alloc] initWithFrame:iconViewFrame]);
     [iconView_ setAutoresizingMask:isRTL ? NSViewMinXMargin | NSViewMinYMargin
                                          : NSViewMaxXMargin | NSViewMinYMargin];
     [self updateIconViewFrameWithAnimation:NO];
@@ -457,50 +463,11 @@
   }
   loadingState_ = newLoadingState;
 
-  // The Material Design spinner handles sad tab icon display, etc. directly
-  // based on the loading state. Handle it here until the new spinner code
-  // lands.
-  if (newLoadingState == kTabCrashed) {
-    static NSImage* sadFaviconImage =
-        ui::ResourceBundle::GetSharedInstance()
-            .GetNativeImageNamed(IDR_CRASH_SAD_FAVICON)
-            .CopyNSImage();
-
-    image = sadFaviconImage;
-  } else if (newLoadingState == kTabWaiting) {
-    static NSImage* throbberWaitingImage =
-        ui::ResourceBundle::GetSharedInstance()
-            .GetNativeImageNamed(IDR_THROBBER_WAITING)
-            .CopyNSImage();
-    static NSImage* throbberWaitingIncognitoImage =
-        ui::ResourceBundle::GetSharedInstance()
-            .GetNativeImageNamed(IDR_THROBBER_WAITING_INCOGNITO)
-            .CopyNSImage();
-
-    if ([[iconView_ window] hasDarkTheme]) {
-      image = throbberWaitingIncognitoImage;
-    } else {
-      image = throbberWaitingImage;
-    }
-  } else if (newLoadingState == kTabLoading) {
-    static NSImage* throbberLoadingImage =
-        ui::ResourceBundle::GetSharedInstance()
-            .GetNativeImageNamed(IDR_THROBBER)
-            .CopyNSImage();
-    static NSImage* throbberLoadingIncognitoImage =
-        ui::ResourceBundle::GetSharedInstance()
-            .GetNativeImageNamed(IDR_THROBBER_INCOGNITO)
-            .CopyNSImage();
-
-    if ([[iconView_ window] hasDarkTheme]) {
-      image = throbberLoadingIncognitoImage;
-    } else {
-      image = throbberLoadingImage;
-    }
+  if (newLoadingState == kTabDone) {
+    [iconView_ setTabDoneStateWithIcon:image];
+  } else {
+    [iconView_ setTabLoadingState:newLoadingState];
   }
-
-  [iconView_ setImage:image
-      withToastAnimation:(newLoadingState == kTabCrashed)];
 }
 
 - (void)updateAttentionIndicator {
diff --git a/chrome/browser/ui/cocoa/tabs/tab_favicon_view.h b/chrome/browser/ui/cocoa/tabs/tab_favicon_view.h
new file mode 100644
index 0000000..48be53d
--- /dev/null
+++ b/chrome/browser/ui/cocoa/tabs/tab_favicon_view.h
@@ -0,0 +1,24 @@
+// 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 CHROME_BROWSER_UI_COCOA_TABS_TAB_FAVICON_VIEW_H_
+#define CHROME_BROWSER_UI_COCOA_TABS_TAB_FAVICON_VIEW_H_
+
+#import "chrome/browser/ui/cocoa/tabs/tab_spinner_view.h"
+
+#import "chrome/browser/ui/cocoa/tabs/tab_controller.h"
+#import "chrome/browser/ui/cocoa/themed_window.h"
+
+@interface TabFaviconView : NSView<ThemedWindowDrawing>
+
+// Accessor for the tab's loading state. Use setTabDoneIcon: to set the
+// icon and loading state to kTabDone.
+@property(assign, nonatomic) TabLoadingState tabLoadingState;
+
+// Sets the tab's icon and loading state to kTabDone.
+- (void)setTabDoneStateWithIcon:(NSImage*)anImage;
+
+@end
+
+#endif  // CHROME_BROWSER_UI_COCOA_TABS_TAB_FAVICON_VIEW_H_
diff --git a/chrome/browser/ui/cocoa/tabs/tab_favicon_view.mm b/chrome/browser/ui/cocoa/tabs/tab_favicon_view.mm
new file mode 100644
index 0000000..01781442
--- /dev/null
+++ b/chrome/browser/ui/cocoa/tabs/tab_favicon_view.mm
@@ -0,0 +1,140 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#import "chrome/browser/ui/cocoa/tabs/tab_favicon_view.h"
+
+#include "base/mac/scoped_cftyperef.h"
+#include "chrome/browser/themes/theme_properties.h"
+#include "chrome/grit/theme_resources.h"
+#include "components/grit/components_scaled_resources.h"
+#include "skia/ext/skia_utils_mac.h"
+#include "ui/base/resource/resource_bundle.h"
+#include "ui/base/theme_provider.h"
+#include "ui/gfx/geometry/angle_conversions.h"
+#include "ui/native_theme/native_theme.h"
+
+namespace {
+constexpr CGFloat kSadTabAnimationTime = 0.5;
+}  // namespace
+
+@implementation TabFaviconView {
+  TabSpinnerView* spinnerView_;  // Weak.
+  NSImageView* iconView_;        // Weak.
+}
+
+@synthesize tabLoadingState = tabLoadingState_;
+
+- (instancetype)initWithFrame:(NSRect)frame {
+  if (self = [super initWithFrame:frame]) {
+    NSRect subviewFrame = NSMakeRect(0, 0, frame.size.width, frame.size.height);
+    spinnerView_ =
+        [[[TabSpinnerView alloc] initWithFrame:subviewFrame] autorelease];
+    [self addSubview:spinnerView_];
+    iconView_ = [[[NSImageView alloc] initWithFrame:subviewFrame] autorelease];
+    [self addSubview:iconView_];
+  }
+
+  return self;
+}
+
+- (NSImage*)sadTabIcon {
+  NSImage* sadTabIcon = ui::ResourceBundle::GetSharedInstance()
+                            .GetNativeImageNamed(IDR_CRASH_SAD_FAVICON)
+                            .AsNSImage();
+  BOOL hasDarkTheme =
+      [[self window] respondsToSelector:@selector(hasDarkTheme)] &&
+      [[self window] hasDarkTheme];
+
+  if (hasDarkTheme) {
+    NSRect bounds = NSZeroRect;
+    bounds.size = [sadTabIcon size];
+
+    return [NSImage imageWithSize:bounds.size
+                          flipped:NO
+                   drawingHandler:^BOOL(NSRect destRect) {
+                     [[NSColor whiteColor] set];
+                     NSRectFill(destRect);
+                     [sadTabIcon drawInRect:destRect
+                                   fromRect:NSZeroRect
+                                  operation:NSCompositeDestinationIn
+                                   fraction:1.0];
+                     return YES;
+                   }];
+  }
+
+  return sadTabIcon;
+}
+
+- (void)setTabLoadingState:(TabLoadingState)newLoadingState
+                   forIcon:(NSImage*)anImage {
+  // Always update the tab done icon, otherwise exit if the state has not
+  // changed.
+  if (newLoadingState != kTabDone && tabLoadingState_ == newLoadingState) {
+    return;
+  }
+
+  tabLoadingState_ = newLoadingState;
+
+  BOOL showingAnIcon =
+      (tabLoadingState_ == kTabCrashed || tabLoadingState_ == kTabDone);
+
+  [spinnerView_ setHidden:showingAnIcon];
+  [iconView_ setHidden:!showingAnIcon];
+
+  if (tabLoadingState_ == kTabCrashed) {
+    CAMediaTimingFunction* linearTimingFunction =
+        [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear];
+    NSImage* sadTabIcon = [self sadTabIcon];
+
+    [NSAnimationContext beginGrouping];
+
+    [[NSAnimationContext currentContext] setDuration:kSadTabAnimationTime];
+    [[NSAnimationContext currentContext]
+        setTimingFunction:linearTimingFunction];
+    [[NSAnimationContext currentContext] setCompletionHandler:^{
+      [NSAnimationContext beginGrouping];
+
+      [iconView_ setImage:sadTabIcon];
+      [[NSAnimationContext currentContext] setDuration:kSadTabAnimationTime];
+      [[NSAnimationContext currentContext]
+          setTimingFunction:linearTimingFunction];
+      [[iconView_ animator] setFrameOrigin:NSZeroPoint];
+
+      [NSAnimationContext endGrouping];
+    }];
+
+    [[iconView_ animator]
+        setFrameOrigin:NSMakePoint(0, -NSHeight([self bounds]))];
+
+    [NSAnimationContext endGrouping];
+  } else if (tabLoadingState_ == kTabDone) {
+    [iconView_ setImage:anImage];
+  } else if (tabLoadingState_ == kTabWaiting) {
+    [spinnerView_ setSpinDirection:SpinDirection::REVERSE];
+  } else {
+    [spinnerView_ setSpinDirection:SpinDirection::FORWARD];
+  }
+}
+
+- (void)setTabLoadingState:(TabLoadingState)newLoadingState {
+  [self setTabLoadingState:newLoadingState forIcon:nil];
+}
+
+- (void)setTabDoneStateWithIcon:(NSImage*)anImage {
+  [self setTabLoadingState:kTabDone forIcon:anImage];
+}
+
+// ThemedWindowDrawing implementation.
+
+- (void)windowDidChangeTheme {
+  // If showing the sad tab icon, make sure that icon matches the current theme.
+  if (tabLoadingState_ == kTabCrashed) {
+    [iconView_ setImage:[self sadTabIcon]];
+  }
+}
+
+- (void)windowDidChangeActive {
+}
+
+@end
diff --git a/chrome/browser/ui/cocoa/tabs/tab_spinner_view.h b/chrome/browser/ui/cocoa/tabs/tab_spinner_view.h
new file mode 100644
index 0000000..4c01b1b
--- /dev/null
+++ b/chrome/browser/ui/cocoa/tabs/tab_spinner_view.h
@@ -0,0 +1,21 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_COCOA_TABS_TAB_SPINNER_VIEW_H_
+#define CHROME_BROWSER_UI_COCOA_TABS_TAB_SPINNER_VIEW_H_
+
+#import "chrome/browser/ui/cocoa/spinner_view.h"
+
+#import "chrome/browser/ui/cocoa/tabs/tab_controller.h"
+#import "chrome/browser/ui/cocoa/themed_window.h"
+
+enum class SpinDirection { FORWARD, REVERSE };
+
+@interface TabSpinnerView : SpinnerView<ThemedWindowDrawing>
+
+- (void)setSpinDirection:(SpinDirection)newSpinDirection;
+
+@end
+
+#endif  // CHROME_BROWSER_UI_COCOA_TABS_TAB_SPINNER_VIEW_H_
diff --git a/chrome/browser/ui/cocoa/tabs/tab_spinner_view.mm b/chrome/browser/ui/cocoa/tabs/tab_spinner_view.mm
new file mode 100644
index 0000000..857e9d4
--- /dev/null
+++ b/chrome/browser/ui/cocoa/tabs/tab_spinner_view.mm
@@ -0,0 +1,138 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#import "chrome/browser/ui/cocoa/tabs/tab_spinner_view.h"
+
+#include "base/mac/scoped_cftyperef.h"
+#include "chrome/browser/themes/theme_properties.h"
+#include "skia/ext/skia_utils_mac.h"
+#include "ui/base/theme_provider.h"
+#include "ui/gfx/geometry/angle_conversions.h"
+#include "ui/native_theme/native_theme.h"
+
+namespace {
+constexpr CGFloat kDegrees90 = gfx::DegToRad(90.0f);
+constexpr CGFloat kDegrees180 = gfx::DegToRad(180.0f);
+constexpr CGFloat kDegrees270 = gfx::DegToRad(270.0f);
+constexpr CGFloat kDegrees360 = gfx::DegToRad(360.0f);
+constexpr CGFloat kWaitingStrokeAlpha = 0.5;
+}  // namespace
+
+@implementation TabSpinnerView {
+  BOOL spinReverse_;
+}
+
+- (NSColor*)spinnerColor {
+  BOOL hasDarkTheme =
+      [[self window] respondsToSelector:@selector(hasDarkTheme)] &&
+      [[self window] hasDarkTheme];
+
+  if (hasDarkTheme) {
+    return spinReverse_ ? [[NSColor whiteColor]
+                              colorWithAlphaComponent:kWaitingStrokeAlpha]
+                        : [NSColor whiteColor];
+  }
+
+  const ui::ThemeProvider* theme = nullptr;
+  if ([[self window] respondsToSelector:@selector(themeProvider)]) {
+    theme = [[self window] themeProvider];
+  }
+
+  if (spinReverse_) {
+    if (theme) {
+      return theme->GetNSColor(ThemeProperties::COLOR_TAB_THROBBER_WAITING);
+    }
+
+    SkColor skWaitingColor =
+        ui::NativeTheme::GetInstanceForNativeUi()->GetSystemColor(
+            ui::NativeTheme::kColorId_ThrobberWaitingColor);
+    return skia::SkColorToSRGBNSColor(skWaitingColor);
+  }
+
+  return theme ? theme->GetNSColor(ThemeProperties::COLOR_TAB_THROBBER_SPINNING)
+               : [super spinnerColor];
+}
+
+- (CGFloat)arcStartAngle {
+  return spinReverse_ ? kDegrees270 : [super arcStartAngle];
+}
+
+- (CGFloat)arcEndAngleDelta {
+  return spinReverse_ ? kDegrees180 : [super arcEndAngleDelta];
+}
+
+- (CGFloat)arcLength {
+  // The reverse arc spans 90 degrees of circumference.
+  static CGFloat reverseArcLength =
+      kDegrees90 * ([SpinnerView arcUnitRadius] * 2);
+
+  return spinReverse_ ? reverseArcLength : [super arcLength];
+}
+
+- (void)initializeAnimation {
+  if (!spinReverse_) {
+    return [super initializeAnimation];
+  }
+
+  const CGFloat forwardArcRotationTime = [SpinnerView arcRotationTime];
+  const CGFloat reverseArcAnimationTime = forwardArcRotationTime / 2.0;
+
+  // Create the arc animation.
+  base::scoped_nsobject<CAKeyframeAnimation> arcAnimation(
+      [[CAKeyframeAnimation animationWithKeyPath:@"lineDashPhase"] retain]);
+  [arcAnimation
+      setTimingFunction:[CAMediaTimingFunction
+                            functionWithName:kCAMediaTimingFunctionLinear]];
+  CGFloat scaleFactor = [self scaleFactor];
+  NSArray* animationValues = @[ @(-[self arcLength] * scaleFactor), @(0.0) ];
+  [arcAnimation setValues:animationValues];
+  NSArray* keyTimes = @[ @(0.0), @(1.0) ];
+  [arcAnimation setKeyTimes:keyTimes];
+  [arcAnimation setDuration:reverseArcAnimationTime];
+  [arcAnimation setFillMode:kCAFillModeForwards];
+
+  CAAnimationGroup* group = [CAAnimationGroup animation];
+  [group setDuration:reverseArcAnimationTime];
+  [group setFillMode:kCAFillModeForwards];
+  [group setAnimations:@[ arcAnimation ]];
+  [self setSpinnerAnimation:group];
+
+  // Finally, create an animation that rotates the entire spinner layer.
+  CABasicAnimation* rotationAnimation =
+      [CABasicAnimation animationWithKeyPath:@"transform.rotation"];
+  [rotationAnimation setFromValue:@0];
+  [rotationAnimation setToValue:@(kDegrees360)];
+
+  // Start the rotation once the stroke animation has completed.
+  [rotationAnimation
+      setBeginTime:CACurrentMediaTime() + reverseArcAnimationTime];
+  [rotationAnimation setDuration:forwardArcRotationTime];
+  [rotationAnimation setFillMode:kCAFillModeForwards];
+  [rotationAnimation setRepeatCount:HUGE_VALF];
+
+  [self setRotationAnimation:rotationAnimation];
+}
+
+- (void)setSpinDirection:(SpinDirection)newSpinDirection {
+  BOOL spinReverse = (newSpinDirection == SpinDirection::REVERSE);
+
+  if (spinReverse == spinReverse_) {
+    return;
+  }
+  spinReverse_ = spinReverse;
+
+  [self restartAnimation];
+}
+
+// ThemedWindowDrawing implementation.
+
+- (void)windowDidChangeTheme {
+  // Make sure the spinner colors matches the current theme.
+  [self updateSpinnerColor];
+}
+
+- (void)windowDidChangeActive {
+}
+
+@end
diff --git a/chrome/browser/ui/collected_cookies_infobar_delegate.cc b/chrome/browser/ui/collected_cookies_infobar_delegate.cc
index b3f4524..0feb0af 100644
--- a/chrome/browser/ui/collected_cookies_infobar_delegate.cc
+++ b/chrome/browser/ui/collected_cookies_infobar_delegate.cc
@@ -27,11 +27,6 @@
 CollectedCookiesInfoBarDelegate::~CollectedCookiesInfoBarDelegate() {
 }
 
-infobars::InfoBarDelegate::Type
-CollectedCookiesInfoBarDelegate::GetInfoBarType() const {
-  return PAGE_ACTION_TYPE;
-}
-
 infobars::InfoBarDelegate::InfoBarIdentifier
 CollectedCookiesInfoBarDelegate::GetIdentifier() const {
   return COLLECTED_COOKIES_INFOBAR_DELEGATE;
diff --git a/chrome/browser/ui/collected_cookies_infobar_delegate.h b/chrome/browser/ui/collected_cookies_infobar_delegate.h
index 3250378..3797593 100644
--- a/chrome/browser/ui/collected_cookies_infobar_delegate.h
+++ b/chrome/browser/ui/collected_cookies_infobar_delegate.h
@@ -26,7 +26,6 @@
   ~CollectedCookiesInfoBarDelegate() override;
 
   // ConfirmInfoBarDelegate:
-  Type GetInfoBarType() const override;
   infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override;
   const gfx::VectorIcon& GetVectorIcon() const override;
   base::string16 GetMessageText() const override;
diff --git a/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.cc b/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.cc
index 40de689c..90dacc0 100644
--- a/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.cc
+++ b/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.cc
@@ -98,11 +98,6 @@
   return true;
 }
 
-infobars::InfoBarDelegate::Type
-AlternateNavInfoBarDelegate::GetInfoBarType() const {
-  return PAGE_ACTION_TYPE;
-}
-
 infobars::InfoBarDelegate::InfoBarIdentifier
 AlternateNavInfoBarDelegate::GetIdentifier() const {
   return ALTERNATE_NAV_INFOBAR_DELEGATE;
diff --git a/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.h b/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.h
index 64e93b3..d81fa393 100644
--- a/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.h
+++ b/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.h
@@ -46,7 +46,6 @@
       std::unique_ptr<AlternateNavInfoBarDelegate> delegate);
 
   // InfoBarDelegate:
-  Type GetInfoBarType() const override;
   infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override;
   const gfx::VectorIcon& GetVectorIcon() const override;
 
diff --git a/chrome/browser/ui/page_info/page_info_infobar_delegate.cc b/chrome/browser/ui/page_info/page_info_infobar_delegate.cc
index fa8b1ae..520dee0 100644
--- a/chrome/browser/ui/page_info/page_info_infobar_delegate.cc
+++ b/chrome/browser/ui/page_info/page_info_infobar_delegate.cc
@@ -24,11 +24,6 @@
 
 PageInfoInfoBarDelegate::~PageInfoInfoBarDelegate() {}
 
-infobars::InfoBarDelegate::Type PageInfoInfoBarDelegate::GetInfoBarType()
-    const {
-  return PAGE_ACTION_TYPE;
-}
-
 infobars::InfoBarDelegate::InfoBarIdentifier
 PageInfoInfoBarDelegate::GetIdentifier() const {
   return PAGE_INFO_INFOBAR_DELEGATE;
diff --git a/chrome/browser/ui/page_info/page_info_infobar_delegate.h b/chrome/browser/ui/page_info/page_info_infobar_delegate.h
index 8f3b3c2..57d84b8 100644
--- a/chrome/browser/ui/page_info/page_info_infobar_delegate.h
+++ b/chrome/browser/ui/page_info/page_info_infobar_delegate.h
@@ -26,7 +26,6 @@
   ~PageInfoInfoBarDelegate() override;
 
   // ConfirmInfoBarDelegate:
-  Type GetInfoBarType() const override;
   infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override;
   const gfx::VectorIcon& GetVectorIcon() const override;
   base::string16 GetMessageText() const override;
diff --git a/chrome/browser/ui/startup/default_browser_infobar_delegate.cc b/chrome/browser/ui/startup/default_browser_infobar_delegate.cc
index 642aa63..de184f8 100644
--- a/chrome/browser/ui/startup/default_browser_infobar_delegate.cc
+++ b/chrome/browser/ui/startup/default_browser_infobar_delegate.cc
@@ -54,11 +54,6 @@
   should_expire_ = true;
 }
 
-infobars::InfoBarDelegate::Type DefaultBrowserInfoBarDelegate::GetInfoBarType()
-    const {
-  return PAGE_ACTION_TYPE;
-}
-
 infobars::InfoBarDelegate::InfoBarIdentifier
 DefaultBrowserInfoBarDelegate::GetIdentifier() const {
   return DEFAULT_BROWSER_INFOBAR_DELEGATE;
diff --git a/chrome/browser/ui/startup/default_browser_infobar_delegate.h b/chrome/browser/ui/startup/default_browser_infobar_delegate.h
index 26a9128a..9e33eaca 100644
--- a/chrome/browser/ui/startup/default_browser_infobar_delegate.h
+++ b/chrome/browser/ui/startup/default_browser_infobar_delegate.h
@@ -44,7 +44,6 @@
   void AllowExpiry();
 
   // ConfirmInfoBarDelegate:
-  Type GetInfoBarType() const override;
   infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override;
   const gfx::VectorIcon& GetVectorIcon() const override;
   bool ShouldExpire(const NavigationDetails& details) const override;
diff --git a/chrome/browser/ui/views/first_run_dialog.cc b/chrome/browser/ui/views/first_run_dialog.cc
index ce5f152..54b1435 100644
--- a/chrome/browser/ui/views/first_run_dialog.cc
+++ b/chrome/browser/ui/views/first_run_dialog.cc
@@ -9,6 +9,7 @@
 #include "base/bind.h"
 #include "base/message_loop/message_loop.h"
 #include "base/run_loop.h"
+#include "chrome/browser/browser_process.h"
 #include "chrome/browser/first_run/first_run.h"
 #include "chrome/browser/metrics/metrics_reporting_state.h"
 #include "chrome/browser/platform_util.h"
@@ -114,8 +115,10 @@
 bool FirstRunDialog::Accept() {
   GetWidget()->Hide();
 
-  ChangeMetricsReportingStateWithReply(report_crashes_->checked(),
-                                       base::Bind(&InitCrashReporterIfEnabled));
+  ChangeMetricsReportingStateWithReply(
+      g_browser_process->local_state(),
+      g_browser_process->GetMetricsServicesManager(),
+      report_crashes_->checked(), base::Bind(&InitCrashReporterIfEnabled));
 
   if (make_default_->checked())
     shell_integration::SetAsDefaultBrowser();
diff --git a/chrome/browser/ui/views/infobars/infobar_background.cc b/chrome/browser/ui/views/infobars/infobar_background.cc
index db6b89e..25e831a 100644
--- a/chrome/browser/ui/views/infobars/infobar_background.cc
+++ b/chrome/browser/ui/views/infobars/infobar_background.cc
@@ -14,9 +14,8 @@
 #include "ui/gfx/scoped_canvas.h"
 #include "ui/views/view.h"
 
-InfoBarBackground::InfoBarBackground(
-    infobars::InfoBarDelegate::Type infobar_type) {
-  SetNativeControlColor(infobars::InfoBar::GetBackgroundColor(infobar_type));
+InfoBarBackground::InfoBarBackground() {
+  SetNativeControlColor(infobars::InfoBar::kBackgroundColor);
 }
 
 InfoBarBackground::~InfoBarBackground() {
diff --git a/chrome/browser/ui/views/infobars/infobar_background.h b/chrome/browser/ui/views/infobars/infobar_background.h
index 3cb4020..fda30a2 100644
--- a/chrome/browser/ui/views/infobars/infobar_background.h
+++ b/chrome/browser/ui/views/infobars/infobar_background.h
@@ -7,12 +7,11 @@
 
 #include "base/compiler_specific.h"
 #include "base/macros.h"
-#include "components/infobars/core/infobar_delegate.h"
 #include "ui/views/background.h"
 
 class InfoBarBackground : public views::Background {
  public:
-  explicit InfoBarBackground(infobars::InfoBarDelegate::Type infobar_type);
+  InfoBarBackground();
   ~InfoBarBackground() override;
 
  private:
diff --git a/chrome/browser/ui/views/infobars/infobar_view.cc b/chrome/browser/ui/views/infobars/infobar_view.cc
index e7683e1a..f965059 100644
--- a/chrome/browser/ui/views/infobars/infobar_view.cc
+++ b/chrome/browser/ui/views/infobars/infobar_view.cc
@@ -79,8 +79,7 @@
       icon_(nullptr),
       close_button_(nullptr) {
   set_owned_by_client();  // InfoBar deletes itself at the appropriate time.
-  SetBackground(std::make_unique<InfoBarBackground>(
-      infobars::InfoBar::delegate()->GetInfoBarType()));
+  SetBackground(std::make_unique<InfoBarBackground>());
   SetEventTargeter(std::make_unique<views::ViewTargeter>(this));
 
   AddChildView(child_container_);
@@ -91,8 +90,7 @@
   child_container_->SetPaintToLayer();
   child_container_->layer()->SetMasksToBounds(true);
   child_container_->SetBackground(
-      views::CreateSolidBackground(infobars::InfoBar::GetBackgroundColor(
-          infobars::InfoBar::delegate()->GetInfoBarType())));
+      views::CreateSolidBackground(infobars::InfoBar::kBackgroundColor));
 }
 
 const infobars::InfoBarContainer::Delegate* InfoBarView::container_delegate()
@@ -304,10 +302,7 @@
 }
 
 void InfoBarView::GetAccessibleNodeData(ui::AXNodeData* node_data) {
-  node_data->SetName(l10n_util::GetStringUTF8(
-      (delegate()->GetInfoBarType() == infobars::InfoBarDelegate::WARNING_TYPE)
-          ? IDS_ACCNAME_INFOBAR_WARNING
-          : IDS_ACCNAME_INFOBAR_PAGE_ACTION));
+  node_data->SetName(l10n_util::GetStringUTF8(IDS_ACCNAME_INFOBAR));
   node_data->role = ui::AX_ROLE_ALERT;
   node_data->AddStringAttribute(ui::AX_ATTR_KEY_SHORTCUTS, "Alt+Shift+A");
 }
diff --git a/chrome/browser/ui/views/session_crashed_bubble_view.cc b/chrome/browser/ui/views/session_crashed_bubble_view.cc
index c6d0370..631b9bc 100644
--- a/chrome/browser/ui/views/session_crashed_bubble_view.cc
+++ b/chrome/browser/ui/views/session_crashed_bubble_view.cc
@@ -15,6 +15,7 @@
 #include "base/metrics/histogram_macros.h"
 #include "base/task_runner_util.h"
 #include "build/build_config.h"
+#include "chrome/browser/browser_process.h"
 #include "chrome/browser/metrics/metrics_reporting_state.h"
 #include "chrome/browser/prefs/session_startup_pref.h"
 #include "chrome/browser/sessions/session_restore.h"
@@ -138,7 +139,8 @@
   bool offer_uma_optin = false;
 
   if (DoesSupportConsentCheck() && !uma_opted_in_already)
-    offer_uma_optin = !IsMetricsReportingPolicyManaged();
+    offer_uma_optin =
+        !IsMetricsReportingPolicyManaged(g_browser_process->local_state());
 
   Browser* browser = browser_observer->browser();
 
@@ -336,7 +338,9 @@
   // Record user's choice for opt-in in to UMA.
   // There's no opt-out choice in the crash restore bubble.
   if (uma_option_ && uma_option_->checked()) {
-    ChangeMetricsReportingState(true);
+    ChangeMetricsReportingState(g_browser_process->local_state(),
+                                g_browser_process->GetMetricsServicesManager(),
+                                true);
     RecordBubbleHistogramValue(SESSION_CRASHED_BUBBLE_UMA_OPTIN);
   }
 }
diff --git a/chrome/browser/ui/views/toolbar/toolbar_button.cc b/chrome/browser/ui/views/toolbar/toolbar_button.cc
index b78f1583..4f247e8 100644
--- a/chrome/browser/ui/views/toolbar/toolbar_button.cc
+++ b/chrome/browser/ui/views/toolbar/toolbar_button.cc
@@ -127,7 +127,7 @@
 
 void ToolbarButton::GetAccessibleNodeData(ui::AXNodeData* node_data) {
   Button::GetAccessibleNodeData(node_data);
-  node_data->role = ui::AX_ROLE_BUTTON_DROP_DOWN;
+  node_data->role = ui::AX_ROLE_BUTTON;
   node_data->AddState(ui::AX_STATE_HASPOPUP);
   if (enabled()) {
     node_data->AddIntAttribute(ui::AX_ATTR_DEFAULT_ACTION_VERB,
diff --git a/chrome/browser/ui/webui/crashes_ui.cc b/chrome/browser/ui/webui/crashes_ui.cc
index d8444cb..bfb3fb2 100644
--- a/chrome/browser/ui/webui/crashes_ui.cc
+++ b/chrome/browser/ui/webui/crashes_ui.cc
@@ -16,6 +16,7 @@
 #include "base/sys_info.h"
 #include "base/values.h"
 #include "build/build_config.h"
+#include "chrome/browser/browser_process.h"
 #include "chrome/browser/crash_upload_list/crash_upload_list.h"
 #include "chrome/browser/metrics/chrome_metrics_service_accessor.h"
 #include "chrome/browser/metrics/metrics_reporting_state.h"
@@ -160,7 +161,8 @@
 
 void CrashesDOMHandler::UpdateUI() {
   bool crash_reporting_enabled =
-      ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled();
+      ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled(
+          g_browser_process->local_state());
 
   bool system_crash_reporter = false;
 #if defined(OS_CHROMEOS)
@@ -175,7 +177,8 @@
   // Maunal uploads currently are supported only for Crashpad-using platforms
   // and Android, and only if crash uploads are not disabled by policy.
   support_manual_uploads =
-      crash_reporting_enabled || !IsMetricsReportingPolicyManaged();
+      crash_reporting_enabled ||
+      !IsMetricsReportingPolicyManaged(g_browser_process->local_state());
 
   // Show crash reports regardless of |crash_reporting_enabled| so that users
   // can manually upload those reports.
@@ -213,8 +216,9 @@
   DCHECK(success);
 
   // Only allow manual uploads if crash uploads aren’t disabled by policy.
-  if (!ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled() &&
-      IsMetricsReportingPolicyManaged()) {
+  if (!ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled(
+          g_browser_process->local_state()) &&
+      IsMetricsReportingPolicyManaged(g_browser_process->local_state())) {
     return;
   }
   upload_list_->RequestSingleUploadAsync(local_id);
diff --git a/chrome/browser/ui/webui/flash_ui.cc b/chrome/browser/ui/webui/flash_ui.cc
index f4352f0..ea39adcf 100644
--- a/chrome/browser/ui/webui/flash_ui.cc
+++ b/chrome/browser/ui/webui/flash_ui.cc
@@ -26,6 +26,7 @@
 #include "base/timer/timer.h"
 #include "base/values.h"
 #include "build/build_config.h"
+#include "chrome/browser/browser_process.h"
 #include "chrome/browser/crash_upload_list/crash_upload_list.h"
 #include "chrome/browser/metrics/chrome_metrics_service_accessor.h"
 #include "chrome/browser/plugins/plugin_prefs.h"
@@ -300,7 +301,8 @@
   // Crash information.
   AddPair(list.get(), base::string16(), "--- Crash data ---");
   bool crash_reporting_enabled =
-      ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled();
+      ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled(
+          g_browser_process->local_state());
   if (crash_reporting_enabled) {
     std::vector<UploadList::UploadInfo> crashes;
     upload_list_->GetUploads(10, &crashes);
diff --git a/chrome/browser/ui/webui/print_preview/print_preview_ui.cc b/chrome/browser/ui/webui/print_preview/print_preview_ui.cc
index eccc085..6930b922 100644
--- a/chrome/browser/ui/webui/print_preview/print_preview_ui.cc
+++ b/chrome/browser/ui/webui/print_preview/print_preview_ui.cc
@@ -381,8 +381,6 @@
                           IDR_PRINT_PREVIEW_IMAGES_2X_PRINTER_SHARED);
   source->AddResourcePath("images/business.svg",
                           IDR_PRINT_PREVIEW_IMAGES_ENTERPRISE_PRINTER);
-  source->AddResourcePath("images/third_party.png",
-                          IDR_PRINT_PREVIEW_IMAGES_THIRD_PARTY);
   source->AddResourcePath("images/google_doc.png",
                           IDR_PRINT_PREVIEW_IMAGES_GOOGLE_DOC);
   source->AddResourcePath("images/pdf.png", IDR_PRINT_PREVIEW_IMAGES_PDF);
diff --git a/chrome/browser/ui/webui/settings/metrics_reporting_handler.cc b/chrome/browser/ui/webui/settings/metrics_reporting_handler.cc
index 60d7077..9616e09 100644
--- a/chrome/browser/ui/webui/settings/metrics_reporting_handler.cc
+++ b/chrome/browser/ui/webui/settings/metrics_reporting_handler.cc
@@ -63,15 +63,18 @@
     MetricsReportingHandler::CreateMetricsReportingDict() {
   std::unique_ptr<base::DictionaryValue> dict(
       std::make_unique<base::DictionaryValue>());
-  dict->SetBoolean("enabled",
-      ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled());
-  dict->SetBoolean("managed", IsMetricsReportingPolicyManaged());
+  dict->SetBoolean(
+      "enabled",
+      ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled(
+          g_browser_process->local_state()));
+  dict->SetBoolean("managed", IsMetricsReportingPolicyManaged(
+                                  g_browser_process->local_state()));
   return dict;
 }
 
 void MetricsReportingHandler::HandleSetMetricsReportingEnabled(
     const base::ListValue* args) {
-  if (IsMetricsReportingPolicyManaged()) {
+  if (IsMetricsReportingPolicyManaged(g_browser_process->local_state())) {
     NOTREACHED();
     // NOTE: ChangeMetricsReportingState() already checks whether metrics
     // reporting is managed by policy. Also, the UI really shouldn't be able to
@@ -83,7 +86,9 @@
 
   bool enabled;
   CHECK(args->GetBoolean(0, &enabled));
-  ChangeMetricsReportingState(enabled);
+  ChangeMetricsReportingState(g_browser_process->local_state(),
+                              g_browser_process->GetMetricsServicesManager(),
+                              enabled);
 }
 
 void MetricsReportingHandler::OnPolicyChanged(const base::Value* previous,
diff --git a/chrome/browser/vr/ui_scene_creator.cc b/chrome/browser/vr/ui_scene_creator.cc
index 08c8b27..0ffd7238 100644
--- a/chrome/browser/vr/ui_scene_creator.cc
+++ b/chrome/browser/vr/ui_scene_creator.cc
@@ -1230,7 +1230,9 @@
   close_button->SetSize(kVoiceSearchCloseButtonWidth,
                         kVoiceSearchCloseButtonHeight);
   close_button->set_hover_offset(kButtonZOffsetHoverDMM * kContentDistance);
-  close_button->SetTranslate(0.0, -kVoiceSearchCloseButtonYOffset, 0.f);
+  close_button->SetTranslate(0, -kVoiceSearchCloseButtonYOffset, 0);
+  close_button->SetRotate(
+      1, 0, 0, atan(-kVoiceSearchCloseButtonYOffset / kContentDistance));
   VR_BIND_BUTTON_COLORS(model_, close_button.get(), &ColorScheme::button_colors,
                         &DiscButton::SetButtonColors);
   scene_->AddUiElement(kSpeechRecognitionListening, std::move(close_button));
@@ -1840,6 +1842,14 @@
   element->AddBinding(VR_BIND(
       bool, Model, model_, model->fullscreen_enabled(), UiElement,
       element.get(),
+      view->SetRotate(
+          1, 0, 0,
+          atan(value ? kCloseButtonFullscreenVerticalOffset /
+                           kCloseButtonFullscreenDistance
+                     : kCloseButtonVerticalOffset / kCloseButtonDistance))));
+  element->AddBinding(VR_BIND(
+      bool, Model, model_, model->fullscreen_enabled(), UiElement,
+      element.get(),
       view->SetSize(
           value ? kCloseButtonFullscreenDiameter : kCloseButtonDiameter,
           value ? kCloseButtonFullscreenDiameter : kCloseButtonDiameter)));
diff --git a/chrome/common/chrome_features.cc b/chrome/common/chrome_features.cc
index b113b581..300e0f39 100644
--- a/chrome/common/chrome_features.cc
+++ b/chrome/common/chrome_features.cc
@@ -71,7 +71,7 @@
 // Enables the built-in DNS resolver.
 const base::Feature kAsyncDns {
   "AsyncDns",
-#if defined(OS_CHROMEOS) || defined(OS_MACOSX) || defined(OS_ANDROID)
+#if defined(OS_CHROMEOS) || defined(OS_MACOSX)
       base::FEATURE_ENABLED_BY_DEFAULT
 #else
       base::FEATURE_DISABLED_BY_DEFAULT
diff --git a/chrome/common/extensions/api/automation.idl b/chrome/common/extensions/api/automation.idl
index 1cf1a42..b2f1ff51 100644
--- a/chrome/common/extensions/api/automation.idl
+++ b/chrome/common/extensions/api/automation.idl
@@ -76,7 +76,6 @@
     banner,
     blockquote,
     button,
-    buttonDropDown,
     canvas,
     caption,
     caret,
diff --git a/chrome/gpu/chrome_content_gpu_client.cc b/chrome/gpu/chrome_content_gpu_client.cc
index 2d1614c7..b5008da 100644
--- a/chrome/gpu/chrome_content_gpu_client.cc
+++ b/chrome/gpu/chrome_content_gpu_client.cc
@@ -9,6 +9,7 @@
 #include "base/command_line.h"
 #include "base/lazy_instance.h"
 #include "base/threading/platform_thread.h"
+#include "base/threading/sequence_local_storage_slot.h"
 #include "base/time/time.h"
 #include "chrome/common/stack_sampling_configuration.h"
 #include "components/metrics/child_call_stack_profile_collector.h"
@@ -39,6 +40,32 @@
 base::LazyInstance<metrics::ChildCallStackProfileCollector>::Leaky
     g_call_stack_profile_collector = LAZY_INSTANCE_INITIALIZER;
 
+// The profiler object is stored in a SequenceLocalStorageSlot on the IO thread
+// so that it will be destroyed when the IO thread stops.
+base::LazyInstance<base::SequenceLocalStorageSlot<
+    std::unique_ptr<base::StackSamplingProfiler>>>::Leaky
+    io_thread_sampling_profiler = LAZY_INSTANCE_INITIALIZER;
+
+// Starts to profile the IO thread.
+void StartIOThreadProfiling() {
+  StackSamplingConfiguration* config = StackSamplingConfiguration::Get();
+
+  if (config->IsProfilerEnabledForCurrentProcess()) {
+    auto profiler = std::make_unique<base::StackSamplingProfiler>(
+        base::PlatformThread::CurrentId(),
+        config->GetSamplingParamsForCurrentProcess(),
+        g_call_stack_profile_collector.Get().GetProfilerCallback(
+            metrics::CallStackProfileParams(
+                metrics::CallStackProfileParams::GPU_PROCESS,
+                metrics::CallStackProfileParams::IO_THREAD,
+                metrics::CallStackProfileParams::PROCESS_STARTUP,
+                metrics::CallStackProfileParams::MAY_SHUFFLE)));
+
+    profiler->Start();
+    io_thread_sampling_profiler.Get().Set(std::move(profiler));
+  }
+}
+
 }  // namespace
 
 ChromeContentGpuClient::ChromeContentGpuClient()
@@ -98,6 +125,11 @@
       std::move(browser_interface));
 }
 
+void ChromeContentGpuClient::PostIOThreadCreated(
+    base::SingleThreadTaskRunner* io_task_runner) {
+  io_task_runner->PostTask(FROM_HERE, base::BindOnce(&StartIOThreadProfiling));
+}
+
 #if BUILDFLAG(ENABLE_LIBRARY_CDMS)
 std::unique_ptr<media::CdmProxy> ChromeContentGpuClient::CreateCdmProxy(
     const std::string& cdm_guid) {
diff --git a/chrome/gpu/chrome_content_gpu_client.h b/chrome/gpu/chrome_content_gpu_client.h
index 3572adce..deb0202c 100644
--- a/chrome/gpu/chrome_content_gpu_client.h
+++ b/chrome/gpu/chrome_content_gpu_client.h
@@ -9,6 +9,7 @@
 
 #include "base/macros.h"
 #include "base/profiler/stack_sampling_profiler.h"
+#include "base/single_thread_task_runner.h"
 #include "content/public/gpu/content_gpu_client.h"
 
 #if defined(OS_CHROMEOS)
@@ -31,6 +32,8 @@
   void InitializeRegistry(service_manager::BinderRegistry* registry) override;
   void GpuServiceInitialized(
       const gpu::GpuPreferences& gpu_preferences) override;
+  void PostIOThreadCreated(
+      base::SingleThreadTaskRunner* io_task_runner) override;
 
 #if BUILDFLAG(ENABLE_LIBRARY_CDMS)
   std::unique_ptr<media::CdmProxy> CreateCdmProxy(
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
index 1f93d7472..24340a3 100644
--- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn
@@ -575,6 +575,7 @@
       "../browser/media_galleries/media_galleries_dialog_controller_mock.cc",
       "../browser/media_galleries/media_galleries_dialog_controller_mock.h",
       "../browser/metrics/metrics_memory_details_browsertest.cc",
+      "../browser/metrics/metrics_reporting_state_browsertest.cc",
       "../browser/metrics/metrics_service_browsertest.cc",
       "../browser/metrics/oom/out_of_memory_reporter_browsertest.cc",
       "../browser/metrics/process_memory_metrics_emitter_browsertest.cc",
@@ -3958,7 +3959,6 @@
         "../browser/ui/cocoa/scoped_menu_bar_lock_unittest.mm",
         "../browser/ui/cocoa/screen_capture_notification_ui_cocoa_unittest.mm",
         "../browser/ui/cocoa/spinner_view_unittest.mm",
-        "../browser/ui/cocoa/sprite_view_unittest.mm",
         "../browser/ui/cocoa/status_bubble_mac_unittest.mm",
         "../browser/ui/cocoa/status_icons/status_icon_mac_unittest.mm",
         "../browser/ui/cocoa/styled_text_field_cell_unittest.mm",
diff --git a/chrome/test/base/testing_profile_manager.cc b/chrome/test/base/testing_profile_manager.cc
index 1293fa8..a6af9fb 100644
--- a/chrome/test/base/testing_profile_manager.cc
+++ b/chrome/test/base/testing_profile_manager.cc
@@ -15,6 +15,7 @@
 #include "chrome/browser/profiles/profile_info_cache.h"
 #include "chrome/browser/profiles/profile_manager.h"
 #include "chrome/common/chrome_constants.h"
+#include "chrome/common/chrome_paths.h"
 #include "chrome/test/base/testing_browser_process.h"
 #include "components/sync_preferences/pref_service_syncable.h"
 #include "testing/gtest/include/gtest/gtest.h"
@@ -45,8 +46,7 @@
     : called_set_up_(false),
       browser_process_(process),
       local_state_(process),
-      profile_manager_(NULL) {
-}
+      profile_manager_(nullptr) {}
 
 TestingProfileManager::~TestingProfileManager() {
   // Destroying this class also destroys the LocalState, so make sure the
@@ -249,6 +249,8 @@
 
   // Set up the directory for profiles.
   ASSERT_TRUE(profiles_dir_.CreateUniqueTempDir());
+  user_data_dir_override_ = std::make_unique<base::ScopedPathOverride>(
+      chrome::DIR_USER_DATA, profiles_dir_.GetPath());
 
   profile_manager_ = new testing::ProfileManager(profiles_dir_.GetPath());
   browser_process_->SetProfileManager(profile_manager_);  // Takes ownership.
diff --git a/chrome/test/base/testing_profile_manager.h b/chrome/test/base/testing_profile_manager.h
index 5d1f818..d0fcb869b 100644
--- a/chrome/test/base/testing_profile_manager.h
+++ b/chrome/test/base/testing_profile_manager.h
@@ -14,6 +14,7 @@
 #include "base/files/scoped_temp_dir.h"
 #include "base/macros.h"
 #include "base/strings/string16.h"
+#include "base/test/scoped_path_override.h"
 #include "chrome/test/base/scoped_testing_local_state.h"
 #include "chrome/test/base/testing_profile.h"
 
@@ -128,6 +129,12 @@
   // The directory in which new profiles are placed.
   base::ScopedTempDir profiles_dir_;
 
+  // The user data directory in the path service is overriden because some
+  // functions, e.g. GetPathOfHighResAvatarAtIndex, get the user data directory
+  // by the path service instead of the profile manager. The override is scoped
+  // with the help of this variable.
+  std::unique_ptr<base::ScopedPathOverride> user_data_dir_override_;
+
   // Weak reference to the browser process on which the ProfileManager is set.
   TestingBrowserProcess* browser_process_;
 
diff --git a/chrome/test/chromedriver/BUILD.gn b/chrome/test/chromedriver/BUILD.gn
index a7a8ce6a..845a1eb 100644
--- a/chrome/test/chromedriver/BUILD.gn
+++ b/chrome/test/chromedriver/BUILD.gn
@@ -347,6 +347,11 @@
   data_deps = [
     "//chrome/test/chromedriver",
   ]
+
+  if (is_win) {
+    # On Windows, the following target produces the final chrome.exe
+    data_deps += [ "//chrome:reorder_imports" ]
+  }
 }
 
 test("chromedriver_unittests") {
diff --git a/chrome/test/chromedriver/test/run_py_tests.py b/chrome/test/chromedriver/test/run_py_tests.py
index c103dc03..f806f77d 100755
--- a/chrome/test/chromedriver/test/run_py_tests.py
+++ b/chrome/test/chromedriver/test/run_py_tests.py
@@ -2711,9 +2711,16 @@
 
   options, args = parser.parse_args()
 
+  if options.chromedriver is None:
+    parser.error('--chromedriver is required.\n' +
+                 'Please run "%s --help" for help' % __file__)
   options.chromedriver = util.GetAbsolutePathOfUserPath(options.chromedriver)
-  if not options.chromedriver or not os.path.exists(options.chromedriver):
-    parser.error('chromedriver is required or the given path is invalid.' +
+  if (not os.path.exists(options.chromedriver) and
+      util.GetPlatformName() == 'win' and
+      not options.chromedriver.lower().endswith('.exe')):
+    options.chromedriver = options.chromedriver + '.exe'
+  if not os.path.exists(options.chromedriver):
+    parser.error('Path given by --chromedriver is invalid.\n' +
                  'Please run "%s --help" for help' % __file__)
 
   global _CHROMEDRIVER_BINARY
diff --git a/chrome/test/data/vr/e2e_test_files/html/webxr_page_submits_once.html b/chrome/test/data/vr/e2e_test_files/html/webxr_page_submits_once.html
new file mode 100644
index 0000000..691c0850
--- /dev/null
+++ b/chrome/test/data/vr/e2e_test_files/html/webxr_page_submits_once.html
@@ -0,0 +1,24 @@
+<!doctype html>
+<!--
+WebXR page that only submits one frame.
+-->
+<html>
+  <head>
+    <link rel="stylesheet" type="text/css" href="../resources/webxr_e2e.css">
+  </head>
+  <body>
+    <canvas id="webgl-canvas"></canvas>
+    <script src="../resources/webxr_e2e.js"></script>
+    <script src="../resources/webxr_boilerplate.js"></script>
+    <script>
+      var has_submitted = false;
+      onExclusiveXRFrameCallback = function() {
+        if (has_submitted) {
+          shouldSubmitFrame = false;
+          finishJavaScriptStep();
+        }
+        has_submitted = true;
+      };
+    </script>
+  </body>
+</html>
diff --git a/chrome/test/data/vr/e2e_test_files/html/webxr_test_presentation_locks_focus.html b/chrome/test/data/vr/e2e_test_files/html/webxr_test_presentation_locks_focus.html
new file mode 100644
index 0000000..b8c72d54
--- /dev/null
+++ b/chrome/test/data/vr/e2e_test_files/html/webxr_test_presentation_locks_focus.html
@@ -0,0 +1,37 @@
+<!doctype html>
+<!--
+Tests that when a screen taps causes a frame that isn't presenting to gain
+focus, that the presenting frame still receives input.
+-->
+<html>
+  <head>
+    <link rel="stylesheet" type="text/css" href="../resources/webxr_e2e.css">
+  </head>
+  <body>
+    <canvas id="webgl-canvas"></canvas>
+    <script src="../../../../../../third_party/WebKit/LayoutTests/resources/testharness.js"></script>
+    <script src="../resources/webxr_e2e.js"></script>
+    <script src="../resources/webxr_boilerplate.js"></script>
+    <script>
+      var t = async_test("Focus is locked to exclusive session");
+      var rafCount = 0;
+
+      function stepSetupFocusLoss() {
+        onExclusiveXRFrameCallback = null;
+        setTimeout(function() {
+          document.getElementById('externalframe').contentWindow.focus();
+        }, 1000);
+      }
+
+      window.onblur = function() {
+        onExclusiveXRFrameCallback = function() {
+          if (rafCount == 3) {
+            t.done();
+          }
+          rafCount++;
+        }
+      }
+    </script>
+    <iframe id="externalframe" width="1" height="1" src="about:blank" />
+  </body>
+</html>
diff --git a/chrome/test/data/vr/e2e_test_files/html/webxr_test_screen_taps_not_registered.html b/chrome/test/data/vr/e2e_test_files/html/webxr_test_screen_taps_not_registered.html
new file mode 100644
index 0000000..e456030f
--- /dev/null
+++ b/chrome/test/data/vr/e2e_test_files/html/webxr_test_screen_taps_not_registered.html
@@ -0,0 +1,36 @@
+<!doctype html>
+<!--
+Tests that screen taps aren't registered while in an exclusive WebXR session.
+-->
+<html>
+  <head>
+    <link rel="stylesheet" type="text/css" href="../resources/webxr_e2e.css">
+  </head>
+  <body>
+    <canvas id="webgl-canvas"></canvas>
+    <script src="../../../../../../third_party/WebKit/LayoutTests/resources/testharness.js"></script>
+    <script src="../resources/webxr_e2e.js"></script>
+    <script src="../resources/webxr_boilerplate.js"></script>
+    <script>
+      var t = async_test("Screen taps not registered when in exclusive session");
+      var numTaps = 0;
+      webglCanvas.addEventListener("click", () => {numTaps++;}, false);
+
+      function stepVerifyNoInitialTaps() {
+        t.step( () => {
+          assert_equals(numTaps, 0, "No initial taps");
+        });
+        finishJavaScriptStep();
+      }
+
+      function stepVerifyNoAdditionalTaps() {
+          t.step_func_done( () => {
+            // We expect 1 tap from entering VR
+            assert_equals(numTaps, 1,
+                "Only one tap registered after two taps given");
+          })();
+      }
+
+    </script>
+  </body>
+</html>
diff --git a/chrome/test/data/vr/e2e_test_files/resources/webxr_boilerplate.js b/chrome/test/data/vr/e2e_test_files/resources/webxr_boilerplate.js
index 127aeca..488eec0 100644
--- a/chrome/test/data/vr/e2e_test_files/resources/webxr_boilerplate.js
+++ b/chrome/test/data/vr/e2e_test_files/resources/webxr_boilerplate.js
@@ -35,6 +35,7 @@
 }
 
 function onSessionStarted(session) {
+  session.addEventListener('end', onSessionEnded);
   // Initialize the WebGL context for use with XR if it hasn't been already
   if (!gl) {
     glAttribs['compatibleXrDevice'] = session.device;
diff --git a/chrome/test/data/webui/net_internals/log_view_painter.js b/chrome/test/data/webui/net_internals/log_view_painter.js
index e93916c..3b9469c 100644
--- a/chrome/test/data/webui/net_internals/log_view_painter.js
+++ b/chrome/test/data/webui/net_internals/log_view_painter.js
@@ -1381,7 +1381,6 @@
         'has_md4': true,
         'is_issued_by_known_root': true,
         'is_issued_by_additional_trust_anchor': false,
-        'common_name_fallback_used': true,
         'cert_status': 5,
         'verified_cert': {
           'certificates': [
@@ -1432,7 +1431,7 @@
     '                         --> has_md4 = true\n' +
     '                         --> is_issued_by_known_root = true\n' +
     '                         --> is_issued_by_additional_trust_anchor =' +
-    ' false\n                         --> common_name_fallback_used = true\n' +
+    ' false\n' +
     '                         --> public_key_hashes = ["hash1","hash2"]';
 
   return testCase;
diff --git a/chromecast/media/cma/backend/android/java/src/org/chromium/chromecast/cma/backend/android/AudioSinkAudioTrackImpl.java b/chromecast/media/cma/backend/android/java/src/org/chromium/chromecast/cma/backend/android/AudioSinkAudioTrackImpl.java
index 6a2ee68d..57e9955 100644
--- a/chromecast/media/cma/backend/android/java/src/org/chromium/chromecast/cma/backend/android/AudioSinkAudioTrackImpl.java
+++ b/chromecast/media/cma/backend/android/java/src/org/chromium/chromecast/cma/backend/android/AudioSinkAudioTrackImpl.java
@@ -84,17 +84,21 @@
     private static final int MIN_BUFFER_SIZE_MULTIPLIER = 3;
 
     private static final long NO_TIMESTAMP = Long.MIN_VALUE;
+    private static final long NO_FRAME_POSITION = -1;
 
     private static final long SEC_IN_NSEC = 1000000000L;
     private static final long SEC_IN_USEC = 1000000L;
     private static final long MSEC_IN_NSEC = 1000000L;
-    private static final long TIMESTAMP_UPDATE_PERIOD = 3 * SEC_IN_NSEC;
+    private static final long USEC_IN_NSEC = 1000L;
+
+    private static final long TIMESTAMP_UPDATE_PERIOD = 250 * MSEC_IN_NSEC;
     private static final long UNDERRUN_LOG_THROTTLE_PERIOD = SEC_IN_NSEC;
 
     // Maximum amount a timestamp may deviate from the previous one to be considered stable.
-    private static final long MAX_TIMESTAMP_DEVIATION_NSEC = 1 * MSEC_IN_NSEC;
+    private static final long MAX_TIMESTAMP_DEVIATION_NSEC = 150 * USEC_IN_NSEC;
     // Number of consecutive stable timestamps needed to make it a valid reference point.
     private static final int MIN_TIMESTAMP_STABILITY_CNT = 3;
+    private static final long MIN_TIMESTAMP_STABILITY_TIME_NSEC = SEC_IN_NSEC;
 
     // Additional padding for minimum buffer time, determined experimentally.
     private static final long MIN_BUFFERED_TIME_PADDING_US = 20000;
@@ -106,6 +110,15 @@
 
     private final long mNativeAudioSinkAudioTrackImpl;
 
+    private enum ReferenceTimestampState {
+        STARTING_UP, // Starting up, no valid reference time yet.
+        STABLE, // Reference time exists and is updated regularly.
+        RESYNCING_AFTER_UNDERRUN, // The AudioTrack hit an underrun and we need to find a new
+                                  // reference timestamp after the underrun point.
+    }
+
+    ReferenceTimestampState mReferenceTimestampState;
+
     private boolean mIsInitialized;
 
     // Dynamic AudioTrack config parameter.
@@ -113,12 +126,20 @@
 
     private AudioTrack mAudioTrack;
 
-    // Timestamping logic for RenderingDelay calculations.
-    private AudioTimestamp mRefPointTStamp;
-    private AudioTimestamp mLastTStampCandidate;
+    // Timestamping logic for RenderingDelay calculations. See also the description for
+    // getNewFramePos0Timestamp() for additional information.
+    private long mRefNanoTimeAtFramePos0; // Reference time used to interpolate new timestamps at
+                                          // different frame positions.
+    private long mOriginalFramePosOfLastTimestamp; // The original frame position of the
+                                                   // AudioTimestamp that was last read from the
+                                                   // AudioTrack. This is used to filter duplicate
+                                                   // timestamps.
+    private long mRefNanoTimeAtFramePos0Candidate; // Candidate that still needs to show it is
+                                                   // stable.
     private long mLastTimestampUpdateNsec; // Last time we updated the timestamp.
     private boolean mTriggerTimestampUpdateNow; // Set to true to trigger an early update.
     private long mTimestampStabilityCounter; // Counts consecutive stable timestamps at startup.
+    private long mTimestampStabilityStartTimeNsec; // Time when we started being stable.
     private int mLastUnderrunCount;
     private long mLastUnderrunLogNsec;
 
@@ -138,6 +159,14 @@
     private ByteBuffer mRenderingDelayBuffer; // RenderingDelay return value
                                               // (java->native)
 
+    /**
+     * Converts the given nanoseconds value into microseconds with proper rounding. It is assumed
+     * that the value given is positive.
+     */
+    private static long convertNsecsToUsecs(long nsecs) {
+        return (nsecs + 500) / 1000;
+    }
+
     private static AudioManager getAudioManager() {
         if (sAudioManager == null) {
             sAudioManager = (AudioManager) ContextUtils.getApplicationContext().getSystemService(
@@ -188,8 +217,6 @@
 
     private AudioSinkAudioTrackImpl(long nativeAudioSinkAudioTrackImpl) {
         mNativeAudioSinkAudioTrackImpl = nativeAudioSinkAudioTrackImpl;
-        mRefPointTStamp = new AudioTimestamp();
-        mLastTStampCandidate = new AudioTimestamp();
         reset();
     }
 
@@ -199,6 +226,8 @@
         mLastUnderrunLogNsec = NO_TIMESTAMP;
         mTriggerTimestampUpdateNow = false;
         mTimestampStabilityCounter = 0;
+        mReferenceTimestampState = ReferenceTimestampState.STARTING_UP;
+        mOriginalFramePosOfLastTimestamp = NO_FRAME_POSITION;
         mLastUnderrunCount = 0;
         mTotalFramesWritten = 0;
     }
@@ -207,6 +236,12 @@
         return mLastTimestampUpdateNsec != NO_TIMESTAMP;
     }
 
+    /** Converts the given number of frames into an equivalent nanoTime period. */
+    private long convertFramesToNanoTime(long numOfFrames) {
+        // Use proper rounding (assumes all numbers are positive).
+        return (SEC_IN_NSEC * numOfFrames + mSampleRateInHz / 2) / mSampleRateInHz;
+    }
+
     /**
      * Initializes the instance by creating the AudioTrack object and allocating
      * the shared memory buffers.
@@ -326,15 +361,14 @@
         // Estimate how much playing time is left based on the most recent reference point.
         updateRefPointTimestamp();
         if (haveValidRefPoint()) {
-            long lastPlayoutTimeNsecs =
-                    getInterpolatedTStampNsecs(mRefPointTStamp, mTotalFramesWritten);
+            long lastPlayoutTimeNsecs = getInterpolatedTStampNsecs(mTotalFramesWritten);
             long now = System.nanoTime();
             playtimeLeftNsecs = lastPlayoutTimeNsecs - now;
         } else {
             // We have no timestamp to estimate how much is left to play, so assume the worst case.
             long most_frames_left =
                     Math.min(mTotalFramesWritten, mAudioTrack.getBufferSizeInFrames());
-            playtimeLeftNsecs = SEC_IN_NSEC * most_frames_left / mSampleRateInHz;
+            playtimeLeftNsecs = convertFramesToNanoTime(most_frames_left);
         }
         return (playtimeLeftNsecs < 0) ? 0 : playtimeLeftNsecs / 1000; // return usecs
     }
@@ -482,30 +516,48 @@
         }
 
         // Interpolate to get proper Rendering delay.
-        long playoutTimeNsecs = getInterpolatedTStampNsecs(mRefPointTStamp, mTotalFramesWritten);
-        long nowNsecs = System.nanoTime();
-        long delayNsecs = playoutTimeNsecs - nowNsecs;
+        long playoutTimeNsecs = getInterpolatedTStampNsecs(mTotalFramesWritten);
+        long playoutTimeUsecs = convertNsecsToUsecs(playoutTimeNsecs);
+        long nowUsecs = convertNsecsToUsecs(System.nanoTime());
+        long delayUsecs = playoutTimeUsecs - nowUsecs;
 
         // Populate RenderingDelay return value for native land.
-        mRenderingDelayBuffer.putLong(0, delayNsecs / 1000);
-        mRenderingDelayBuffer.putLong(8, nowNsecs / 1000);
+        mRenderingDelayBuffer.putLong(0, delayUsecs);
+        mRenderingDelayBuffer.putLong(8, nowUsecs);
 
         if (DEBUG_LEVEL >= 3) {
-            Log.i(TAG,
-                    "RenderingDelay: "
-                            + " delay=" + (delayNsecs / 1000) + " play=" + (nowNsecs / 1000));
+            Log.i(TAG, "RenderingDelay: delay=" + delayUsecs + " play=" + nowUsecs);
         }
     }
 
     /**
-     * Returns an interpolated timestamp based on the given reference point timestamp and frame
-     * position.
+     * Returns a new nanoTime timestamp for framePosition=0. This is done by reading an
+     * AudioTimeStamp {nanoTime, framePosition} object from the AudioTrack and transforming it to
+     * its {nanoTime', 0} equivalent by taking advantage of the fact that
+     *      (nanoTime - nanoTime') / (framePosition - 0) = 1 / sampleRate.
+     * The nanoTime' value is returned as the timestamp. If no new timestamp is available,
+     * NO_TIMESTAMP is returned.
      */
-    private long getInterpolatedTStampNsecs(AudioTimestamp referencePoint, long framePosition) {
-        long deltaFrames = framePosition - referencePoint.framePosition;
-        long deltaNsecs = 1000000000L * deltaFrames / mSampleRateInHz;
-        long interpolatedTimestampNsecs = referencePoint.nanoTime + deltaNsecs;
-        return interpolatedTimestampNsecs;
+    private long getNewFramePos0Timestamp() {
+        AudioTimestamp ts = new AudioTimestamp();
+        if (!mAudioTrack.getTimestamp(ts)) {
+            return NO_TIMESTAMP;
+        }
+        // Check for duplicates, i.e., AudioTrack returned the same Timestamp object as last time.
+        if (mOriginalFramePosOfLastTimestamp != NO_FRAME_POSITION
+                && ts.framePosition == mOriginalFramePosOfLastTimestamp) {
+            // Not a new timestamp, skip this one.
+            return NO_TIMESTAMP;
+        }
+        mOriginalFramePosOfLastTimestamp = ts.framePosition;
+        return ts.nanoTime - convertFramesToNanoTime(ts.framePosition);
+    }
+
+    /**
+     * Returns a timestamp for the given frame position, interpolated from the reference timestamp.
+     */
+    private long getInterpolatedTStampNsecs(long framePosition) {
+        return mRefNanoTimeAtFramePos0 + convertFramesToNanoTime(framePosition);
     }
 
     /** Checks for underruns and if detected invalidates the reference point timestamp. */
@@ -516,64 +568,39 @@
             // Invalidate timestamp (resets RenderingDelay).
             mLastTimestampUpdateNsec = NO_TIMESTAMP;
             mLastUnderrunCount = underruns;
+            mTimestampStabilityCounter = 0;
+            mReferenceTimestampState = ReferenceTimestampState.RESYNCING_AFTER_UNDERRUN;
         }
     }
 
-    private boolean isSameTimestamp(AudioTimestamp ts1, AudioTimestamp ts2) {
-        return ts1.framePosition == ts2.framePosition && ts1.nanoTime == ts2.nanoTime;
-    }
-
-    private void copyTimestamp(AudioTimestamp dst, AudioTimestamp src) {
-        dst.framePosition = src.framePosition;
-        dst.nanoTime = src.nanoTime;
-    }
-
-    /**
-     * Returns the deviation between the two given timestamps. Specifically, it uses ts1 to
-     * interpolate the nanoTime expected for ts2 and returns the difference.
-     */
-    private long calculateTimestampDeviation(AudioTimestamp ts1, AudioTimestamp ts2) {
-        long expectedTs2NanoTime = getInterpolatedTStampNsecs(ts1, ts2.framePosition);
-        return expectedTs2NanoTime - ts2.nanoTime;
-    }
-
-    /**
-     * Returns true if timestamps are not considered stable. They are not stable at the very
-     * beginning of playback.
-     */
-    private boolean needToCheckTimestampStability() {
-        return mTimestampStabilityCounter < MIN_TIMESTAMP_STABILITY_CNT;
-    }
-
     /**
      * Returns true if the given timestamp is stable. A timestamp is considered stable if it and
      * its two predecessors do not deviate significantly from each other.
      */
-    private boolean isTimestampStable(AudioTimestamp newTimestamp) {
+    private boolean isTimestampStable(long newNanoTimeAtFramePos0) {
         if (mTimestampStabilityCounter == 0) {
-            copyTimestamp(mLastTStampCandidate, newTimestamp);
+            mRefNanoTimeAtFramePos0Candidate = newNanoTimeAtFramePos0;
             mTimestampStabilityCounter = 1;
+            mTimestampStabilityStartTimeNsec = System.nanoTime();
             return false;
         }
 
-        if (isSameTimestamp(mLastTStampCandidate, newTimestamp)) {
-            // Android can return the same timestamp on successive calls.
-            return false;
-        }
-
-        long deviation = calculateTimestampDeviation(mLastTStampCandidate, newTimestamp);
+        long deviation = mRefNanoTimeAtFramePos0Candidate - newNanoTimeAtFramePos0;
         if (Math.abs(deviation) > MAX_TIMESTAMP_DEVIATION_NSEC) {
             // not stable
             Log.i(TAG,
-                    "Timestamp [" + mTimestampStabilityCounter
-                            + "] is not stable (deviation:" + deviation / 1000 + "us)");
+                    "Timestamp [" + mTimestampStabilityCounter + "/"
+                            + elapsedNsec(mTimestampStabilityStartTimeNsec) / 1000000
+                            + "ms] is not stable (deviation:" + deviation / 1000 + "us)");
             // Use this as the new starting point.
-            copyTimestamp(mLastTStampCandidate, newTimestamp);
+            mRefNanoTimeAtFramePos0Candidate = newNanoTimeAtFramePos0;
             mTimestampStabilityCounter = 1;
+            mTimestampStabilityStartTimeNsec = System.nanoTime();
             return false;
         }
 
-        if (++mTimestampStabilityCounter >= MIN_TIMESTAMP_STABILITY_CNT) {
+        if ((elapsedNsec(mTimestampStabilityStartTimeNsec) > MIN_TIMESTAMP_STABILITY_TIME_NSEC)
+                && ++mTimestampStabilityCounter >= MIN_TIMESTAMP_STABILITY_CNT) {
             return true;
         }
 
@@ -581,8 +608,7 @@
     }
 
     /**
-     * Gets a new reference point timestamp from AudioTrack. For performance reasons we only
-     * read a new timestamp in certain intervals.
+     * Update the reference timestamp used for interpolation.
      */
     private void updateRefPointTimestamp() {
         if (!mTriggerTimestampUpdateNow && haveValidRefPoint()
@@ -591,25 +617,68 @@
             return;
         }
 
-        AudioTimestamp newTimestamp = new AudioTimestamp();
-        if (!mAudioTrack.getTimestamp(newTimestamp)) {
+        long newNanoTimeAtFramePos0 = getNewFramePos0Timestamp();
+        if (newNanoTimeAtFramePos0 == NO_TIMESTAMP) {
             return; // no timestamp available
         }
 
-        // We require several stable timestamps before setting a reference point.
-        if (needToCheckTimestampStability() && !isTimestampStable(newTimestamp)) {
-            return;
-        }
+        long prevRefNanoTimeAtFramePos0 = mRefNanoTimeAtFramePos0;
+        switch (mReferenceTimestampState) {
+            case STARTING_UP:
+                // The Audiotrack produces a few timestamps at the beginning of time that are widely
+                // inaccurate. Hence, we require several stable timestamps before setting a
+                // reference point.
+                if (!isTimestampStable(newNanoTimeAtFramePos0)) {
+                    return;
+                }
+                // First stable timestamp.
+                mRefNanoTimeAtFramePos0 = prevRefNanoTimeAtFramePos0 = newNanoTimeAtFramePos0;
+                mReferenceTimestampState = ReferenceTimestampState.STABLE;
+                Log.i(TAG,
+                        "First stable timestamp [" + mTimestampStabilityCounter + "/"
+                                + elapsedNsec(mTimestampStabilityStartTimeNsec) / 1000000 + "ms]");
+                break;
 
-        // Got a stable timestamp.
-        copyTimestamp(mRefPointTStamp, newTimestamp);
+            case RESYNCING_AFTER_UNDERRUN:
+                // Resyncing happens after we hit an underrun in the AudioTrack. This causes the
+                // Android Audio stack to insert additional samples, which increases the reference
+                // timestamp (at framePosition=0) by thousands of usecs. Hence we need to find a new
+                // initial reference timestamp. Unfortunately, even though the underrun already
+                // happened, the timestamps returned by the AudioTrack may still be located *before*
+                // the underrun, and there is no way to query the AudioTrack about at which
+                // framePosition the underrun occured and where and how much additional data was
+                // inserted.
+                //
+                // At this point we just do the same as when in STARTING_UP, but eventually there
+                // should be a more refined way to figure out when the timestamps returned from the
+                // AudioTrack are usuable again.
+                if (!isTimestampStable(newNanoTimeAtFramePos0)) {
+                    return;
+                }
+                // Found a new stable timestamp.
+                mRefNanoTimeAtFramePos0 = newNanoTimeAtFramePos0;
+                mReferenceTimestampState = ReferenceTimestampState.STABLE;
+                Log.i(TAG,
+                        "New stable timestamp after underrun [" + mTimestampStabilityCounter + "/"
+                                + elapsedNsec(mTimestampStabilityStartTimeNsec) / 1000000 + "ms]");
+                break;
+
+            case STABLE:
+                // Timestamps can be jittery, and on some systems they are occasionally off by
+                // hundreds of usecs. Use a low-pass filter to handle this: 0.05*New + 0.95*Ref. Do
+                // integer math with proper rounding.
+                mRefNanoTimeAtFramePos0 =
+                        (5 * newNanoTimeAtFramePos0 + 95 * mRefNanoTimeAtFramePos0 + 50) / 100;
+                break;
+        }
 
         // Got a new value.
         if (DEBUG_LEVEL >= 1) {
+            long dev1 = convertNsecsToUsecs(prevRefNanoTimeAtFramePos0 - newNanoTimeAtFramePos0);
+            long dev2 = convertNsecsToUsecs(prevRefNanoTimeAtFramePos0 - mRefNanoTimeAtFramePos0);
             Log.i(TAG,
-                    "New AudioTrack timestamp:"
-                            + " pos=" + mRefPointTStamp.framePosition
-                            + " ts=" + mRefPointTStamp.nanoTime / 1000 + "us");
+                    "Updated mRefNanoTimeAtFramePos0=" + mRefNanoTimeAtFramePos0 / 1000 + " us ("
+                            + dev1 + "/" + dev2 + ")");
         }
 
         mLastTimestampUpdateNsec = System.nanoTime();
diff --git a/components/autofill/core/browser/autofill_credit_card_filling_infobar_delegate_mobile.cc b/components/autofill/core/browser/autofill_credit_card_filling_infobar_delegate_mobile.cc
index 2de1eae..d302321d 100644
--- a/components/autofill/core/browser/autofill_credit_card_filling_infobar_delegate_mobile.cc
+++ b/components/autofill/core/browser/autofill_credit_card_filling_infobar_delegate_mobile.cc
@@ -72,11 +72,6 @@
   return true;
 }
 
-infobars::InfoBarDelegate::Type
-AutofillCreditCardFillingInfoBarDelegateMobile::GetInfoBarType() const {
-  return PAGE_ACTION_TYPE;
-}
-
 infobars::InfoBarDelegate::InfoBarIdentifier
 AutofillCreditCardFillingInfoBarDelegateMobile::GetIdentifier() const {
   return AUTOFILL_CREDIT_CARD_FILLING_INFOBAR_DELEGATE_ANDROID;
diff --git a/components/autofill/core/browser/autofill_credit_card_filling_infobar_delegate_mobile.h b/components/autofill/core/browser/autofill_credit_card_filling_infobar_delegate_mobile.h
index 04e0306..e733339 100644
--- a/components/autofill/core/browser/autofill_credit_card_filling_infobar_delegate_mobile.h
+++ b/components/autofill/core/browser/autofill_credit_card_filling_infobar_delegate_mobile.h
@@ -41,7 +41,6 @@
 
  private:
   // ConfirmInfoBarDelegate (continued):
-  Type GetInfoBarType() const override;
   infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override;
   base::string16 GetButtonLabel(InfoBarButton button) const override;
 
diff --git a/components/autofill/core/browser/autofill_save_card_infobar_delegate_mobile.cc b/components/autofill/core/browser/autofill_save_card_infobar_delegate_mobile.cc
index bc4d854b..dd5aca9 100644
--- a/components/autofill/core/browser/autofill_save_card_infobar_delegate_mobile.cc
+++ b/components/autofill/core/browser/autofill_save_card_infobar_delegate_mobile.cc
@@ -91,11 +91,6 @@
   return l10n_util::GetStringUTF16(IDS_LEARN_MORE);
 }
 
-infobars::InfoBarDelegate::Type
-AutofillSaveCardInfoBarDelegateMobile::GetInfoBarType() const {
-  return PAGE_ACTION_TYPE;
-}
-
 infobars::InfoBarDelegate::InfoBarIdentifier
 AutofillSaveCardInfoBarDelegateMobile::GetIdentifier() const {
   return AUTOFILL_CC_INFOBAR_DELEGATE_MOBILE;
diff --git a/components/autofill/core/browser/autofill_save_card_infobar_delegate_mobile.h b/components/autofill/core/browser/autofill_save_card_infobar_delegate_mobile.h
index 8b933018..8b6c119 100644
--- a/components/autofill/core/browser/autofill_save_card_infobar_delegate_mobile.h
+++ b/components/autofill/core/browser/autofill_save_card_infobar_delegate_mobile.h
@@ -53,7 +53,6 @@
   int GetIconId() const override;
   base::string16 GetMessageText() const override;
   base::string16 GetLinkText() const override;
-  Type GetInfoBarType() const override;
   infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override;
   bool ShouldExpire(const NavigationDetails& details) const override;
   void InfoBarDismissed() override;
diff --git a/components/cronet/android/cert/cert_verifier_cache_serializer.cc b/components/cronet/android/cert/cert_verifier_cache_serializer.cc
index 5d02b14..4b0d2480 100644
--- a/components/cronet/android/cert/cert_verifier_cache_serializer.cc
+++ b/components/cronet/android/cert/cert_verifier_cache_serializer.cc
@@ -117,8 +117,6 @@
       result.is_issued_by_known_root);
   cert_verification_result->set_is_issued_by_additional_trust_anchor(
       result.is_issued_by_additional_trust_anchor);
-  cert_verification_result->set_common_name_fallback_used(
-      result.common_name_fallback_used);
 }
 
 // Deserializes |cached_result| using the certificate database provided in
@@ -164,8 +162,6 @@
       cert_verification_result.is_issued_by_known_root();
   result->is_issued_by_additional_trust_anchor =
       cert_verification_result.is_issued_by_additional_trust_anchor();
-  result->common_name_fallback_used =
-      cert_verification_result.common_name_fallback_used();
   return true;
 }
 
diff --git a/components/cronet/android/cert/proto/cert_verification.proto b/components/cronet/android/cert/proto/cert_verification.proto
index 5ca4446..16320fa 100644
--- a/components/cronet/android/cert/proto/cert_verification.proto
+++ b/components/cronet/android/cert/proto/cert_verification.proto
@@ -42,7 +42,7 @@
   repeated string public_key_hashes = 8;
   optional bool is_issued_by_known_root = 9;
   optional bool is_issued_by_additional_trust_anchor = 10;
-  optional bool common_name_fallback_used = 11;
+  optional bool common_name_fallback_used = 11 [deprecated = true];
 };
 
 // Protobuf for CertVerificationResult and the error.
diff --git a/components/infobars/core/infobar.cc b/components/infobars/core/infobar.cc
index b475c37..1859ce1 100644
--- a/components/infobars/core/infobar.cc
+++ b/components/infobars/core/infobar.cc
@@ -34,17 +34,6 @@
   DCHECK(!owner_);
 }
 
-// static
-SkColor InfoBar::GetBackgroundColor(InfoBarDelegate::Type infobar_type) {
-  static const SkColor kWarningBackgroundColor =
-      SkColorSetRGB(0xFF, 0xEC, 0xB3);  // Yellow
-  static constexpr SkColor kPageActionBackgroundColor = SK_ColorWHITE;
-
-  return infobar_type == InfoBarDelegate::WARNING_TYPE
-             ? kWarningBackgroundColor
-             : kPageActionBackgroundColor;
-}
-
 void InfoBar::SetOwner(InfoBarManager* owner) {
   DCHECK(!owner_);
   owner_ = owner;
diff --git a/components/infobars/core/infobar.h b/components/infobars/core/infobar.h
index 3c631100..5e1bcb1 100644
--- a/components/infobars/core/infobar.h
+++ b/components/infobars/core/infobar.h
@@ -41,11 +41,11 @@
   typedef InfoBar AddedDetails;
   typedef std::pair<InfoBar*, bool> RemovedDetails;
 
+  static constexpr SkColor kBackgroundColor = SK_ColorWHITE;
+
   explicit InfoBar(std::unique_ptr<InfoBarDelegate> delegate);
   ~InfoBar() override;
 
-  static SkColor GetBackgroundColor(InfoBarDelegate::Type infobar_type);
-
   InfoBarManager* owner() { return owner_; }
   InfoBarDelegate* delegate() const { return delegate_.get(); }
   void set_container(InfoBarContainer* container) { container_ = container; }
diff --git a/components/infobars/core/infobar_delegate.cc b/components/infobars/core/infobar_delegate.cc
index 08c10bc..dd6e0a29 100644
--- a/components/infobars/core/infobar_delegate.cc
+++ b/components/infobars/core/infobar_delegate.cc
@@ -29,10 +29,6 @@
   return UNKNOWN_INFOBAR;
 }
 
-InfoBarDelegate::Type InfoBarDelegate::GetInfoBarType() const {
-  return WARNING_TYPE;
-}
-
 int InfoBarDelegate::GetIconId() const {
   return kNoIconID;
 }
@@ -46,10 +42,8 @@
 #if !defined(OS_IOS) && !defined(OS_ANDROID)
   const gfx::VectorIcon& vector_icon = GetVectorIcon();
   if (!vector_icon.is_empty()) {
-    return gfx::Image(gfx::CreateVectorIcon(vector_icon, 16,
-                                            GetInfoBarType() == WARNING_TYPE
-                                                ? SkColorSetRGB(0xFF, 0x67, 0)
-                                                : gfx::kGoogleBlue500));
+    return gfx::Image(
+        gfx::CreateVectorIcon(vector_icon, 16, gfx::kGoogleBlue500));
   }
 #endif
 
diff --git a/components/infobars/core/infobar_delegate.h b/components/infobars/core/infobar_delegate.h
index 62860bb..300779a 100644
--- a/components/infobars/core/infobar_delegate.h
+++ b/components/infobars/core/infobar_delegate.h
@@ -170,10 +170,6 @@
   // this point nothing is visible onscreen.
   virtual ~InfoBarDelegate();
 
-  // Returns the type of the infobar.  The type determines the appearance (such
-  // as background color) of the infobar.
-  virtual Type GetInfoBarType() const;
-
   // Returns a unique value identifying the infobar.
   // New implementers must append a new value to the InfoBarIdentifier enum here
   // and in histograms.xml.
diff --git a/components/metrics/metrics_service_accessor.cc b/components/metrics/metrics_service_accessor.cc
index 467210a..fbe98e7 100644
--- a/components/metrics/metrics_service_accessor.cc
+++ b/components/metrics/metrics_service_accessor.cc
@@ -12,20 +12,31 @@
 #include "components/variations/metrics_util.h"
 
 namespace metrics {
+namespace {
 
-// static
-bool MetricsServiceAccessor::IsMetricsReportingEnabled(
-    PrefService* pref_service) {
-#if defined(GOOGLE_CHROME_BUILD)
+bool g_force_official_enabled_test = false;
+
+bool IsMetricsReportingEnabledForOfficialBuild(PrefService* pref_service) {
   // In official builds, disable metrics when reporting field trials are
   // forced; otherwise, use the value of the user's preference to determine
   // whether to enable metrics reporting.
   return !base::CommandLine::ForCurrentProcess()->HasSwitch(
              switches::kForceFieldTrials) &&
          pref_service->GetBoolean(prefs::kMetricsReportingEnabled);
+}
+
+}  // namespace
+
+// static
+bool MetricsServiceAccessor::IsMetricsReportingEnabled(
+    PrefService* pref_service) {
+#if defined(GOOGLE_CHROME_BUILD)
+  return IsMetricsReportingEnabledForOfficialBuild(pref_service);
 #else
   // In non-official builds, disable metrics reporting completely.
-  return false;
+  return g_force_official_enabled_test
+             ? IsMetricsReportingEnabledForOfficialBuild(pref_service)
+             : false;
 #endif  // defined(GOOGLE_CHROME_BUILD)
 }
 
@@ -75,4 +86,10 @@
   return true;
 }
 
+// static
+void MetricsServiceAccessor::SetForceIsMetricsReportingEnabledPrefLookup(
+    bool value) {
+  g_force_official_enabled_test = value;
+}
+
 }  // namespace metrics
diff --git a/components/metrics/metrics_service_accessor.h b/components/metrics/metrics_service_accessor.h
index 7e1a107..3a362782 100644
--- a/components/metrics/metrics_service_accessor.h
+++ b/components/metrics/metrics_service_accessor.h
@@ -65,6 +65,13 @@
       uint32_t trial_name_hash,
       uint32_t group_name_hash);
 
+  // IsMetricsReportingEnabled() in non-official builds unconditionally returns
+  // false. This results in different behavior for tests running in official vs
+  // non-official builds. To get consistent behavior call this with true, which
+  // forces non-official builds to look at the prefs value official builds look
+  // at.
+  static void SetForceIsMetricsReportingEnabledPrefLookup(bool value);
+
  private:
   DISALLOW_COPY_AND_ASSIGN(MetricsServiceAccessor);
 };
diff --git a/components/omnibox/browser/BUILD.gn b/components/omnibox/browser/BUILD.gn
index f6a1e158..286405ac 100644
--- a/components/omnibox/browser/BUILD.gn
+++ b/components/omnibox/browser/BUILD.gn
@@ -64,7 +64,6 @@
     "clipboard_url_provider.h",
     "contextual_suggestions_service.cc",
     "contextual_suggestions_service.h",
-    "features.h",
     "history_match.cc",
     "history_match.h",
     "history_provider.cc",
diff --git a/components/previews/content/previews_content_util_unittest.cc b/components/previews/content/previews_content_util_unittest.cc
index 6989f32c..70d0d91d 100644
--- a/components/previews/content/previews_content_util_unittest.cc
+++ b/components/previews/content/previews_content_util_unittest.cc
@@ -44,6 +44,7 @@
         return previews::params::IsNoScriptPreviewsEnabled();
       case previews::PreviewsType::LITE_PAGE:
       case previews::PreviewsType::NONE:
+      case previews::PreviewsType::UNSPECIFIED:
       case previews::PreviewsType::LAST:
         break;
     }
diff --git a/components/previews/content/previews_io_data.cc b/components/previews/content/previews_io_data.cc
index 7f85fac..0c774f11 100644
--- a/components/previews/content/previews_io_data.cc
+++ b/components/previews/content/previews_io_data.cc
@@ -54,6 +54,7 @@
     case PreviewsType::OFFLINE:
       return false;
     case PreviewsType::NONE:
+    case PreviewsType::UNSPECIFIED:
     case PreviewsType::LAST:
       break;
   }
@@ -72,6 +73,7 @@
     case PreviewsType::AMP_REDIRECTION:
       return false;
     case PreviewsType::NONE:
+    case PreviewsType::UNSPECIFIED:
     case PreviewsType::LAST:
       break;
   }
diff --git a/components/previews/content/previews_io_data.h b/components/previews/content/previews_io_data.h
index a1ce94df..0eafc55 100644
--- a/components/previews/content/previews_io_data.h
+++ b/components/previews/content/previews_io_data.h
@@ -68,11 +68,13 @@
                             base::Time time,
                             uint64_t page_id) const;
 
-  // Adds log message of preview decision made asynchronously. |passed_reasons|
-  // are PreviewsEligibilityReasons that got passed the decision before
-  // |reason|. The method takes ownership of |passed_reasons|. |page_id| is
-  // generated by PreviewsIOData, and used to group decisions into groups on the
-  // page, messages that don't need to be grouped can pass in 0 as page_id.
+  // Adds a log message for the preview decision made (|reason|) asynchronously.
+  // |passed_reasons| is a collection of reason codes that correspond to
+  // eligibility checks that were satisfied prior to determining |reason| and
+  // so the opposite of these |passed_reasons| codes was true. The method
+  // takes ownership of |passed_reasons|. |page_id| is generated by
+  // PreviewsIOData, and used to group decisions into groups on the page,
+  // messages that don't need to be grouped can pass in 0 as page_id.
   void LogPreviewDecisionMade(
       PreviewsEligibilityReason reason,
       const GURL& url,
diff --git a/components/previews/content/previews_io_data_unittest.cc b/components/previews/content/previews_io_data_unittest.cc
index eae6528..58049bd 100644
--- a/components/previews/content/previews_io_data_unittest.cc
+++ b/components/previews/content/previews_io_data_unittest.cc
@@ -69,6 +69,7 @@
     case PreviewsType::NOSCRIPT:
       return params::IsNoScriptPreviewsEnabled();
     case PreviewsType::NONE:
+    case PreviewsType::UNSPECIFIED:
     case PreviewsType::LAST:
       break;
   }
diff --git a/components/previews/content/previews_ui_service.h b/components/previews/content/previews_ui_service.h
index 44f356c..7b96f2d5 100644
--- a/components/previews/content/previews_ui_service.h
+++ b/components/previews/content/previews_ui_service.h
@@ -85,10 +85,12 @@
                                     base::Time time,
                                     uint64_t page_id);
 
-  // Log the made decision of previews to PreviewsLogger. |passed_reasons| is a
-  // collection of PreviewsEligibilityReasons passed the checks before |reason|.
-  // The method takes ownership of |passed_reasons|. |page_id| is generated by
-  // PreviewsIOData, and used to group decisions into groups on the page,
+  // Log the determined previews eligibility decision |reason| to the
+  // PreviewsLogger. |passed_reasons| is a collection of reason codes that
+  // correspond to eligibility checks that were satisfied prior to determining
+  // |reason| and so the opposite of these |passed_reasons| codes was true.
+  // The method takes ownership of |passed_reasons|. |page_id| is generated
+  // by PreviewsIOData, and used to group decisions into groups on the page,
   // messages that don't need to be grouped can pass in 0 as page_id.
   // Virtualized in testing.
   virtual void LogPreviewDecisionMade(
diff --git a/components/previews/core/previews_black_list.h b/components/previews/core/previews_black_list.h
index 2860f7793..ef56ed7 100644
--- a/components/previews/core/previews_black_list.h
+++ b/components/previews/core/previews_black_list.h
@@ -61,7 +61,11 @@
   // The preview is allowed but without an expected check of server optimization
   // hints because they are not enabled (features::kOptimizationHints).
   ALLOWED_WITHOUT_OPTIMIZATION_HINTS = 11,
-  LAST = 9,
+  // The preview type chosen as the committed preview.
+  COMMITTED = 12,
+  // Previews blocked by a Cache-Control:no-transform directive.
+  CACHE_CONTROL_NO_TRANSFORM = 13,
+  LAST,
 };
 
 // Manages the state of black listed domains for the previews experiment. Loads
diff --git a/components/previews/core/previews_experiments.cc b/components/previews/core/previews_experiments.cc
index e160412..46fc975 100644
--- a/components/previews/core/previews_experiments.cc
+++ b/components/previews/core/previews_experiments.cc
@@ -143,6 +143,7 @@
       return net::EFFECTIVE_CONNECTION_TYPE_LAST;  // Trigger irrespective of
                                                    // ECT.
     case PreviewsType::NONE:
+    case PreviewsType::UNSPECIFIED:
     case PreviewsType::LAST:
       break;
   }
@@ -223,6 +224,8 @@
   // The returned string is used to record histograms for the new preview type.
   // Also add the string to Previews.Types histogram suffix in histograms.xml.
   switch (type) {
+    case PreviewsType::NONE:
+      return "None";
     case PreviewsType::OFFLINE:
       return "Offline";
     case PreviewsType::LOFI:
@@ -233,7 +236,8 @@
       return "AMPRedirection";
     case PreviewsType::NOSCRIPT:
       return "NoScript";
-    case PreviewsType::NONE:
+    case PreviewsType::UNSPECIFIED:
+      return "Unspecified";
     case PreviewsType::LAST:
       break;
   }
diff --git a/components/previews/core/previews_experiments.h b/components/previews/core/previews_experiments.h
index 1755106..43a4d94b 100644
--- a/components/previews/core/previews_experiments.h
+++ b/components/previews/core/previews_experiments.h
@@ -15,6 +15,7 @@
 namespace previews {
 
 enum class PreviewsType {
+  // Used to indicate that there is no preview type.
   NONE = 0,
 
   // The user is shown an offline page as a preview.
@@ -32,9 +33,13 @@
   // Preview that disables JavaScript for the navigation.
   NOSCRIPT = 5,
 
+  // Special value that indicates that no specific type is identified. This
+  // might be used for checks or logging that applies to any type.
+  UNSPECIFIED = 6,
+
   // Insert new enum values here. Keep values sequential to allow looping from
   // NONE+1 to LAST-1. Also add the enum to Previews.Types histogram suffix.
-  LAST = 6,
+  LAST = 7,
 };
 
 typedef std::vector<std::pair<PreviewsType, int>> PreviewsTypeList;
diff --git a/components/previews/core/previews_logger.cc b/components/previews/core/previews_logger.cc
index ad51f6ef..d6e41a3 100644
--- a/components/previews/core/previews_logger.cc
+++ b/components/previews/core/previews_logger.cc
@@ -32,55 +32,66 @@
 }
 
 std::string GetReasonDescription(PreviewsEligibilityReason reason,
-                                 bool final_reason) {
+                                 bool want_inverse_description) {
   switch (reason) {
     case PreviewsEligibilityReason::ALLOWED:
-      DCHECK(final_reason);
+      DCHECK(!want_inverse_description);
       return "Allowed";
     case PreviewsEligibilityReason::BLACKLIST_UNAVAILABLE:
-      return final_reason ? "Blacklist failed to be created"
-                          : "Blacklist not null";
+      return want_inverse_description ? "Blacklist not null"
+                                      : "Blacklist failed to be created";
     case PreviewsEligibilityReason::BLACKLIST_DATA_NOT_LOADED:
-      return final_reason ? "Blacklist not loaded from disk yet"
-                          : "Blacklist loaded from disk";
+      return want_inverse_description ? "Blacklist loaded from disk"
+                                      : "Blacklist not loaded from disk yet";
     case PreviewsEligibilityReason::USER_RECENTLY_OPTED_OUT:
-      return final_reason ? "User recently opted out"
-                          : "User did not opt out recently";
+      return want_inverse_description ? "User did not opt out recently"
+                                      : "User recently opted out";
     case PreviewsEligibilityReason::USER_BLACKLISTED:
-      return final_reason ? "All previews are blacklisted"
-                          : "Not all previews are blacklisted";
+      return want_inverse_description ? "Not all previews are blacklisted"
+                                      : "All previews are blacklisted";
     case PreviewsEligibilityReason::HOST_BLACKLISTED:
-      return final_reason ? "All previews on this host are blacklisted"
-                          : "Host is not blacklisted on all previews";
+      return want_inverse_description
+                 ? "Host is not blacklisted on all previews"
+                 : "All previews on this host are blacklisted";
     case PreviewsEligibilityReason::NETWORK_QUALITY_UNAVAILABLE:
-      return final_reason ? "Network quality unavailable"
-                          : "Network quality available";
+      return want_inverse_description ? "Network quality available"
+                                      : "Network quality unavailable";
     case PreviewsEligibilityReason::NETWORK_NOT_SLOW:
-      return final_reason ? "Network not slow" : "Network is slow";
+      return want_inverse_description ? "Network is slow" : "Network not slow";
     case PreviewsEligibilityReason::RELOAD_DISALLOWED:
-      return final_reason
-                 ? "Page reloads do not show previews for this preview type"
-                 : "Page reloads allowed";
+      return want_inverse_description
+                 ? "Page reloads allowed"
+                 : "Page reloads do not show previews for this preview type";
     case PreviewsEligibilityReason::HOST_BLACKLISTED_BY_SERVER:
-      return final_reason ? "Host blacklisted by server rules"
-                          : "Host not blacklisted by server rules";
+      return want_inverse_description ? "Host not blacklisted by server rules"
+                                      : "Host blacklisted by server rules";
     case PreviewsEligibilityReason::HOST_NOT_WHITELISTED_BY_SERVER:
-      return final_reason ? "Host not whitelisted by server rules"
-                          : "Host whitelisted by server rules";
+      return want_inverse_description ? "Host whitelisted by server rules"
+                                      : "Host not whitelisted by server rules";
     case PreviewsEligibilityReason::ALLOWED_WITHOUT_OPTIMIZATION_HINTS:
-      return final_reason ? "Allowed (but without server rule check)"
-                          : "Not allowed (without server rule check)";
+      return want_inverse_description
+                 ? "Not allowed (without server rule check)"
+                 : "Allowed (but without server rule check)";
+    case PreviewsEligibilityReason::COMMITTED:
+      return want_inverse_description ? "Not Committed" : "Committed";
+    case PreviewsEligibilityReason::CACHE_CONTROL_NO_TRANSFORM:
+      return want_inverse_description
+                 ? "Cache-control no-transform not received"
+                 : "Cache-control no-transform received";
+    case PreviewsEligibilityReason::LAST:
+      break;
   }
   NOTREACHED();
   return "";
 }
 
-std::string GetDescriptionForPreviewsDecision(PreviewsEligibilityReason reason,
-                                              PreviewsType type,
-                                              bool final_reason) {
-  return base::StringPrintf("%s preview - %s",
-                            GetStringNameForType(type).c_str(),
-                            GetReasonDescription(reason, final_reason).c_str());
+std::string GetDescriptionForPreviewsDecision(
+    PreviewsEligibilityReason reason,
+    PreviewsType type,
+    bool want_inverse_description = false) {
+  return base::StringPrintf(
+      "%s preview - %s", GetStringNameForType(type).c_str(),
+      GetReasonDescription(reason, want_inverse_description).c_str());
 }
 
 }  // namespace
@@ -203,15 +214,14 @@
   // Logs all passed decisions messages.
   for (auto decision : passed_reasons) {
     std::string decision_description = GetDescriptionForPreviewsDecision(
-        decision, type, false /* final_reason */);
+        decision, type, true /* want_inverse_description */);
     LogMessage(kPreviewDecisionMadeEventType, decision_description, url, time,
                page_id);
     decisions_logs_.emplace_back(kPreviewDecisionMadeEventType,
                                  decision_description, url, time, page_id);
   }
 
-  std::string description =
-      GetDescriptionForPreviewsDecision(reason, type, true /* final_reason */);
+  std::string description = GetDescriptionForPreviewsDecision(reason, type);
   LogMessage(kPreviewDecisionMadeEventType, description, url, time, page_id);
 
   // Pop out the older messages when the list is full.
diff --git a/components/previews/core/previews_logger_unittest.cc b/components/previews/core/previews_logger_unittest.cc
index 387f9f1b..4e76854 100644
--- a/components/previews/core/previews_logger_unittest.cc
+++ b/components/previews/core/previews_logger_unittest.cc
@@ -590,6 +590,22 @@
   EXPECT_EQ(expected_description, actual_description);
 }
 
+TEST_F(PreviewsLoggerTest, LogPreviewDecisionDescriptionCommitted) {
+  std::string actual_description = LogPreviewDecisionAndGetReasonDescription(
+      PreviewsEligibilityReason::COMMITTED, true /* final_reason */);
+  std::string expected_description = "Committed";
+  EXPECT_EQ(expected_description, actual_description);
+}
+
+TEST_F(PreviewsLoggerTest,
+       LogPreviewDecisionDescriptionCacheControlNoTransform) {
+  std::string actual_description = LogPreviewDecisionAndGetReasonDescription(
+      PreviewsEligibilityReason::CACHE_CONTROL_NO_TRANSFORM,
+      true /* final_reason */);
+  std::string expected_description = "Cache-control no-transform received";
+  EXPECT_EQ(expected_description, actual_description);
+}
+
 TEST_F(PreviewsLoggerTest, NotifyObserversOfNewBlacklistedHost) {
   TestPreviewsLoggerObserver observers[3];
 
diff --git a/components/ssl_config/ssl_config_prefs.cc b/components/ssl_config/ssl_config_prefs.cc
index 978ee3a..2197f71 100644
--- a/components/ssl_config/ssl_config_prefs.cc
+++ b/components/ssl_config/ssl_config_prefs.cc
@@ -12,8 +12,6 @@
 const char kCertRevocationCheckingRequiredLocalAnchors[] =
     "ssl.rev_checking.required_for_local_anchors";
 const char kCertEnableSha1LocalAnchors[] = "ssl.sha1_enabled_for_local_anchors";
-const char kCertEnableCommonNameFallbackLocalAnchors[] =
-    "ssl.common_name_fallback_enabled_for_local_anchors";
 const char kSSLVersionMin[] = "ssl.version_min";
 const char kSSLVersionMax[] = "ssl.version_max";
 const char kTLS13Variant[] = "ssl.tls13_variant";
diff --git a/components/ssl_config/ssl_config_prefs.h b/components/ssl_config/ssl_config_prefs.h
index 55121fc5..007d04a8 100644
--- a/components/ssl_config/ssl_config_prefs.h
+++ b/components/ssl_config/ssl_config_prefs.h
@@ -11,7 +11,6 @@
 extern const char kCertRevocationCheckingEnabled[];
 extern const char kCertRevocationCheckingRequiredLocalAnchors[];
 extern const char kCertEnableSha1LocalAnchors[];
-extern const char kCertEnableCommonNameFallbackLocalAnchors[];
 extern const char kSSLVersionMin[];
 extern const char kSSLVersionMax[];
 extern const char kTLS13Variant[];
diff --git a/components/ssl_config/ssl_config_service_manager_pref.cc b/components/ssl_config/ssl_config_service_manager_pref.cc
index 0d5c299..808f022 100644
--- a/components/ssl_config/ssl_config_service_manager_pref.cc
+++ b/components/ssl_config/ssl_config_service_manager_pref.cc
@@ -171,7 +171,6 @@
   BooleanPrefMember rev_checking_enabled_;
   BooleanPrefMember rev_checking_required_local_anchors_;
   BooleanPrefMember sha1_local_anchors_enabled_;
-  BooleanPrefMember common_name_fallback_local_anchors_enabled_;
   StringPrefMember ssl_version_min_;
   StringPrefMember ssl_version_max_;
   StringPrefMember tls13_variant_;
@@ -231,9 +230,6 @@
   sha1_local_anchors_enabled_.Init(
       ssl_config::prefs::kCertEnableSha1LocalAnchors, local_state,
       local_state_callback);
-  common_name_fallback_local_anchors_enabled_.Init(
-      ssl_config::prefs::kCertEnableCommonNameFallbackLocalAnchors, local_state,
-      local_state_callback);
   ssl_version_min_.Init(ssl_config::prefs::kSSLVersionMin, local_state,
                         local_state_callback);
   ssl_version_max_.Init(ssl_config::prefs::kSSLVersionMax, local_state,
@@ -263,8 +259,6 @@
       default_config.rev_checking_required_local_anchors);
   registry->RegisterBooleanPref(ssl_config::prefs::kCertEnableSha1LocalAnchors,
                                 false);
-  registry->RegisterBooleanPref(
-      ssl_config::prefs::kCertEnableCommonNameFallbackLocalAnchors, false);
   registry->RegisterStringPref(ssl_config::prefs::kSSLVersionMin,
                                std::string());
   registry->RegisterStringPref(ssl_config::prefs::kSSLVersionMax,
@@ -305,8 +299,6 @@
   config->rev_checking_required_local_anchors =
       rev_checking_required_local_anchors_.GetValue();
   config->sha1_local_anchors_enabled = sha1_local_anchors_enabled_.GetValue();
-  config->common_name_fallback_local_anchors_enabled =
-      common_name_fallback_local_anchors_enabled_.GetValue();
   std::string version_min_str = ssl_version_min_.GetValue();
   std::string version_max_str = ssl_version_max_.GetValue();
   std::string tls13_variant_str = tls13_variant_.GetValue();
diff --git a/components/toolbar/BUILD.gn b/components/toolbar/BUILD.gn
index bbcadbd5..88c9dfb 100644
--- a/components/toolbar/BUILD.gn
+++ b/components/toolbar/BUILD.gn
@@ -46,7 +46,6 @@
 
 static_library("toolbar") {
   sources = [
-    "features.h",
     "toolbar_model.h",
     "toolbar_model_delegate.h",
     "toolbar_model_impl.cc",
diff --git a/components/translate/core/browser/translate_infobar_delegate.cc b/components/translate/core/browser/translate_infobar_delegate.cc
index 0d38d200..6133d16 100644
--- a/components/translate/core/browser/translate_infobar_delegate.cc
+++ b/components/translate/core/browser/translate_infobar_delegate.cc
@@ -404,11 +404,6 @@
   DCHECK(translate_manager_);
 }
 
-infobars::InfoBarDelegate::Type
-TranslateInfoBarDelegate::GetInfoBarType() const {
-  return PAGE_ACTION_TYPE;
-}
-
 int TranslateInfoBarDelegate::GetIconId() const {
   return translate_manager_->translate_client()->GetInfobarIconID();
 }
diff --git a/components/translate/core/browser/translate_infobar_delegate.h b/components/translate/core/browser/translate_infobar_delegate.h
index 7c344de4..b2639b4 100644
--- a/components/translate/core/browser/translate_infobar_delegate.h
+++ b/components/translate/core/browser/translate_infobar_delegate.h
@@ -222,7 +222,6 @@
   typedef std::pair<std::string, base::string16> LanguageNamePair;
 
   // InfoBarDelegate:
-  Type GetInfoBarType() const override;
   infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override;
   int GetIconId() const override;
   void InfoBarDismissed() override;
diff --git a/components/viz/common/features.cc b/components/viz/common/features.cc
index b983d6f..b9c31b9 100644
--- a/components/viz/common/features.cc
+++ b/components/viz/common/features.cc
@@ -30,4 +30,11 @@
          base::FeatureList::IsEnabled(kVizDisplayCompositor);
 }
 
+bool IsVizHitTestingEnabled() {
+  // TODO(riajiang): Check feature flag as well. https://crbug.com/804888
+  return base::CommandLine::ForCurrentProcess()->HasSwitch(
+             switches::kUseVizHitTest) ||
+         base::FeatureList::IsEnabled(kVizDisplayCompositor);
+}
+
 }  // namespace features
diff --git a/components/viz/common/features.h b/components/viz/common/features.h
index cf40a47..b449870f 100644
--- a/components/viz/common/features.h
+++ b/components/viz/common/features.h
@@ -15,6 +15,7 @@
 VIZ_COMMON_EXPORT extern const base::Feature kVizDisplayCompositor;
 
 VIZ_COMMON_EXPORT bool IsSurfaceSynchronizationEnabled();
+VIZ_COMMON_EXPORT bool IsVizHitTestingEnabled();
 
 }  // namespace features
 
diff --git a/components/viz/common/switches.cc b/components/viz/common/switches.cc
index 5f911d8..30ec467 100644
--- a/components/viz/common/switches.cc
+++ b/components/viz/common/switches.cc
@@ -24,6 +24,9 @@
 // by the parent compositor.
 const char kEnableSurfaceSynchronization[] = "enable-surface-synchronization";
 
+// Enables the viz hit-test logic (HitTestAggregator and HitTestQuery).
+const char kUseVizHitTest[] = "use-viz-hit-test";
+
 uint32_t GetDeadlineToSynchronizeSurfaces() {
   std::string deadline_to_synchronize_surfaces_string =
       base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
diff --git a/components/viz/common/switches.h b/components/viz/common/switches.h
index 508d753..1510b95f 100644
--- a/components/viz/common/switches.h
+++ b/components/viz/common/switches.h
@@ -15,6 +15,7 @@
 // Keep list in alphabetical order.
 VIZ_COMMON_EXPORT extern const char kDeadlineToSynchronizeSurfaces[];
 VIZ_COMMON_EXPORT extern const char kEnableSurfaceSynchronization[];
+VIZ_COMMON_EXPORT extern const char kUseVizHitTest[];
 
 VIZ_COMMON_EXPORT uint32_t GetDeadlineToSynchronizeSurfaces();
 
diff --git a/content/app/strings/content_strings.grd b/content/app/strings/content_strings.grd
index c946d09..3dfb3655 100644
--- a/content/app/strings/content_strings.grd
+++ b/content/app/strings/content_strings.grd
@@ -341,9 +341,6 @@
         <message name="IDS_AX_ROLE_BUTTON" desc="Accessibility role description for a button">
           button
         </message>
-        <message name="IDS_AX_ROLE_BUTTON_DROP_DOWN" desc="Accessibility role description for a button that drops down">
-          drop down button
-        </message>
         <message name="IDS_AX_ROLE_CELL" desc="Accessibility role description for a cell, like in a table or grid">
           cell
         </message>
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
index bab78bca..7fc9f7f 100644
--- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -99,7 +99,6 @@
     "//media",
     "//media:media_features",
     "//media/capture",
-    "//media/capture/mojo:image_capture",
     "//media/midi",
     "//media/midi:mojo",
     "//media/mojo:features",
diff --git a/content/browser/accessibility/accessibility_event_recorder_win.cc b/content/browser/accessibility/accessibility_event_recorder_win.cc
index 3f0e57f..e57484a 100644
--- a/content/browser/accessibility/accessibility_event_recorder_win.cc
+++ b/content/browser/accessibility/accessibility_event_recorder_win.cc
@@ -240,11 +240,34 @@
   AccessibleStates ia2_state = 0;
   Microsoft::WRL::ComPtr<IAccessible2> iaccessible2;
   hr = QueryIAccessible2(iaccessible.Get(), iaccessible2.GetAddressOf());
-  if (SUCCEEDED(hr))
-    iaccessible2->get_states(&ia2_state);
 
-  std::string log = base::StringPrintf(
-      "%s on role=%s", event_str.c_str(), RoleVariantToString(role).c_str());
+  base::string16 html_tag;
+  base::string16 html_id;
+
+  if (SUCCEEDED(hr)) {
+    iaccessible2->get_states(&ia2_state);
+    base::win::ScopedBstr attributes_bstr;
+    if (S_OK == iaccessible2->get_attributes(attributes_bstr.Receive())) {
+      std::vector<base::string16> ia2_attributes = base::SplitString(
+          base::string16(attributes_bstr, attributes_bstr.Length()),
+          base::string16(1, ';'), base::KEEP_WHITESPACE, base::SPLIT_WANT_ALL);
+      for (base::string16& attr : ia2_attributes) {
+        if (base::StringPiece16(attr).starts_with(L"id:")) {
+          html_id = base::string16(L"#");
+          html_id += attr.substr(3);
+        }
+        if (base::StringPiece16(attr).starts_with(L"tag:")) {
+          html_tag = attr.substr(4);
+        }
+      }
+    }
+  }
+
+  std::string log = base::StringPrintf("%s on", event_str.c_str());
+  if (!html_tag.empty())
+    log += base::StringPrintf(" <%s%s>", base::UTF16ToUTF8(html_tag).c_str(),
+                              base::UTF16ToUTF8(html_id).c_str());
+  log += base::StringPrintf(" role=%s", RoleVariantToString(role).c_str());
   if (name_bstr.Length() > 0)
     log += base::StringPrintf(" name=\"%s\"", BstrToUTF8(name_bstr).c_str());
   if (value_bstr.Length() > 0)
diff --git a/content/browser/accessibility/accessibility_win_browsertest.cc b/content/browser/accessibility/accessibility_win_browsertest.cc
index bcc2aebf..36d1e62 100644
--- a/content/browser/accessibility/accessibility_win_browsertest.cc
+++ b/content/browser/accessibility/accessibility_win_browsertest.cc
@@ -2205,7 +2205,7 @@
   BrowserAccessibilityManager* manager =
       web_contents->GetRootBrowserAccessibilityManager();
   NativeWinEventWaiter win_event_waiter(
-      manager, "EVENT_OBJECT_FOCUS on role=ROLE_SYSTEM_TEXT*");
+      manager, "EVENT_OBJECT_FOCUS on <input> role=ROLE_SYSTEM_TEXT*");
 
   // Get the root accessible element and its children.
   Microsoft::WRL::ComPtr<IAccessible> document(GetRendererAccessible());
diff --git a/content/browser/accessibility/browser_accessibility_android.cc b/content/browser/accessibility/browser_accessibility_android.cc
index 4bace86..41601411 100644
--- a/content/browser/accessibility/browser_accessibility_android.cc
+++ b/content/browser/accessibility/browser_accessibility_android.cc
@@ -502,9 +502,6 @@
     case ui::AX_ROLE_BUTTON:
       message_id = IDS_AX_ROLE_BUTTON;
       break;
-    case ui::AX_ROLE_BUTTON_DROP_DOWN:
-      message_id = IDS_AX_ROLE_BUTTON_DROP_DOWN;
-      break;
     case ui::AX_ROLE_CANVAS:
       // No role description.
       break;
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
index e65679a..9ff73dc 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -663,8 +663,7 @@
 int BrowserMainLoop::EarlyInitialization() {
   TRACE_EVENT0("startup", "BrowserMainLoop::EarlyInitialization");
 
-#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && \
-    !defined(OS_FUCHSIA)
+#if BUILDFLAG(USE_ZYGOTE_HANDLE)
   // No thread should be created before this call, as SetupSandbox()
   // will end-up using fork().
   SetupSandbox(parsed_command_line_);
diff --git a/content/browser/browser_plugin/browser_plugin_guest.cc b/content/browser/browser_plugin/browser_plugin_guest.cc
index af60603..b34597f 100644
--- a/content/browser/browser_plugin/browser_plugin_guest.cc
+++ b/content/browser/browser_plugin/browser_plugin_guest.cc
@@ -27,6 +27,7 @@
 #include "content/browser/frame_host/render_widget_host_view_guest.h"
 #include "content/browser/loader/resource_dispatcher_host_impl.h"
 #include "content/browser/mus_util.h"
+#include "content/browser/renderer_host/cursor_manager.h"
 #include "content/browser/renderer_host/render_view_host_impl.h"
 #include "content/browser/renderer_host/render_widget_host_impl.h"
 #include "content/browser/renderer_host/render_widget_host_view_base.h"
@@ -853,8 +854,13 @@
       static_cast<RenderWidgetHostViewChildFrame*>(
           web_contents()->GetRenderWidgetHostView());
   // If the guest is terminated, our host may already be gone.
-  if (rwhv)
+  if (rwhv) {
     rwhv->UnregisterFrameSinkId();
+    RenderWidgetHostViewBase* root_view =
+        RenderWidgetHostViewGuest::GetRootView(rwhv);
+    if (root_view)
+      root_view->GetCursorManager()->ViewBeingDestroyed(rwhv);
+  }
 
   delegate_->DidDetach();
 }
diff --git a/content/browser/devtools/browser_devtools_agent_host.cc b/content/browser/devtools/browser_devtools_agent_host.cc
index bf913c6..6475584 100644
--- a/content/browser/devtools/browser_devtools_agent_host.cc
+++ b/content/browser/devtools/browser_devtools_agent_host.cc
@@ -50,7 +50,8 @@
 
 void BrowserDevToolsAgentHost::AttachSession(DevToolsSession* session) {
   session->SetBrowserOnly(true);
-  session->AddHandler(base::WrapUnique(new protocol::TargetHandler()));
+  session->AddHandler(
+      base::WrapUnique(new protocol::TargetHandler(true /* browser_only */)));
   if (only_discovery_)
     return;
 
diff --git a/content/browser/devtools/protocol/target_handler.cc b/content/browser/devtools/protocol/target_handler.cc
index bdcbf7f..8c6dbc0 100644
--- a/content/browser/devtools/protocol/target_handler.cc
+++ b/content/browser/devtools/protocol/target_handler.cc
@@ -185,12 +185,13 @@
   }
 }
 
-TargetHandler::TargetHandler()
+TargetHandler::TargetHandler(bool browser_only)
     : DevToolsDomainHandler(Target::Metainfo::domainName),
       auto_attacher_(
           base::Bind(&TargetHandler::AutoAttach, base::Unretained(this)),
           base::Bind(&TargetHandler::AutoDetach, base::Unretained(this))),
       discover_(false),
+      browser_only_(browser_only),
       weak_factory_(this) {}
 
 TargetHandler::~TargetHandler() {
@@ -262,6 +263,7 @@
                                     Session** session,
                                     bool fall_through) {
   *session = nullptr;
+  fall_through &= !browser_only_;
   if (session_id.isJust()) {
     auto it = attached_sessions_.find(session_id.fromJust());
     if (it == attached_sessions_.end()) {
@@ -312,7 +314,7 @@
   auto_attacher_.SetAutoAttach(auto_attach, wait_for_debugger_on_start);
   if (!auto_attacher_.ShouldThrottleFramesNavigation())
     ClearThrottles();
-  return Response::FallThrough();
+  return browser_only_ ? Response::OK() : Response::FallThrough();
 }
 
 Response TargetHandler::SetAttachToFrames(bool value) {
diff --git a/content/browser/devtools/protocol/target_handler.h b/content/browser/devtools/protocol/target_handler.h
index 21adcd6..c0a83a6 100644
--- a/content/browser/devtools/protocol/target_handler.h
+++ b/content/browser/devtools/protocol/target_handler.h
@@ -28,7 +28,7 @@
                       public Target::Backend,
                       public DevToolsAgentHostObserver {
  public:
-  TargetHandler();
+  explicit TargetHandler(bool browser_only);
   ~TargetHandler() override;
 
   static std::vector<TargetHandler*> ForAgentHost(DevToolsAgentHostImpl* host);
@@ -103,6 +103,7 @@
   std::map<DevToolsAgentHost*, Session*> auto_attached_sessions_;
   std::set<DevToolsAgentHost*> reported_hosts_;
   int last_session_id_ = 0;
+  bool browser_only_;
   base::flat_set<Throttle*> throttles_;
   base::WeakPtrFactory<TargetHandler> weak_factory_;
 
diff --git a/content/browser/devtools/render_frame_devtools_agent_host.cc b/content/browser/devtools/render_frame_devtools_agent_host.cc
index f8ac27b..acbddb51 100644
--- a/content/browser/devtools/render_frame_devtools_agent_host.cc
+++ b/content/browser/devtools/render_frame_devtools_agent_host.cc
@@ -309,7 +309,8 @@
   session->AddHandler(base::WrapUnique(new protocol::SchemaHandler()));
   session->AddHandler(base::WrapUnique(new protocol::ServiceWorkerHandler()));
   session->AddHandler(base::WrapUnique(new protocol::StorageHandler()));
-  session->AddHandler(base::WrapUnique(new protocol::TargetHandler()));
+  session->AddHandler(
+      base::WrapUnique(new protocol::TargetHandler(false /* browser_only */)));
   session->AddHandler(base::WrapUnique(new protocol::TracingHandler(
       protocol::TracingHandler::Renderer,
       frame_tree_node_ ? frame_tree_node_->frame_tree_node_id() : 0,
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index 45e30e6..159ec01 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -3487,7 +3487,7 @@
     GetNavigationControl()->CommitNavigation(
         network::ResourceResponseHead(), GURL(), common_params, request_params,
         network::mojom::URLLoaderClientEndpointsPtr(),
-        /*subresource_loader_factories=*/base::nullopt,
+        /*subresource_loader_factories=*/nullptr,
         /*controller_service_worker=*/nullptr, devtools_navigation_token);
     return;
   }
@@ -3511,16 +3511,17 @@
   const bool is_same_document =
       FrameMsg_Navigate_Type::IsSameDocument(common_params.navigation_type);
 
-  base::Optional<URLLoaderFactoryBundle> subresource_loader_factories;
+  std::unique_ptr<URLLoaderFactoryBundleInfo> subresource_loader_factories;
   mojom::ControllerServiceWorkerInfoPtr controller_service_worker_info;
   if (base::FeatureList::IsEnabled(features::kNetworkService) &&
       (!is_same_document || is_first_navigation)) {
-    subresource_loader_factories.emplace();
+    subresource_loader_factories =
+        std::make_unique<URLLoaderFactoryBundleInfo>();
     // NOTE: On Network Service navigations, we want to ensure that a frame is
     // given everything it will need to load any accessible subresources. We
     // however only do this for cross-document navigations, because the
     // alternative would be redundant effort.
-    network::mojom::URLLoaderFactoryPtr default_factory;
+    network::mojom::URLLoaderFactoryPtrInfo default_factory_info;
     StoragePartitionImpl* storage_partition =
         static_cast<StoragePartitionImpl*>(BrowserContext::GetStoragePartition(
             GetSiteInstance()->GetBrowserContext(), GetSiteInstance()));
@@ -3528,8 +3529,8 @@
         subresource_loader_params->loader_factory_info.is_valid()) {
       // If the caller has supplied a default URLLoaderFactory override (for
       // e.g. appcache, Service Worker, etc.), use that.
-      default_factory.Bind(
-          std::move(subresource_loader_params->loader_factory_info));
+      default_factory_info =
+          std::move(subresource_loader_params->loader_factory_info);
     } else {
       std::string scheme = common_params.url.scheme();
       const auto& schemes = URLDataManagerBackend::GetWebUISchemes();
@@ -3539,41 +3540,41 @@
         if (enabled_bindings_ & BINDINGS_POLICY_WEB_UI) {
           // If the renderer has webui bindings, then don't give it access to
           // network loader for security reasons.
-          default_factory = std::move(factory_for_webui);
+          default_factory_info = factory_for_webui.PassInterface();
         } else {
           // This is a webui scheme that doesn't have webui bindings. Give it
           // access to the network loader as it might require it.
-          subresource_loader_factories->RegisterFactory(
-              scheme, std::move(factory_for_webui));
+          subresource_loader_factories->factories_info().emplace(
+              scheme, factory_for_webui.PassInterface());
         }
       }
     }
 
-    if (!default_factory.is_bound()) {
+    if (!default_factory_info) {
       // Otherwise default to a Network Service-backed loader from the
       // appropriate NetworkContext.
       if (g_url_loader_factory_callback_for_test.Get().is_null()) {
         storage_partition->GetNetworkContext()->CreateURLLoaderFactory(
-            mojo::MakeRequest(&default_factory), GetProcess()->GetID());
+            mojo::MakeRequest(&default_factory_info), GetProcess()->GetID());
       } else {
         network::mojom::URLLoaderFactoryPtr original_factory;
         storage_partition->GetNetworkContext()->CreateURLLoaderFactory(
             mojo::MakeRequest(&original_factory), GetProcess()->GetID());
         g_url_loader_factory_callback_for_test.Get().Run(
-            mojo::MakeRequest(&default_factory), GetProcess()->GetID(),
+            mojo::MakeRequest(&default_factory_info), GetProcess()->GetID(),
             original_factory.PassInterface());
       }
     }
 
-    DCHECK(default_factory.is_bound());
-    subresource_loader_factories->SetDefaultFactory(std::move(default_factory));
-
+    DCHECK(default_factory_info);
+    subresource_loader_factories->default_factory_info() =
+        std::move(default_factory_info);
     // Everyone gets a blob loader.
-    network::mojom::URLLoaderFactoryPtr blob_factory;
+    network::mojom::URLLoaderFactoryPtrInfo blob_factory_info;
     storage_partition->GetBlobURLLoaderFactory()->HandleRequest(
-        mojo::MakeRequest(&blob_factory));
-    subresource_loader_factories->RegisterFactory(url::kBlobScheme,
-                                                  std::move(blob_factory));
+        mojo::MakeRequest(&blob_factory_info));
+    subresource_loader_factories->factories_info().emplace(
+        url::kBlobScheme, std::move(blob_factory_info));
 
     non_network_url_loader_factories_.clear();
 
@@ -3594,10 +3595,10 @@
             this, common_params.url, &non_network_url_loader_factories_);
 
     for (auto& factory : non_network_url_loader_factories_) {
-      network::mojom::URLLoaderFactoryPtr factory_proxy;
-      factory.second->Clone(mojo::MakeRequest(&factory_proxy));
-      subresource_loader_factories->RegisterFactory(factory.first,
-                                                    std::move(factory_proxy));
+      network::mojom::URLLoaderFactoryPtrInfo factory_proxy_info;
+      factory.second->Clone(mojo::MakeRequest(&factory_proxy_info));
+      subresource_loader_factories->factories_info().emplace(
+          factory.first, std::move(factory_proxy_info));
     }
 
     // Pass the controller service worker info if we have one.
@@ -3611,7 +3612,7 @@
   // subresource ULFs when the Network Service is enabled.
   DCHECK(!base::FeatureList::IsEnabled(features::kNetworkService) ||
          is_same_document || !is_first_navigation ||
-         subresource_loader_factories.has_value());
+         subresource_loader_factories);
 
   GetNavigationControl()->CommitNavigation(
       head, body_url, common_params, request_params,
@@ -3662,22 +3663,23 @@
       static_cast<StoragePartitionImpl*>(BrowserContext::GetStoragePartition(
           GetSiteInstance()->GetBrowserContext(), GetSiteInstance()));
 
-  network::mojom::URLLoaderFactoryPtr default_factory;
+  network::mojom::URLLoaderFactoryPtrInfo default_factory_info;
   if (g_url_loader_factory_callback_for_test.Get().is_null()) {
     storage_partition->GetNetworkContext()->CreateURLLoaderFactory(
-        mojo::MakeRequest(&default_factory), GetProcess()->GetID());
+        mojo::MakeRequest(&default_factory_info), GetProcess()->GetID());
   } else {
     network::mojom::URLLoaderFactoryPtr original_factory;
     storage_partition->GetNetworkContext()->CreateURLLoaderFactory(
         mojo::MakeRequest(&original_factory), GetProcess()->GetID());
     g_url_loader_factory_callback_for_test.Get().Run(
-        mojo::MakeRequest(&default_factory), GetProcess()->GetID(),
+        mojo::MakeRequest(&default_factory_info), GetProcess()->GetID(),
         original_factory.PassInterface());
   }
 
-  base::Optional<URLLoaderFactoryBundle> subresource_loader_factories;
-  subresource_loader_factories.emplace();
-  subresource_loader_factories->SetDefaultFactory(std::move(default_factory));
+  auto subresource_loader_factories =
+      std::make_unique<URLLoaderFactoryBundleInfo>(
+          std::move(default_factory_info),
+          std::map<std::string, network::mojom::URLLoaderFactoryPtrInfo>());
 
   GetNavigationControl()->CommitFailedNavigation(
       common_params, request_params, has_stale_copy_in_cache, error_code,
diff --git a/content/browser/frame_host/render_widget_host_view_guest.cc b/content/browser/frame_host/render_widget_host_view_guest.cc
index a8a9262..e586842de 100644
--- a/content/browser/frame_host/render_widget_host_view_guest.cc
+++ b/content/browser/frame_host/render_widget_host_view_guest.cc
@@ -19,6 +19,7 @@
 #include "content/browser/browser_plugin/browser_plugin_guest.h"
 #include "content/browser/compositor/surface_utils.h"
 #include "content/browser/mus_util.h"
+#include "content/browser/renderer_host/cursor_manager.h"
 #include "content/browser/renderer_host/input/input_router.h"
 #include "content/browser/renderer_host/render_view_host_impl.h"
 #include "content/browser/renderer_host/render_widget_host_delegate.h"
@@ -80,6 +81,26 @@
   return view;
 }
 
+// static
+RenderWidgetHostViewBase* RenderWidgetHostViewGuest::GetRootView(
+    RenderWidgetHostViewBase* rwhv) {
+  // If we're a pdf in a WebView, we could have nested guest views here.
+  while (rwhv && rwhv->IsRenderWidgetHostViewGuest()) {
+    rwhv = static_cast<RenderWidgetHostViewGuest*>(rwhv)
+               ->GetOwnerRenderWidgetHostView();
+  }
+  if (!rwhv)
+    return nullptr;
+
+  // We could be a guest inside an oopif frame, in which case we're not the
+  // root.
+  if (rwhv->IsRenderWidgetHostViewChildFrame()) {
+    rwhv = static_cast<RenderWidgetHostViewChildFrame*>(rwhv)
+               ->GetRootRenderWidgetHostView();
+  }
+  return rwhv;
+}
+
 RenderWidgetHostViewGuest::RenderWidgetHostViewGuest(
     RenderWidgetHost* widget_host,
     BrowserPluginGuest* guest,
@@ -229,28 +250,6 @@
   return GetViewBounds();
 }
 
-namespace {
-
-RenderWidgetHostViewBase* GetRootView(RenderWidgetHostViewBase* rwhv) {
-  // If we're a pdf in a WebView, we could have nested guest views here.
-  while (rwhv && rwhv->IsRenderWidgetHostViewGuest()) {
-    rwhv = static_cast<RenderWidgetHostViewGuest*>(rwhv)
-               ->GetOwnerRenderWidgetHostView();
-  }
-  if (!rwhv)
-    return nullptr;
-
-  // We could be a guest inside an oopif frame, in which case we're not the
-  // root.
-  if (rwhv->IsRenderWidgetHostViewChildFrame()) {
-    rwhv = static_cast<RenderWidgetHostViewChildFrame*>(rwhv)
-               ->GetRootRenderWidgetHostView();
-  }
-  return rwhv;
-}
-
-}  // namespace
-
 gfx::PointF RenderWidgetHostViewGuest::TransformPointToRootCoordSpaceF(
     const gfx::PointF& point) {
   if (!guest_ || !last_received_local_surface_id_.is_valid())
@@ -329,6 +328,10 @@
   if (platform_view_)  // The platform view might have been destroyed already.
     platform_view_->Destroy();
 
+  RenderWidgetHostViewBase* root_view = GetRootView(this);
+  if (root_view)
+    root_view->GetCursorManager()->ViewBeingDestroyed(this);
+
   // RenderWidgetHostViewChildFrame::Destroy destroys this object.
   RenderWidgetHostViewChildFrame::Destroy();
 }
@@ -457,9 +460,9 @@
   // and so we will always hit this code path.
   if (!guest_)
     return;
-  RenderWidgetHostViewBase* rwhvb = GetOwnerRenderWidgetHostView();
-  if (rwhvb)
-    rwhvb->UpdateCursor(cursor);
+  RenderWidgetHostViewBase* rwhvb = GetRootView(this);
+  if (rwhvb && rwhvb->GetCursorManager())
+    rwhvb->GetCursorManager()->UpdateCursor(this, cursor);
 }
 
 void RenderWidgetHostViewGuest::SetIsLoading(bool is_loading) {
diff --git a/content/browser/frame_host/render_widget_host_view_guest.h b/content/browser/frame_host/render_widget_host_view_guest.h
index 3d095bf..71c9247 100644
--- a/content/browser/frame_host/render_widget_host_view_guest.h
+++ b/content/browser/frame_host/render_widget_host_view_guest.h
@@ -52,6 +52,8 @@
       RenderWidgetHost* widget,
       BrowserPluginGuest* guest,
       base::WeakPtr<RenderWidgetHostViewBase> platform_view);
+  static RenderWidgetHostViewBase* GetRootView(RenderWidgetHostViewBase* rwhv);
+
   ~RenderWidgetHostViewGuest() override;
 
   bool OnMessageReceivedFromEmbedder(const IPC::Message& message,
diff --git a/content/browser/renderer_host/media/video_capture_controller.cc b/content/browser/renderer_host/media/video_capture_controller.cc
index 66487ed..f132e622 100644
--- a/content/browser/renderer_host/media/video_capture_controller.cc
+++ b/content/browser/renderer_host/media/video_capture_controller.cc
@@ -19,10 +19,10 @@
 #include "components/viz/common/gl_helper.h"
 #include "content/browser/renderer_host/media/media_stream_manager.h"
 #include "content/browser/renderer_host/media/video_capture_manager.h"
-#include "content/common/video_capture.mojom.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/common/content_switches.h"
 #include "media/base/video_frame.h"
+#include "media/capture/mojo/video_capture_types.mojom.h"
 #include "media/capture/video/video_capture_buffer_pool.h"
 #include "media/capture/video/video_capture_buffer_tracker_factory_impl.h"
 #include "media/capture/video/video_capture_device_client.h"
diff --git a/content/browser/renderer_host/media/video_capture_controller_event_handler.h b/content/browser/renderer_host/media/video_capture_controller_event_handler.h
index f54fa1d..a11d54fe 100644
--- a/content/browser/renderer_host/media/video_capture_controller_event_handler.h
+++ b/content/browser/renderer_host/media/video_capture_controller_event_handler.h
@@ -9,7 +9,7 @@
 
 #include "base/memory/shared_memory.h"
 #include "content/common/content_export.h"
-#include "content/common/video_capture.mojom.h"
+#include "media/capture/mojo/video_capture_types.mojom.h"
 #include "mojo/public/cpp/system/buffer.h"
 #include "ui/gfx/geometry/size.h"
 
diff --git a/content/browser/renderer_host/media/video_capture_host.cc b/content/browser/renderer_host/media/video_capture_host.cc
index 2021291..a7f9923f 100644
--- a/content/browser/renderer_host/media/video_capture_host.cc
+++ b/content/browser/renderer_host/media/video_capture_host.cc
@@ -75,7 +75,7 @@
 // static
 void VideoCaptureHost::Create(uint32_t render_process_id,
                               MediaStreamManager* media_stream_manager,
-                              mojom::VideoCaptureHostRequest request) {
+                              media::mojom::VideoCaptureHostRequest request) {
   DVLOG(1) << __func__;
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
   mojo::MakeStrongBinding(std::make_unique<VideoCaptureHost>(
@@ -170,7 +170,7 @@
 
   if (base::ContainsKey(device_id_to_observer_map_, controller_id)) {
     device_id_to_observer_map_[controller_id]->OnStateChanged(
-        mojom::VideoCaptureState::STARTED);
+        media::mojom::VideoCaptureState::STARTED);
     NotifyStreamAdded();
   }
 }
@@ -180,7 +180,7 @@
 void VideoCaptureHost::Start(int32_t device_id,
                              int32_t session_id,
                              const media::VideoCaptureParams& params,
-                             mojom::VideoCaptureObserverPtr observer) {
+                             media::mojom::VideoCaptureObserverPtr observer) {
   DVLOG(1) << __func__ << " session_id=" << session_id
            << ", device_id=" << device_id << ", format="
            << media::VideoCaptureFormat::ToString(params.requested_format);
@@ -192,7 +192,7 @@
   const VideoCaptureControllerID controller_id(device_id);
   if (controllers_.find(controller_id) != controllers_.end()) {
     device_id_to_observer_map_[device_id]->OnStateChanged(
-        mojom::VideoCaptureState::STARTED);
+        media::mojom::VideoCaptureState::STARTED);
     NotifyStreamAdded();
     return;
   }
@@ -212,7 +212,7 @@
 
   if (base::ContainsKey(device_id_to_observer_map_, device_id)) {
     device_id_to_observer_map_[device_id]->OnStateChanged(
-        mojom::VideoCaptureState::STOPPED);
+        media::mojom::VideoCaptureState::STOPPED);
   }
   device_id_to_observer_map_.erase(controller_id);
 
@@ -233,7 +233,7 @@
       it->second.get(), controller_id, this);
   if (base::ContainsKey(device_id_to_observer_map_, device_id)) {
     device_id_to_observer_map_[device_id]->OnStateChanged(
-        mojom::VideoCaptureState::PAUSED);
+        media::mojom::VideoCaptureState::PAUSED);
   }
 }
 
@@ -252,7 +252,7 @@
       session_id, params, it->second.get(), controller_id, this);
   if (base::ContainsKey(device_id_to_observer_map_, device_id)) {
     device_id_to_observer_map_[device_id]->OnStateChanged(
-        mojom::VideoCaptureState::RESUMED);
+        media::mojom::VideoCaptureState::RESUMED);
   }
 }
 
@@ -324,7 +324,7 @@
 
   if (base::ContainsKey(device_id_to_observer_map_, controller_id)) {
     device_id_to_observer_map_[controller_id]->OnStateChanged(
-        mojom::VideoCaptureState::FAILED);
+        media::mojom::VideoCaptureState::FAILED);
   }
 
   DeleteVideoCaptureController(controller_id, true);
@@ -339,7 +339,7 @@
 
   if (base::ContainsKey(device_id_to_observer_map_, controller_id)) {
     device_id_to_observer_map_[controller_id]->OnStateChanged(
-        mojom::VideoCaptureState::ENDED);
+        media::mojom::VideoCaptureState::ENDED);
   }
 
   DeleteVideoCaptureController(controller_id, false);
@@ -363,7 +363,7 @@
   if (!controller) {
     if (base::ContainsKey(device_id_to_observer_map_, controller_id)) {
       device_id_to_observer_map_[device_id]->OnStateChanged(
-          mojom::VideoCaptureState::FAILED);
+          media::mojom::VideoCaptureState::FAILED);
     }
     controllers_.erase(controller_id);
     return;
diff --git a/content/browser/renderer_host/media/video_capture_host.h b/content/browser/renderer_host/media/video_capture_host.h
index 8539fdb..5c422624 100644
--- a/content/browser/renderer_host/media/video_capture_host.h
+++ b/content/browser/renderer_host/media/video_capture_host.h
@@ -14,7 +14,7 @@
 #include "content/browser/renderer_host/media/video_capture_controller.h"
 #include "content/browser/renderer_host/media/video_capture_controller_event_handler.h"
 #include "content/common/content_export.h"
-#include "content/common/video_capture.mojom.h"
+#include "media/capture/mojo/video_capture.mojom.h"
 
 namespace content {
 class MediaStreamManager;
@@ -26,7 +26,7 @@
 // unique |device_id|, and is paired with a single VideoCaptureController.
 class CONTENT_EXPORT VideoCaptureHost
     : public VideoCaptureControllerEventHandler,
-      public mojom::VideoCaptureHost {
+      public media::mojom::VideoCaptureHost {
  public:
   VideoCaptureHost(uint32_t render_process_id,
                    MediaStreamManager* media_stream_manager);
@@ -37,7 +37,7 @@
 
   static void Create(uint32_t render_process_id,
                      MediaStreamManager* media_stream_manager,
-                     mojom::VideoCaptureHostRequest request);
+                     media::mojom::VideoCaptureHostRequest request);
 
   // Interface for notifying RenderProcessHost instance about active video
   // capture stream changes.
@@ -68,11 +68,11 @@
   void OnStarted(VideoCaptureControllerID id) override;
   void OnStartedUsingGpuDecode(VideoCaptureControllerID id) override;
 
-  // mojom::VideoCaptureHost implementation
+  // media::mojom::VideoCaptureHost implementation
   void Start(int32_t device_id,
              int32_t session_id,
              const media::VideoCaptureParams& params,
-             mojom::VideoCaptureObserverPtr observer) override;
+             media::mojom::VideoCaptureObserverPtr observer) override;
   void Stop(int32_t device_id) override;
   void Pause(int32_t device_id) override;
   void Resume(int32_t device_id,
@@ -122,7 +122,8 @@
 
   // VideoCaptureObservers map, each one is used and should be valid between
   // Start() and the corresponding Stop().
-  std::map<int32_t, mojom::VideoCaptureObserverPtr> device_id_to_observer_map_;
+  std::map<int32_t, media::mojom::VideoCaptureObserverPtr>
+      device_id_to_observer_map_;
 
   base::WeakPtrFactory<VideoCaptureHost> weak_factory_;
 
diff --git a/content/browser/renderer_host/media/video_capture_unittest.cc b/content/browser/renderer_host/media/video_capture_unittest.cc
index f4628ae2..72eb952a 100644
--- a/content/browser/renderer_host/media/video_capture_unittest.cc
+++ b/content/browser/renderer_host/media/video_capture_unittest.cc
@@ -86,7 +86,7 @@
 // MediaStreamManager, VideoCaptureManager, VideoCaptureController, and
 // VideoCaptureDevice.
 class VideoCaptureTest : public testing::Test,
-                         public mojom::VideoCaptureObserver {
+                         public media::mojom::VideoCaptureObserver {
  public:
   VideoCaptureTest()
       : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP),
@@ -175,8 +175,8 @@
   }
 
  protected:
-  // mojom::VideoCaptureObserver implementation.
-  MOCK_METHOD1(OnStateChanged, void(mojom::VideoCaptureState));
+  // media::mojom::VideoCaptureObserver implementation.
+  MOCK_METHOD1(OnStateChanged, void(media::mojom::VideoCaptureState));
   void OnBufferCreated(int32_t buffer_id,
                        mojo::ScopedSharedBufferHandle handle) override {
     DoOnBufferCreated(buffer_id);
@@ -195,7 +195,8 @@
     params.requested_format = media::VideoCaptureFormat(
         gfx::Size(352, 288), 30, media::PIXEL_FORMAT_I420);
 
-    EXPECT_CALL(*this, OnStateChanged(mojom::VideoCaptureState::STARTED));
+    EXPECT_CALL(*this,
+                OnStateChanged(media::mojom::VideoCaptureState::STARTED));
     EXPECT_CALL(*this, DoOnBufferCreated(_))
         .Times(AnyNumber())
         .WillRepeatedly(Return());
@@ -203,7 +204,7 @@
         .Times(AnyNumber())
         .WillRepeatedly(ExitMessageLoop(task_runner_, run_loop.QuitClosure()));
 
-    mojom::VideoCaptureObserverPtr observer;
+    media::mojom::VideoCaptureObserverPtr observer;
     observer_binding_.Bind(mojo::MakeRequest(&observer));
     host_->Start(kDeviceId, opened_session_id_, params, std::move(observer));
 
@@ -222,13 +223,14 @@
 
     // |STARTED| is reported asynchronously, which may not be received if
     // capture is stopped immediately.
-    EXPECT_CALL(*this, OnStateChanged(mojom::VideoCaptureState::STARTED))
+    EXPECT_CALL(*this, OnStateChanged(media::mojom::VideoCaptureState::STARTED))
         .Times(AtMost(1));
-    mojom::VideoCaptureObserverPtr observer;
+    media::mojom::VideoCaptureObserverPtr observer;
     observer_binding_.Bind(mojo::MakeRequest(&observer));
     host_->Start(kDeviceId, opened_session_id_, params, std::move(observer));
 
-    EXPECT_CALL(*this, OnStateChanged(mojom::VideoCaptureState::STOPPED));
+    EXPECT_CALL(*this,
+                OnStateChanged(media::mojom::VideoCaptureState::STOPPED));
     host_->Stop(kDeviceId);
     run_loop.RunUntilIdle();
   }
@@ -237,14 +239,15 @@
     InSequence s;
     base::RunLoop run_loop;
 
-    EXPECT_CALL(*this, OnStateChanged(mojom::VideoCaptureState::PAUSED));
+    EXPECT_CALL(*this, OnStateChanged(media::mojom::VideoCaptureState::PAUSED));
     host_->Pause(kDeviceId);
 
     media::VideoCaptureParams params;
     params.requested_format = media::VideoCaptureFormat(
         gfx::Size(352, 288), 30, media::PIXEL_FORMAT_I420);
 
-    EXPECT_CALL(*this, OnStateChanged(mojom::VideoCaptureState::RESUMED));
+    EXPECT_CALL(*this,
+                OnStateChanged(media::mojom::VideoCaptureState::RESUMED));
     host_->Resume(kDeviceId, opened_session_id_, params);
     run_loop.RunUntilIdle();
   }
@@ -252,7 +255,7 @@
   void StopCapture() {
     base::RunLoop run_loop;
 
-    EXPECT_CALL(*this, OnStateChanged(mojom::VideoCaptureState::STOPPED))
+    EXPECT_CALL(*this, OnStateChanged(media::mojom::VideoCaptureState::STOPPED))
         .WillOnce(ExitMessageLoop(task_runner_, run_loop.QuitClosure()));
     host_->Stop(kDeviceId);
 
@@ -272,7 +275,7 @@
   }
 
   void SimulateError() {
-    EXPECT_CALL(*this, OnStateChanged(mojom::VideoCaptureState::FAILED));
+    EXPECT_CALL(*this, OnStateChanged(media::mojom::VideoCaptureState::FAILED));
     VideoCaptureControllerID id(kDeviceId);
     host_->OnError(id);
     base::RunLoop().RunUntilIdle();
@@ -308,7 +311,7 @@
   std::string opened_device_label_;
 
   std::unique_ptr<VideoCaptureHost> host_;
-  mojo::Binding<mojom::VideoCaptureObserver> observer_binding_;
+  mojo::Binding<media::mojom::VideoCaptureObserver> observer_binding_;
 
   DISALLOW_COPY_AND_ASSIGN(VideoCaptureTest);
 };
@@ -334,7 +337,7 @@
 }
 
 TEST_F(VideoCaptureTest, StartAndCaptureAndError) {
-  EXPECT_CALL(*this, OnStateChanged(mojom::VideoCaptureState::STOPPED))
+  EXPECT_CALL(*this, OnStateChanged(media::mojom::VideoCaptureState::STOPPED))
       .Times(0);
   StartCapture();
   WaitForOneCapturedBuffer();
@@ -353,7 +356,7 @@
 
   // When the session is closed via the stream without stopping capture, the
   // ENDED event is sent.
-  EXPECT_CALL(*this, OnStateChanged(mojom::VideoCaptureState::ENDED));
+  EXPECT_CALL(*this, OnStateChanged(media::mojom::VideoCaptureState::ENDED));
   CloseSession();
   base::RunLoop().RunUntilIdle();
 }
diff --git a/content/browser/renderer_host/render_widget_host_input_event_router.cc b/content/browser/renderer_host/render_widget_host_input_event_router.cc
index 5ba40e72..d6ad619 100644
--- a/content/browser/renderer_host/render_widget_host_input_event_router.cc
+++ b/content/browser/renderer_host/render_widget_host_input_event_router.cc
@@ -162,8 +162,7 @@
       in_touchscreen_gesture_pinch_(false),
       gesture_pinch_did_send_scroll_begin_(false),
       event_targeter_(std::make_unique<RenderWidgetTargeter>(this)),
-      enable_viz_(
-          base::FeatureList::IsEnabled(features::kVizDisplayCompositor)),
+      use_viz_hit_test_(features::IsVizHitTestingEnabled()),
       weak_ptr_factory_(this) {}
 
 RenderWidgetHostInputEventRouter::~RenderWidgetHostInputEventRouter() {
@@ -285,7 +284,7 @@
   viz::FrameSinkId frame_sink_id;
 
   bool query_renderer = false;
-  if (enable_viz_) {
+  if (use_viz_hit_test_) {
     const auto& display_hit_test_query_map =
         GetHostFrameSinkManager()->display_hit_test_query();
     const auto iter =
diff --git a/content/browser/renderer_host/render_widget_host_input_event_router.h b/content/browser/renderer_host/render_widget_host_input_event_router.h
index 8550698..6799fbb 100644
--- a/content/browser/renderer_host/render_widget_host_input_event_router.h
+++ b/content/browser/renderer_host/render_widget_host_input_event_router.h
@@ -261,7 +261,7 @@
       hittest_data_;
 
   std::unique_ptr<RenderWidgetTargeter> event_targeter_;
-  bool enable_viz_ = false;
+  bool use_viz_hit_test_ = false;
 
   base::WeakPtrFactory<RenderWidgetHostInputEventRouter> weak_ptr_factory_;
 
diff --git a/content/common/BUILD.gn b/content/common/BUILD.gn
index 914fa3ee..cce4bdb 100644
--- a/content/common/BUILD.gn
+++ b/content/common/BUILD.gn
@@ -576,7 +576,6 @@
     "shared_worker/shared_worker_info.mojom",
     "storage_partition_service.mojom",
     "url_loader_factory_bundle.mojom",
-    "video_capture.mojom",
     "widget.mojom",
   ]
 
@@ -593,7 +592,6 @@
     "//components/leveldb/public/interfaces",
     "//content/public/common:interfaces",
     "//ipc:mojom_constants",
-    "//media/capture/mojo:capture_types",
     "//media/mojo/interfaces",
     "//mojo/common:common_custom_types",
     "//services/network/public/interfaces",
diff --git a/content/common/url_loader_factory_bundle.cc b/content/common/url_loader_factory_bundle.cc
index af3f4d01..17dd351 100644
--- a/content/common/url_loader_factory_bundle.cc
+++ b/content/common/url_loader_factory_bundle.cc
@@ -4,46 +4,42 @@
 
 #include "content/common/url_loader_factory_bundle.h"
 
-#include <map>
-#include <string>
-
-#include "base/macros.h"
-#include "services/network/public/interfaces/url_loader_factory.mojom.h"
+#include "base/logging.h"
 #include "url/gurl.h"
 
-class GURL;
-
 namespace content {
 
-URLLoaderFactoryBundleInfo::URLLoaderFactoryBundleInfo(
-    URLLoaderFactoryBundleInfo&&) = default;
+URLLoaderFactoryBundleInfo::URLLoaderFactoryBundleInfo() = default;
 
 URLLoaderFactoryBundleInfo::URLLoaderFactoryBundleInfo(
     network::mojom::URLLoaderFactoryPtrInfo default_factory_info,
     std::map<std::string, network::mojom::URLLoaderFactoryPtrInfo>
         factories_info)
-    : default_factory_info(std::move(default_factory_info)),
-      factories_info(std::move(factories_info)) {}
+    : default_factory_info_(std::move(default_factory_info)),
+      factories_info_(std::move(factories_info)) {}
 
 URLLoaderFactoryBundleInfo::~URLLoaderFactoryBundleInfo() = default;
 
+scoped_refptr<SharedURLLoaderFactory>
+URLLoaderFactoryBundleInfo::CreateFactory() {
+  auto other = std::make_unique<URLLoaderFactoryBundleInfo>();
+  other->default_factory_info_ = std::move(default_factory_info_);
+  other->factories_info_ = std::move(factories_info_);
+
+  return base::MakeRefCounted<URLLoaderFactoryBundle>(std::move(other));
+}
+
 URLLoaderFactoryBundle::URLLoaderFactoryBundle() = default;
 
-URLLoaderFactoryBundle::URLLoaderFactoryBundle(URLLoaderFactoryBundle&&) =
-    default;
-
 URLLoaderFactoryBundle::URLLoaderFactoryBundle(
-    URLLoaderFactoryBundleInfo info) {
-  default_factory_.Bind(std::move(info.default_factory_info));
-  for (auto& factory_info : info.factories_info)
+    std::unique_ptr<URLLoaderFactoryBundleInfo> info) {
+  default_factory_.Bind(std::move(info->default_factory_info()));
+  for (auto& factory_info : info->factories_info())
     factories_[factory_info.first].Bind(std::move(factory_info.second));
 }
 
 URLLoaderFactoryBundle::~URLLoaderFactoryBundle() = default;
 
-URLLoaderFactoryBundle& URLLoaderFactoryBundle::operator=(
-    URLLoaderFactoryBundle&&) = default;
-
 void URLLoaderFactoryBundle::SetDefaultFactory(
     network::mojom::URLLoaderFactoryPtr factory) {
   default_factory_ = std::move(factory);
@@ -67,29 +63,38 @@
   return it->second.get();
 }
 
-URLLoaderFactoryBundleInfo URLLoaderFactoryBundle::PassInfo() {
-  std::map<std::string, network::mojom::URLLoaderFactoryPtrInfo> factories_info;
-  for (auto& factory : factories_)
-    factories_info.emplace(factory.first, factory.second.PassInterface());
-  DCHECK(default_factory_.is_bound());
-  return URLLoaderFactoryBundleInfo(default_factory_.PassInterface(),
-                                    std::move(factories_info));
+void URLLoaderFactoryBundle::CreateLoaderAndStart(
+    network::mojom::URLLoaderRequest loader,
+    int32_t routing_id,
+    int32_t request_id,
+    uint32_t options,
+    const network::ResourceRequest& request,
+    network::mojom::URLLoaderClientPtr client,
+    const net::MutableNetworkTrafficAnnotationTag& traffic_annotation,
+    const Constraints& constaints) {
+  network::mojom::URLLoaderFactory* factory_ptr =
+      GetFactoryForRequest(request.url);
+
+  factory_ptr->CreateLoaderAndStart(std::move(loader), routing_id, request_id,
+                                    options, request, std::move(client),
+                                    traffic_annotation);
 }
 
-URLLoaderFactoryBundle URLLoaderFactoryBundle::Clone() {
-  DCHECK(default_factory_.is_bound());
-  network::mojom::URLLoaderFactoryPtr cloned_default_factory;
-  default_factory_->Clone(mojo::MakeRequest(&cloned_default_factory));
+std::unique_ptr<SharedURLLoaderFactoryInfo> URLLoaderFactoryBundle::Clone() {
+  DCHECK(default_factory_);
 
-  URLLoaderFactoryBundle new_bundle;
-  new_bundle.SetDefaultFactory(std::move(cloned_default_factory));
+  network::mojom::URLLoaderFactoryPtrInfo default_factory_info;
+  default_factory_->Clone(mojo::MakeRequest(&default_factory_info));
+
+  std::map<std::string, network::mojom::URLLoaderFactoryPtrInfo> factories_info;
   for (auto& factory : factories_) {
-    network::mojom::URLLoaderFactoryPtr cloned_factory;
-    factory.second->Clone(mojo::MakeRequest(&cloned_factory));
-    new_bundle.RegisterFactory(factory.first, std::move(cloned_factory));
+    network::mojom::URLLoaderFactoryPtrInfo factory_info;
+    factory.second->Clone(mojo::MakeRequest(&factory_info));
+    factories_info.emplace(factory.first, std::move(factory_info));
   }
 
-  return new_bundle;
+  return std::make_unique<URLLoaderFactoryBundleInfo>(
+      std::move(default_factory_info), std::move(factories_info));
 }
 
 }  // namespace content
diff --git a/content/common/url_loader_factory_bundle.h b/content/common/url_loader_factory_bundle.h
index 3c18c3c..5a6c4a9 100644
--- a/content/common/url_loader_factory_bundle.h
+++ b/content/common/url_loader_factory_bundle.h
@@ -10,44 +10,53 @@
 
 #include "base/macros.h"
 #include "content/common/content_export.h"
+#include "content/public/common/shared_url_loader_factory.h"
 #include "services/network/public/interfaces/url_loader_factory.mojom.h"
 
 class GURL;
 
-namespace mojo {
-template <typename, typename>
-struct StructTraits;
-}
-
 namespace content {
-namespace mojom {
-class URLLoaderFactoryBundleDataView;
-}
 
 // Holds the internal state of a URLLoaderFactoryBundle in a form that is safe
 // to pass across sequences.
-struct CONTENT_EXPORT URLLoaderFactoryBundleInfo {
-  URLLoaderFactoryBundleInfo(URLLoaderFactoryBundleInfo&&);
+class CONTENT_EXPORT URLLoaderFactoryBundleInfo
+    : public SharedURLLoaderFactoryInfo {
+ public:
+  URLLoaderFactoryBundleInfo();
   URLLoaderFactoryBundleInfo(
       network::mojom::URLLoaderFactoryPtrInfo default_factory_info,
       std::map<std::string, network::mojom::URLLoaderFactoryPtrInfo>
           factories_info);
-  ~URLLoaderFactoryBundleInfo();
+  ~URLLoaderFactoryBundleInfo() override;
 
-  network::mojom::URLLoaderFactoryPtrInfo default_factory_info;
-  std::map<std::string, network::mojom::URLLoaderFactoryPtrInfo> factories_info;
+  network::mojom::URLLoaderFactoryPtrInfo& default_factory_info() {
+    return default_factory_info_;
+  }
+
+  std::map<std::string, network::mojom::URLLoaderFactoryPtrInfo>&
+  factories_info() {
+    return factories_info_;
+  }
+
+ private:
+  // SharedURLLoaderFactoryInfo implementation.
+  scoped_refptr<SharedURLLoaderFactory> CreateFactory() override;
+
+  network::mojom::URLLoaderFactoryPtrInfo default_factory_info_;
+  std::map<std::string, network::mojom::URLLoaderFactoryPtrInfo>
+      factories_info_;
+
+  DISALLOW_COPY_AND_ASSIGN(URLLoaderFactoryBundleInfo);
 };
 
 // Encapsulates a collection of URLLoaderFactoryPtrs which can be usd to acquire
 // loaders for various types of resource requests.
-class CONTENT_EXPORT URLLoaderFactoryBundle {
+class CONTENT_EXPORT URLLoaderFactoryBundle : public SharedURLLoaderFactory {
  public:
   URLLoaderFactoryBundle();
-  URLLoaderFactoryBundle(URLLoaderFactoryBundle&&);
-  explicit URLLoaderFactoryBundle(URLLoaderFactoryBundleInfo info);
-  ~URLLoaderFactoryBundle();
 
-  URLLoaderFactoryBundle& operator=(URLLoaderFactoryBundle&&);
+  explicit URLLoaderFactoryBundle(
+      std::unique_ptr<URLLoaderFactoryBundleInfo> info);
 
   // Sets the default factory to use when no registered factories match a given
   // |url|.
@@ -62,25 +71,24 @@
   // is undefined behavior to call this when no default factory is set.
   network::mojom::URLLoaderFactory* GetFactoryForRequest(const GURL& url);
 
-  // Passes out a structure which captures the internal state of this bundle in
-  // a form that is safe to pass across sequences. Effectively resets |this|
-  // to have no registered factories.
-  URLLoaderFactoryBundleInfo PassInfo();
+  // SharedURLLoaderFactory implementation.
+  void CreateLoaderAndStart(
+      network::mojom::URLLoaderRequest loader,
+      int32_t routing_id,
+      int32_t request_id,
+      uint32_t options,
+      const network::ResourceRequest& request,
+      network::mojom::URLLoaderClientPtr client,
+      const net::MutableNetworkTrafficAnnotationTag& traffic_annotation,
+      const Constraints& constaints = kDefaultConstraints) override;
 
-  // Creates a clone of this bundle which can be passed to and owned by another
-  // consumer. The clone operates identically to but independent from the
-  // original (this) bundle.
-  URLLoaderFactoryBundle Clone();
+  std::unique_ptr<SharedURLLoaderFactoryInfo> Clone() override;
 
  private:
-  friend struct mojo::StructTraits<
-      content::mojom::URLLoaderFactoryBundleDataView,
-      URLLoaderFactoryBundle>;
+  ~URLLoaderFactoryBundle() override;
 
   network::mojom::URLLoaderFactoryPtr default_factory_;
   std::map<std::string, network::mojom::URLLoaderFactoryPtr> factories_;
-
-  DISALLOW_COPY_AND_ASSIGN(URLLoaderFactoryBundle);
 };
 
 }  // namespace content
diff --git a/content/common/url_loader_factory_bundle.typemap b/content/common/url_loader_factory_bundle.typemap
index 066c04c..1689e50 100644
--- a/content/common/url_loader_factory_bundle.typemap
+++ b/content/common/url_loader_factory_bundle.typemap
@@ -10,4 +10,4 @@
   "//content/common/url_loader_factory_bundle_struct_traits.cc",
 ]
 
-type_mappings = [ "content.mojom.URLLoaderFactoryBundle=content::URLLoaderFactoryBundle[move_only]" ]
+type_mappings = [ "content.mojom.URLLoaderFactoryBundle=std::unique_ptr<content::URLLoaderFactoryBundleInfo>[move_only,nullable_is_same_type]" ]
diff --git a/content/common/url_loader_factory_bundle_struct_traits.cc b/content/common/url_loader_factory_bundle_struct_traits.cc
index 0c84988..e0627fb 100644
--- a/content/common/url_loader_factory_bundle_struct_traits.cc
+++ b/content/common/url_loader_factory_bundle_struct_traits.cc
@@ -6,28 +6,32 @@
 
 namespace mojo {
 
-using Traits = StructTraits<content::mojom::URLLoaderFactoryBundleDataView,
-                            content::URLLoaderFactoryBundle>;
+using Traits =
+    StructTraits<content::mojom::URLLoaderFactoryBundleDataView,
+                 std::unique_ptr<content::URLLoaderFactoryBundleInfo>>;
 
 // static
-network::mojom::URLLoaderFactoryPtr Traits::default_factory(
-    content::URLLoaderFactoryBundle& bundle) {
-  return std::move(bundle.default_factory_);
+network::mojom::URLLoaderFactoryPtrInfo Traits::default_factory(
+    BundleInfoType& bundle) {
+  return std::move(bundle->default_factory_info());
 }
 
 // static
-std::map<std::string, network::mojom::URLLoaderFactoryPtr> Traits::factories(
-    content::URLLoaderFactoryBundle& bundle) {
-  return std::move(bundle.factories_);
+std::map<std::string, network::mojom::URLLoaderFactoryPtrInfo>
+Traits::factories(BundleInfoType& bundle) {
+  return std::move(bundle->factories_info());
 }
 
 // static
 bool Traits::Read(content::mojom::URLLoaderFactoryBundleDataView data,
-                  content::URLLoaderFactoryBundle* out_bundle) {
-  out_bundle->SetDefaultFactory(
-      data.TakeDefaultFactory<network::mojom::URLLoaderFactoryPtr>());
-  if (!data.ReadFactories(&out_bundle->factories_))
+                  BundleInfoType* out_bundle) {
+  *out_bundle = std::make_unique<content::URLLoaderFactoryBundleInfo>();
+
+  (*out_bundle)->default_factory_info() =
+      data.TakeDefaultFactory<network::mojom::URLLoaderFactoryPtrInfo>();
+  if (!data.ReadFactories(&(*out_bundle)->factories_info()))
     return false;
+
   return true;
 }
 
diff --git a/content/common/url_loader_factory_bundle_struct_traits.h b/content/common/url_loader_factory_bundle_struct_traits.h
index 772e637..e8d9220 100644
--- a/content/common/url_loader_factory_bundle_struct_traits.h
+++ b/content/common/url_loader_factory_bundle_struct_traits.h
@@ -13,15 +13,21 @@
 
 template <>
 struct StructTraits<content::mojom::URLLoaderFactoryBundleDataView,
-                    content::URLLoaderFactoryBundle> {
-  static network::mojom::URLLoaderFactoryPtr default_factory(
-      content::URLLoaderFactoryBundle& bundle);
+                    std::unique_ptr<content::URLLoaderFactoryBundleInfo>> {
+  using BundleInfoType = std::unique_ptr<content::URLLoaderFactoryBundleInfo>;
 
-  static std::map<std::string, network::mojom::URLLoaderFactoryPtr> factories(
-      content::URLLoaderFactoryBundle& bundle);
+  static bool IsNull(const BundleInfoType& bundle) { return !bundle; }
+
+  static void SetToNull(BundleInfoType* bundle) { bundle->reset(); }
+
+  static network::mojom::URLLoaderFactoryPtrInfo default_factory(
+      BundleInfoType& bundle);
+
+  static std::map<std::string, network::mojom::URLLoaderFactoryPtrInfo>
+  factories(BundleInfoType& bundle);
 
   static bool Read(content::mojom::URLLoaderFactoryBundleDataView data,
-                   content::URLLoaderFactoryBundle* out_bundle);
+                   BundleInfoType* out_bundle);
 };
 
 }  // namespace mojo
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
index c989841e6..7385416b 100644
--- a/content/gpu/gpu_main.cc
+++ b/content/gpu/gpu_main.cc
@@ -311,6 +311,10 @@
 #endif
 
   GpuProcess gpu_process(io_thread_priority);
+
+  if (client)
+    client->PostIOThreadCreated(gpu_process.io_task_runner());
+
   GpuChildThread* child_thread = new GpuChildThread(
       std::move(gpu_init), std::move(deferred_messages.Get()));
   deferred_messages.Get().clear();
diff --git a/content/public/app/mojo/content_browser_manifest.json b/content/public/app/mojo/content_browser_manifest.json
index 24c1e00..76c870d7 100644
--- a/content/public/app/mojo/content_browser_manifest.json
+++ b/content/public/app/mojo/content_browser_manifest.json
@@ -49,13 +49,13 @@
           "content::mojom::ReportingServiceProxy",
           "content::mojom::ServiceWorkerDispatcherHost",
           "content::mojom::StoragePartitionService",
-          "content::mojom::VideoCaptureHost",
           "content::mojom::WorkerURLLoaderFactoryProvider",
           "device::mojom::BatteryMonitor",
           "device::mojom::GamepadHapticsManager",
           "device::mojom::GamepadMonitor",
           "discardable_memory::mojom::DiscardableSharedMemoryManager",
           "media::mojom::KeySystemSupport",
+          "media::mojom::VideoCaptureHost",
           "media::mojom::VideoDecodePerfHistory",
           "memory_coordinator::mojom::MemoryCoordinatorHandle",
           "metrics::mojom::SingleSampleMetricsProvider",
diff --git a/content/public/gpu/content_gpu_client.h b/content/public/gpu/content_gpu_client.h
index 11a0ece..07e6b69 100644
--- a/content/public/gpu/content_gpu_client.h
+++ b/content/public/gpu/content_gpu_client.h
@@ -9,6 +9,7 @@
 #include <string>
 
 #include "base/metrics/field_trial.h"
+#include "base/single_thread_task_runner.h"
 #include "content/public/common/content_client.h"
 #include "media/media_features.h"
 #include "services/service_manager/public/cpp/binder_registry.h"
@@ -43,6 +44,10 @@
   virtual void GpuServiceInitialized(
       const gpu::GpuPreferences& gpu_preferences) {}
 
+  // Called right after the IO thread is created.
+  virtual void PostIOThreadCreated(
+      base::SingleThreadTaskRunner* io_task_runner) {}
+
   // Allows client to supply a SyncPointManager instance instead of having
   // content internally create one.
   virtual gpu::SyncPointManager* GetSyncPointManager();
diff --git a/content/renderer/media/gpu/gpu_video_accelerator_factories_impl.cc b/content/renderer/media/gpu/gpu_video_accelerator_factories_impl.cc
index 99503456..8d42929 100644
--- a/content/renderer/media/gpu/gpu_video_accelerator_factories_impl.cc
+++ b/content/renderer/media/gpu/gpu_video_accelerator_factories_impl.cc
@@ -11,7 +11,6 @@
 #include "base/memory/ptr_util.h"
 #include "base/metrics/histogram_macros.h"
 #include "base/unguessable_token.h"
-#include "build/build_config.h"
 #include "components/viz/common/gpu/context_provider.h"
 #include "content/child/child_thread_impl.h"
 #include "content/public/common/content_features.h"
@@ -297,25 +296,14 @@
   viz::ContextProvider::ScopedContextLock lock(context_provider_);
   auto capabilities = context_provider_->ContextCapabilities();
   if (bit_depth > 8) {
-    // If high bit depth rendering is enabled, bail here, otherwise try and use
-    // XR30 storage, and if not and we support RG textures, use those, albeit at
-    // a reduced bit depth of 8 bits per component.
+    // If high bit depth rendering is not enabled and we support RG textures,
+    // use those, albeit at a reduced bit depth of 8 bits per component.
     // TODO(mcasas): continue working on this, avoiding dropping information as
     // long as the hardware may support it https://crbug.com/798485.
-    if (rendering_color_space_.IsHDR())
-      return media::GpuVideoAcceleratorFactories::OutputFormat::UNDEFINED;
-
-#if defined(OS_MACOSX)
-    // TODO(mcasas): enable other platforms https://crbug.com/776093
-    // https://crbug.com/803451, https://crbug.com/803975.
-    // TODO(mcasas): remove the |bit_depth| check when libyuv supports more than
-    // just x010ToAR30 conversions, https://crbug.com/libyuv/751.
-    if (capabilities.image_xr30 && bit_depth == 10)
-      return media::GpuVideoAcceleratorFactories::OutputFormat::XR30;
-#endif
-    if (capabilities.texture_rg)
+    if (!rendering_color_space_.IsHDR() && capabilities.texture_rg)
       return media::GpuVideoAcceleratorFactories::OutputFormat::I420;
-    return media::GpuVideoAcceleratorFactories::OutputFormat::UNDEFINED;
+    else
+      return media::GpuVideoAcceleratorFactories::OutputFormat::UNDEFINED;
   }
   if (capabilities.image_ycbcr_420v &&
       !capabilities.image_ycbcr_420v_disabled_for_video_frames) {
diff --git a/content/renderer/media/video_capture_impl.cc b/content/renderer/media/video_capture_impl.cc
index ebdadce9..e411ea8 100644
--- a/content/renderer/media/video_capture_impl.cc
+++ b/content/renderer/media/video_capture_impl.cc
@@ -75,7 +75,7 @@
   io_thread_checker_.DetachFromThread();
 
   if (ChildThread::Get()) {  // This will be null in unit tests.
-    mojom::VideoCaptureHostPtr temp_video_capture_host;
+    media::mojom::VideoCaptureHostPtr temp_video_capture_host;
     ChildThread::Get()->GetConnector()->BindInterface(
         mojom::kBrowserServiceName,
         mojo::MakeRequest(&temp_video_capture_host));
@@ -189,12 +189,12 @@
                      weak_factory_.GetWeakPtr(), callback));
 }
 
-void VideoCaptureImpl::OnStateChanged(mojom::VideoCaptureState state) {
+void VideoCaptureImpl::OnStateChanged(media::mojom::VideoCaptureState state) {
   DVLOG(1) << __func__ << " state: " << state;
   DCHECK(io_thread_checker_.CalledOnValidThread());
 
   switch (state) {
-    case mojom::VideoCaptureState::STARTED:
+    case media::mojom::VideoCaptureState::STARTED:
       state_ = VIDEO_CAPTURE_STATE_STARTED;
       for (const auto& client : clients_)
         client.second.state_update_cb.Run(VIDEO_CAPTURE_STATE_STARTED);
@@ -203,28 +203,28 @@
       // Capture device will make a decision if it should refresh a frame.
       RequestRefreshFrame();
       break;
-    case mojom::VideoCaptureState::STOPPED:
+    case media::mojom::VideoCaptureState::STOPPED:
       state_ = VIDEO_CAPTURE_STATE_STOPPED;
       client_buffers_.clear();
       weak_factory_.InvalidateWeakPtrs();
       if (!clients_.empty() || !clients_pending_on_restart_.empty())
         RestartCapture();
       break;
-    case mojom::VideoCaptureState::PAUSED:
+    case media::mojom::VideoCaptureState::PAUSED:
       for (const auto& client : clients_)
         client.second.state_update_cb.Run(VIDEO_CAPTURE_STATE_PAUSED);
       break;
-    case mojom::VideoCaptureState::RESUMED:
+    case media::mojom::VideoCaptureState::RESUMED:
       for (const auto& client : clients_)
         client.second.state_update_cb.Run(VIDEO_CAPTURE_STATE_RESUMED);
       break;
-    case mojom::VideoCaptureState::FAILED:
+    case media::mojom::VideoCaptureState::FAILED:
       for (const auto& client : clients_)
         client.second.state_update_cb.Run(VIDEO_CAPTURE_STATE_ERROR);
       clients_.clear();
       state_ = VIDEO_CAPTURE_STATE_ERROR;
       break;
-    case mojom::VideoCaptureState::ENDED:
+    case media::mojom::VideoCaptureState::ENDED:
       // We'll only notify the client that the stream has stopped.
       for (const auto& client : clients_)
         client.second.state_update_cb.Run(VIDEO_CAPTURE_STATE_STOPPED);
@@ -414,7 +414,7 @@
   DCHECK(io_thread_checker_.CalledOnValidThread());
   state_ = VIDEO_CAPTURE_STATE_STARTING;
 
-  mojom::VideoCaptureObserverPtr observer;
+  media::mojom::VideoCaptureObserverPtr observer;
   observer_binding_.Bind(mojo::MakeRequest(&observer));
   GetVideoCaptureHost()->Start(device_id_, session_id_, params_,
                                std::move(observer));
@@ -446,7 +446,7 @@
   return true;
 }
 
-mojom::VideoCaptureHost* VideoCaptureImpl::GetVideoCaptureHost() {
+media::mojom::VideoCaptureHost* VideoCaptureImpl::GetVideoCaptureHost() {
   DCHECK(io_thread_checker_.CalledOnValidThread());
   if (video_capture_host_for_testing_)
     return video_capture_host_for_testing_;
diff --git a/content/renderer/media/video_capture_impl.h b/content/renderer/media/video_capture_impl.h
index 40ffb2d..eef1ecc 100644
--- a/content/renderer/media/video_capture_impl.h
+++ b/content/renderer/media/video_capture_impl.h
@@ -15,8 +15,8 @@
 #include "base/threading/thread_checker.h"
 #include "content/common/content_export.h"
 #include "content/common/media/video_capture.h"
-#include "content/common/video_capture.mojom.h"
 #include "media/base/video_frame.h"
+#include "media/capture/mojo/video_capture.mojom.h"
 #include "media/capture/video_capture_types.h"
 #include "mojo/public/cpp/bindings/binding.h"
 
@@ -27,7 +27,8 @@
 // communicates back to these clients e.g. the capture state or incoming
 // captured VideoFrames. VideoCaptureImpl is created in the main Renderer thread
 // but otherwise operates on |io_task_runner_|, which is usually the IO thread.
-class CONTENT_EXPORT VideoCaptureImpl : public mojom::VideoCaptureObserver {
+class CONTENT_EXPORT VideoCaptureImpl
+    : public media::mojom::VideoCaptureObserver {
  public:
   explicit VideoCaptureImpl(media::VideoCaptureSessionId session_id);
   ~VideoCaptureImpl() override;
@@ -62,12 +63,12 @@
 
   media::VideoCaptureSessionId session_id() const { return session_id_; }
 
-  void SetVideoCaptureHostForTesting(mojom::VideoCaptureHost* service) {
+  void SetVideoCaptureHostForTesting(media::mojom::VideoCaptureHost* service) {
     video_capture_host_for_testing_ = service;
   }
 
-  // mojom::VideoCaptureObserver implementation.
-  void OnStateChanged(mojom::VideoCaptureState state) override;
+  // media::mojom::VideoCaptureObserver implementation.
+  void OnStateChanged(media::mojom::VideoCaptureState state) override;
   void OnBufferCreated(int32_t buffer_id,
                        mojo::ScopedSharedBufferHandle handle) override;
   void OnBufferReady(int32_t buffer_id,
@@ -110,7 +111,7 @@
   // Tries to remove |client_id| from |clients|, returning false if not found.
   bool RemoveClient(int client_id, ClientInfoMap* clients);
 
-  mojom::VideoCaptureHost* GetVideoCaptureHost();
+  media::mojom::VideoCaptureHost* GetVideoCaptureHost();
 
   // Called (by an unknown thread) when all consumers are done with a VideoFrame
   // and its ref-count has gone to zero.  This helper function grabs the
@@ -128,11 +129,11 @@
   // |video_capture_host_| is an IO-thread InterfacePtr to a remote service
   // implementation and is created by binding |video_capture_host_info_|,
   // unless a |video_capture_host_for_testing_| has been injected.
-  mojom::VideoCaptureHostPtrInfo video_capture_host_info_;
-  mojom::VideoCaptureHostPtr video_capture_host_;
-  mojom::VideoCaptureHost* video_capture_host_for_testing_;
+  media::mojom::VideoCaptureHostPtrInfo video_capture_host_info_;
+  media::mojom::VideoCaptureHostPtr video_capture_host_;
+  media::mojom::VideoCaptureHost* video_capture_host_for_testing_;
 
-  mojo::Binding<mojom::VideoCaptureObserver> observer_binding_;
+  mojo::Binding<media::mojom::VideoCaptureObserver> observer_binding_;
 
   // Buffers available for sending to the client.
   using ClientBufferMap = std::map<int32_t, scoped_refptr<ClientBuffer>>;
diff --git a/content/renderer/media/video_capture_impl_manager_unittest.cc b/content/renderer/media/video_capture_impl_manager_unittest.cc
index 58765ea..fbd62cd 100644
--- a/content/renderer/media/video_capture_impl_manager_unittest.cc
+++ b/content/renderer/media/video_capture_impl_manager_unittest.cc
@@ -12,10 +12,10 @@
 #include "base/run_loop.h"
 #include "base/test/scoped_task_environment.h"
 #include "content/child/child_process.h"
-#include "content/common/video_capture.mojom.h"
 #include "content/renderer/media/video_capture_impl.h"
 #include "content/renderer/media/video_capture_impl_manager.h"
 #include "media/base/bind_to_current_loop.h"
+#include "media/capture/mojo/video_capture.mojom.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
@@ -46,7 +46,7 @@
 };
 
 class MockVideoCaptureImpl : public VideoCaptureImpl,
-                             public mojom::VideoCaptureHost {
+                             public media::mojom::VideoCaptureHost {
  public:
   MockVideoCaptureImpl(media::VideoCaptureSessionId session_id,
                        PauseResumeCallback* pause_callback,
@@ -61,11 +61,11 @@
   void Start(int32_t device_id,
              int32_t session_id,
              const media::VideoCaptureParams& params,
-             mojom::VideoCaptureObserverPtr observer) override {
+             media::mojom::VideoCaptureObserverPtr observer) override {
     // For every Start(), expect a corresponding Stop() call.
     EXPECT_CALL(*this, Stop(_));
     // Simulate device started.
-    OnStateChanged(mojom::VideoCaptureState::STARTED);
+    OnStateChanged(media::mojom::VideoCaptureState::STARTED);
   }
 
   MOCK_METHOD1(Stop, void(int32_t));
diff --git a/content/renderer/media/video_capture_impl_unittest.cc b/content/renderer/media/video_capture_impl_unittest.cc
index 93ff20f..d48c841 100644
--- a/content/renderer/media/video_capture_impl_unittest.cc
+++ b/content/renderer/media/video_capture_impl_unittest.cc
@@ -8,8 +8,8 @@
 #include "base/memory/shared_memory.h"
 #include "base/test/scoped_task_environment.h"
 #include "content/child/child_process.h"
-#include "content/common/video_capture.mojom.h"
 #include "content/renderer/media/video_capture_impl.h"
+#include "media/capture/mojo/video_capture.mojom.h"
 #include "mojo/public/cpp/system/platform_handle.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
@@ -26,7 +26,8 @@
 const int kSessionId = 11;
 
 void RunEmptyFormatsCallback(
-    mojom::VideoCaptureHost::GetDeviceSupportedFormatsCallback& callback) {
+    media::mojom::VideoCaptureHost::GetDeviceSupportedFormatsCallback&
+        callback) {
   media::VideoCaptureFormats formats;
   std::move(callback).Run(formats);
 }
@@ -34,7 +35,7 @@
 ACTION(DoNothing) {}
 
 // Mock implementation of the Mojo Host service.
-class MockMojoVideoCaptureHost : public mojom::VideoCaptureHost {
+class MockMojoVideoCaptureHost : public media::mojom::VideoCaptureHost {
  public:
   MockMojoVideoCaptureHost() : released_buffer_count_(0) {
     ON_CALL(*this, GetDeviceSupportedFormatsMock(_, _, _))
@@ -50,7 +51,7 @@
   void Start(int32_t device_id,
              int32_t session_id,
              const media::VideoCaptureParams& params,
-             mojom::VideoCaptureObserverPtr observer) override {
+             media::mojom::VideoCaptureObserverPtr observer) override {
     DoStart(device_id, session_id, params);
   }
   MOCK_METHOD3(DoStart,
@@ -108,7 +109,7 @@
     ON_CALL(mock_video_capture_host_, DoStart(_, _, _))
         .WillByDefault(InvokeWithoutArgs([this]() {
           video_capture_impl_->OnStateChanged(
-              mojom::VideoCaptureState::STARTED);
+              media::mojom::VideoCaptureState::STARTED);
         }));
   }
 
@@ -188,7 +189,7 @@
     video_capture_impl_->GetDeviceFormatsInUse(callback);
   }
 
-  void OnStateChanged(mojom::VideoCaptureState state) {
+  void OnStateChanged(media::mojom::VideoCaptureState state) {
     video_capture_impl_->OnStateChanged(state);
   }
 
@@ -338,7 +339,7 @@
   EXPECT_CALL(mock_video_capture_host_, DoStart(_, kSessionId, params_small_))
       .WillOnce(DoAll(InvokeWithoutArgs([this]() {
                         video_capture_impl_->OnStateChanged(
-                            mojom::VideoCaptureState::STARTED);
+                            media::mojom::VideoCaptureState::STARTED);
                       }),
                       SaveArg<2>(&params)));
   EXPECT_CALL(mock_video_capture_host_, Stop(_));
@@ -357,7 +358,7 @@
 
   StartCapture(0, params_small_);
 
-  OnStateChanged(mojom::VideoCaptureState::ENDED);
+  OnStateChanged(media::mojom::VideoCaptureState::ENDED);
 
   StopCapture(0);
 }
@@ -369,7 +370,7 @@
 
   StartCapture(0, params_small_);
 
-  OnStateChanged(mojom::VideoCaptureState::FAILED);
+  OnStateChanged(media::mojom::VideoCaptureState::FAILED);
 
   StopCapture(0);
 }
@@ -392,12 +393,12 @@
 
   EXPECT_CALL(*this, OnStateUpdate(VIDEO_CAPTURE_STATE_STARTED));
   EXPECT_CALL(mock_video_capture_host_, RequestRefreshFrame(_));
-  video_capture_impl_->OnStateChanged(mojom::VideoCaptureState::STARTED);
+  video_capture_impl_->OnStateChanged(media::mojom::VideoCaptureState::STARTED);
 
   // Additional STARTED will cause RequestRefreshFrame a second time.
   EXPECT_CALL(*this, OnStateUpdate(VIDEO_CAPTURE_STATE_STARTED));
   EXPECT_CALL(mock_video_capture_host_, RequestRefreshFrame(_));
-  video_capture_impl_->OnStateChanged(mojom::VideoCaptureState::STARTED);
+  video_capture_impl_->OnStateChanged(media::mojom::VideoCaptureState::STARTED);
 
   EXPECT_CALL(*this, OnStateUpdate(VIDEO_CAPTURE_STATE_STOPPED));
   EXPECT_CALL(mock_video_capture_host_, Stop(_));
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 4bbed39f..78f7d40 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -776,14 +776,12 @@
     DCHECK(frame_);
     frame_->UpdatePeakMemoryStats();
 
-    // TODO(crbug.com/796425): Temporarily wrap the raw mojom::URLLoaderFactory
-    // pointer into SharedURLLoaderFactory.
     scoped_refptr<SharedURLLoaderFactory> factory;
     if (base::FeatureList::IsEnabled(features::kNetworkService)) {
-      factory = base::MakeRefCounted<WeakWrapperSharedURLLoaderFactory>(
-          frame_->GetSubresourceLoaderFactories().GetFactoryForRequest(
-              request.Url()));
+      factory = frame_->GetSubresourceLoaderFactories();
     } else {
+      // TODO(crbug.com/796425): Temporarily wrap the raw
+      // mojom::URLLoaderFactory pointer into SharedURLLoaderFactory.
       factory = base::MakeRefCounted<WeakWrapperSharedURLLoaderFactory>(
           frame_->GetDefaultURLLoaderFactoryGetter()->GetFactoryForURL(
               request.Url(), frame_->custom_url_loader_factory()));
@@ -3071,7 +3069,7 @@
     const CommonNavigationParams& common_params,
     const RequestNavigationParams& request_params,
     network::mojom::URLLoaderClientEndpointsPtr url_loader_client_endpoints,
-    base::Optional<URLLoaderFactoryBundle> subresource_loader_factories,
+    std::unique_ptr<URLLoaderFactoryBundleInfo> subresource_loader_factories,
     mojom::ControllerServiceWorkerInfoPtr controller_service_worker_info,
     const base::UnguessableToken& devtools_navigation_token) {
   // If this was a renderer-initiated navigation (nav_entry_id == 0) from this
@@ -3164,16 +3162,19 @@
   DCHECK(is_same_document ||
          common_params.url.SchemeIs(url::kJavaScriptScheme) ||
          !base::FeatureList::IsEnabled(features::kNetworkService) ||
-         subresource_loader_factories.has_value());
+         subresource_loader_factories);
 
-  if (subresource_loader_factories)
-    subresource_loader_factories_ = std::move(subresource_loader_factories);
+  if (subresource_loader_factories) {
+    subresource_loader_factories_ =
+        base::MakeRefCounted<URLLoaderFactoryBundle>(
+            std::move(subresource_loader_factories));
+  }
 
   // If the Network Service is enabled, by this point the frame should always
   // have subresource loader factories, even if they're from a previous (but
   // same-document) commit.
   DCHECK(!base::FeatureList::IsEnabled(features::kNetworkService) ||
-         subresource_loader_factories_.has_value());
+         subresource_loader_factories_);
 
   // Used to determine whether this frame is actually loading a request as part
   // of a history navigation.
@@ -3321,7 +3322,7 @@
     bool has_stale_copy_in_cache,
     int error_code,
     const base::Optional<std::string>& error_page_content,
-    base::Optional<URLLoaderFactoryBundle> subresource_loader_factories) {
+    std::unique_ptr<URLLoaderFactoryBundleInfo> subresource_loader_factories) {
   bool is_reload =
       FrameMsg_Navigate_Type::IsReload(common_params.navigation_type);
   RenderFrameImpl::PrepareRenderViewForNavigation(common_params.url,
@@ -3330,8 +3331,11 @@
   GetContentClient()->SetActiveURL(
       common_params.url, frame_->Top()->GetSecurityOrigin().ToString().Utf8());
 
-  if (subresource_loader_factories)
-    subresource_loader_factories_ = std::move(subresource_loader_factories);
+  if (subresource_loader_factories) {
+    subresource_loader_factories_ =
+        base::MakeRefCounted<URLLoaderFactoryBundle>(
+            std::move(subresource_loader_factories));
+  }
 
   pending_navigation_params_.reset(
       new NavigationParams(common_params, request_params));
@@ -6508,16 +6512,19 @@
   return request;
 }
 
-URLLoaderFactoryBundle& RenderFrameImpl::GetSubresourceLoaderFactories() {
+URLLoaderFactoryBundle* RenderFrameImpl::GetSubresourceLoaderFactories() {
   DCHECK(base::FeatureList::IsEnabled(features::kNetworkService));
   if (!subresource_loader_factories_) {
     RenderFrameImpl* creator = RenderFrameImpl::FromWebFrame(
         frame_->Parent() ? frame_->Parent() : frame_->Opener());
     DCHECK(creator);
+    auto bundle_info =
+        base::WrapUnique(static_cast<URLLoaderFactoryBundleInfo*>(
+            creator->GetSubresourceLoaderFactories()->Clone().release()));
     subresource_loader_factories_ =
-        creator->GetSubresourceLoaderFactories().Clone();
+        base::MakeRefCounted<URLLoaderFactoryBundle>(std::move(bundle_info));
   }
-  return *subresource_loader_factories_;
+  return subresource_loader_factories_.get();
 }
 
 void RenderFrameImpl::UpdateEncoding(WebFrame* frame,
@@ -6592,7 +6599,7 @@
     // When the network service is enabled, all subresource loads go through
     // a factory from |subresource_loader_factories|. In this case we simply
     // replace the existing default factory within the bundle.
-    GetSubresourceLoaderFactories().SetDefaultFactory(std::move(factory));
+    GetSubresourceLoaderFactories()->SetDefaultFactory(std::move(factory));
   } else {
     custom_url_loader_factory_ = std::move(factory);
   }
@@ -7114,7 +7121,7 @@
 network::mojom::URLLoaderFactory* RenderFrameImpl::GetURLLoaderFactory(
     const GURL& request_url) {
   if (base::FeatureList::IsEnabled(features::kNetworkService)) {
-    return GetSubresourceLoaderFactories().GetFactoryForRequest(request_url);
+    return GetSubresourceLoaderFactories()->GetFactoryForRequest(request_url);
   }
 
   return GetDefaultURLLoaderFactoryGetter()->GetFactoryForURL(request_url);
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index 721c0d5b..7097b46 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -527,7 +527,7 @@
       const CommonNavigationParams& common_params,
       const RequestNavigationParams& request_params,
       network::mojom::URLLoaderClientEndpointsPtr url_loader_client_endpoints,
-      base::Optional<URLLoaderFactoryBundle> subresource_loaders,
+      std::unique_ptr<URLLoaderFactoryBundleInfo> subresource_loaders,
       mojom::ControllerServiceWorkerInfoPtr controller_service_worker_info,
       const base::UnguessableToken& devtools_navigation_token) override;
   void CommitFailedNavigation(
@@ -536,7 +536,7 @@
       bool has_stale_copy_in_cache,
       int error_code,
       const base::Optional<std::string>& error_page_content,
-      base::Optional<URLLoaderFactoryBundle> subresource_loaders) override;
+      std::unique_ptr<URLLoaderFactoryBundleInfo> subresource_loaders) override;
 
   // mojom::FullscreenVideoElementHandler implementation:
   void RequestFullscreenVideoElement() override;
@@ -1116,7 +1116,7 @@
   // browser at navigation time. For any other frames (i.e. frames on the
   // initial about:blank Document), the bundle returned here is lazily cloned
   // from the parent or opener's own bundle.
-  URLLoaderFactoryBundle& GetSubresourceLoaderFactories();
+  URLLoaderFactoryBundle* GetSubresourceLoaderFactories();
 
   // Update current main frame's encoding and send it to browser window.
   // Since we want to let users see the right encoding info from menu
@@ -1607,7 +1607,7 @@
 
   // URLLoaderFactory instances used for subresource loading when the Network
   // Service is enabled.
-  base::Optional<URLLoaderFactoryBundle> subresource_loader_factories_;
+  scoped_refptr<URLLoaderFactoryBundle> subresource_loader_factories_;
 
   // AndroidOverlay routing token from the browser, if we have one yet.
   base::Optional<base::UnguessableToken> overlay_routing_token_;
diff --git a/content/renderer/service_worker/service_worker_context_client.cc b/content/renderer/service_worker/service_worker_context_client.cc
index 81d1fa7..47bcbbb 100644
--- a/content/renderer/service_worker/service_worker_context_client.cc
+++ b/content/renderer/service_worker/service_worker_context_client.cc
@@ -238,6 +238,7 @@
       ui::PAGE_TRANSITION_RELOAD));
   web_request->SetIntegrity(
       blink::WebString::FromUTF8(request.fetch_integrity));
+  web_request->SetKeepalive(request.keepalive);
 }
 
 // Converts the |request| to its equivalent type in the Blink API.
diff --git a/content/shell/browser/shell_views.cc b/content/shell/browser/shell_views.cc
index 720310f..f1635e1 100644
--- a/content/shell/browser/shell_views.cc
+++ b/content/shell/browser/shell_views.cc
@@ -347,8 +347,10 @@
 #if defined(USE_AURA)
   wm_state_ = new wm::WMState;
 #endif
+#if !defined(USE_OZONE)
   display::Screen::SetScreenInstance(views::CreateDesktopScreen());
 #endif
+#endif
   views_delegate_ = new views::DesktopTestViewsDelegate();
 }
 
diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn
index b6ca9b5a..6a80fc2 100644
--- a/content/test/BUILD.gn
+++ b/content/test/BUILD.gn
@@ -1693,7 +1693,6 @@
     "//media:test_support",
     "//media/blink",
     "//media/capture",
-    "//media/capture/mojo:capture_types",
     "//media/midi:midi",
     "//media/midi:mojo",
     "//mojo/edk/system",
diff --git a/content/test/data/accessibility/event/add-alert-expected-win.txt b/content/test/data/accessibility/event/add-alert-expected-win.txt
index 6cea202..cefd9c3 100644
--- a/content/test/data/accessibility/event/add-alert-expected-win.txt
+++ b/content/test/data/accessibility/event/add-alert-expected-win.txt
@@ -1 +1 @@
-EVENT_SYSTEM_ALERT on role=ROLE_SYSTEM_ALERT
+EVENT_SYSTEM_ALERT on <div#a> role=ROLE_SYSTEM_ALERT
\ No newline at end of file
diff --git a/content/test/data/accessibility/event/add-child-of-body-expected-win.txt b/content/test/data/accessibility/event/add-child-of-body-expected-win.txt
index 03d7bda1f..66632b4 100644
--- a/content/test/data/accessibility/event/add-child-of-body-expected-win.txt
+++ b/content/test/data/accessibility/event/add-child-of-body-expected-win.txt
@@ -1 +1 @@
-EVENT_OBJECT_SHOW on role=DIV
+EVENT_OBJECT_SHOW on <div> role=DIV
\ No newline at end of file
diff --git a/content/test/data/accessibility/event/add-hidden-attribute-expected-win.txt b/content/test/data/accessibility/event/add-hidden-attribute-expected-win.txt
index 21f76cd..40c164d7 100644
--- a/content/test/data/accessibility/event/add-hidden-attribute-expected-win.txt
+++ b/content/test/data/accessibility/event/add-hidden-attribute-expected-win.txt
@@ -1,3 +1,3 @@
-EVENT_OBJECT_HIDE on role=ROLE_SYSTEM_LISTITEM name="Item 3"
-IA2_EVENT_TEXT_REMOVED on role=ROLE_SYSTEM_LIST old_text={'<obj>' start=2 end=3}
-EVENT_OBJECT_REORDER on role=ROLE_SYSTEM_LIST
+EVENT_OBJECT_HIDE on <div#item3> role=ROLE_SYSTEM_LISTITEM name="Item 3"
+IA2_EVENT_TEXT_REMOVED on <div> role=ROLE_SYSTEM_LIST old_text={'<obj>' start=2 end=3}
+EVENT_OBJECT_REORDER on <div> role=ROLE_SYSTEM_LIST
\ No newline at end of file
diff --git a/content/test/data/accessibility/event/add-hidden-attribute-subtree-expected-win.txt b/content/test/data/accessibility/event/add-hidden-attribute-subtree-expected-win.txt
index 75104bf..ba8d52b1 100644
--- a/content/test/data/accessibility/event/add-hidden-attribute-subtree-expected-win.txt
+++ b/content/test/data/accessibility/event/add-hidden-attribute-subtree-expected-win.txt
@@ -1,3 +1,3 @@
-EVENT_OBJECT_HIDE on role=ROLE_SYSTEM_LISTITEM
-IA2_EVENT_TEXT_REMOVED on role=ROLE_SYSTEM_LIST old_text={'<obj>' start=2 end=3}
-EVENT_OBJECT_REORDER on role=ROLE_SYSTEM_LIST
+EVENT_OBJECT_HIDE on <li#item3> role=ROLE_SYSTEM_LISTITEM
+IA2_EVENT_TEXT_REMOVED on <ul> role=ROLE_SYSTEM_LIST old_text={'<obj>' start=2 end=3}
+EVENT_OBJECT_REORDER on <ul> role=ROLE_SYSTEM_LIST
\ No newline at end of file
diff --git a/content/test/data/accessibility/event/add-subtree-expected-win.txt b/content/test/data/accessibility/event/add-subtree-expected-win.txt
index 49451f8..bffdf927 100644
--- a/content/test/data/accessibility/event/add-subtree-expected-win.txt
+++ b/content/test/data/accessibility/event/add-subtree-expected-win.txt
@@ -1,3 +1,3 @@
-IA2_EVENT_TEXT_INSERTED on role=ROLE_SYSTEM_LIST new_text={'<obj>' start=2 end=3}
-EVENT_OBJECT_SHOW on role=ROLE_SYSTEM_LISTITEM
-EVENT_OBJECT_REORDER on role=ROLE_SYSTEM_LIST
+IA2_EVENT_TEXT_INSERTED on <ul> role=ROLE_SYSTEM_LIST new_text={'<obj>' start=2 end=3}
+EVENT_OBJECT_SHOW on <li> role=ROLE_SYSTEM_LISTITEM
+EVENT_OBJECT_REORDER on <ul> role=ROLE_SYSTEM_LIST
\ No newline at end of file
diff --git a/content/test/data/accessibility/event/aria-combo-box-collapse-expected-win.txt b/content/test/data/accessibility/event/aria-combo-box-collapse-expected-win.txt
index 360d4405..215714c1 100644
--- a/content/test/data/accessibility/event/aria-combo-box-collapse-expected-win.txt
+++ b/content/test/data/accessibility/event/aria-combo-box-collapse-expected-win.txt
@@ -1,3 +1,3 @@
-EVENT_OBJECT_STATECHANGE on role=ROLE_SYSTEM_COMBOBOX FOCUSED,COLLAPSED,FOCUSABLE,HASPOPUP IA2_STATE_EDITABLE,IA2_STATE_SELECTABLE_TEXT,IA2_STATE_SINGLE_LINE,IA2_STATE_SUPPORTS_AUTOCOMPLETION
-EVENT_OBJECT_FOCUS on role=ROLE_SYSTEM_COMBOBOX FOCUSED,COLLAPSED,FOCUSABLE,HASPOPUP IA2_STATE_EDITABLE,IA2_STATE_SELECTABLE_TEXT,IA2_STATE_SINGLE_LINE,IA2_STATE_SUPPORTS_AUTOCOMPLETION
-IA2_EVENT_ACTIVE_DESCENDANT_CHANGED on role=ROLE_SYSTEM_COMBOBOX FOCUSED,COLLAPSED,FOCUSABLE,HASPOPUP IA2_STATE_EDITABLE,IA2_STATE_SELECTABLE_TEXT,IA2_STATE_SINGLE_LINE,IA2_STATE_SUPPORTS_AUTOCOMPLETION
+EVENT_OBJECT_STATECHANGE on <input> role=ROLE_SYSTEM_COMBOBOX FOCUSED,COLLAPSED,FOCUSABLE,HASPOPUP IA2_STATE_EDITABLE,IA2_STATE_SELECTABLE_TEXT,IA2_STATE_SINGLE_LINE,IA2_STATE_SUPPORTS_AUTOCOMPLETION
+EVENT_OBJECT_FOCUS on <input> role=ROLE_SYSTEM_COMBOBOX FOCUSED,COLLAPSED,FOCUSABLE,HASPOPUP IA2_STATE_EDITABLE,IA2_STATE_SELECTABLE_TEXT,IA2_STATE_SINGLE_LINE,IA2_STATE_SUPPORTS_AUTOCOMPLETION
+IA2_EVENT_ACTIVE_DESCENDANT_CHANGED on <input> role=ROLE_SYSTEM_COMBOBOX FOCUSED,COLLAPSED,FOCUSABLE,HASPOPUP IA2_STATE_EDITABLE,IA2_STATE_SELECTABLE_TEXT,IA2_STATE_SINGLE_LINE,IA2_STATE_SUPPORTS_AUTOCOMPLETION
\ No newline at end of file
diff --git a/content/test/data/accessibility/event/aria-combo-box-expand-expected-win.txt b/content/test/data/accessibility/event/aria-combo-box-expand-expected-win.txt
index 76a2a7a..cff24bf 100644
--- a/content/test/data/accessibility/event/aria-combo-box-expand-expected-win.txt
+++ b/content/test/data/accessibility/event/aria-combo-box-expand-expected-win.txt
@@ -1,3 +1,3 @@
-EVENT_OBJECT_STATECHANGE on role=ROLE_SYSTEM_COMBOBOX EXPANDED,FOCUSABLE,HASPOPUP IA2_STATE_EDITABLE,IA2_STATE_SELECTABLE_TEXT,IA2_STATE_SINGLE_LINE,IA2_STATE_SUPPORTS_AUTOCOMPLETION
-EVENT_OBJECT_FOCUS on role=ROLE_SYSTEM_LISTITEM name="Apple" FOCUSED,FOCUSABLE,SELECTABLE
-IA2_EVENT_ACTIVE_DESCENDANT_CHANGED on role=ROLE_SYSTEM_COMBOBOX EXPANDED,FOCUSABLE,HASPOPUP IA2_STATE_EDITABLE,IA2_STATE_SELECTABLE_TEXT,IA2_STATE_SINGLE_LINE,IA2_STATE_SUPPORTS_AUTOCOMPLETION
+EVENT_OBJECT_STATECHANGE on <input> role=ROLE_SYSTEM_COMBOBOX EXPANDED,FOCUSABLE,HASPOPUP IA2_STATE_EDITABLE,IA2_STATE_SELECTABLE_TEXT,IA2_STATE_SINGLE_LINE,IA2_STATE_SUPPORTS_AUTOCOMPLETION
+EVENT_OBJECT_FOCUS on <li#option1> role=ROLE_SYSTEM_LISTITEM name="Apple" FOCUSED,FOCUSABLE,SELECTABLE
+IA2_EVENT_ACTIVE_DESCENDANT_CHANGED on <input> role=ROLE_SYSTEM_COMBOBOX EXPANDED,FOCUSABLE,HASPOPUP IA2_STATE_EDITABLE,IA2_STATE_SELECTABLE_TEXT,IA2_STATE_SINGLE_LINE,IA2_STATE_SUPPORTS_AUTOCOMPLETION
\ No newline at end of file
diff --git a/content/test/data/accessibility/event/aria-combo-box-next-expected-win.txt b/content/test/data/accessibility/event/aria-combo-box-next-expected-win.txt
index aa42715..c0c78727 100644
--- a/content/test/data/accessibility/event/aria-combo-box-next-expected-win.txt
+++ b/content/test/data/accessibility/event/aria-combo-box-next-expected-win.txt
@@ -1,2 +1,2 @@
-EVENT_OBJECT_FOCUS on role=ROLE_SYSTEM_LISTITEM name="Banana" FOCUSED,FOCUSABLE,SELECTABLE
-IA2_EVENT_ACTIVE_DESCENDANT_CHANGED on role=ROLE_SYSTEM_COMBOBOX EXPANDED,FOCUSABLE,HASPOPUP IA2_STATE_EDITABLE,IA2_STATE_SELECTABLE_TEXT,IA2_STATE_SINGLE_LINE,IA2_STATE_SUPPORTS_AUTOCOMPLETION
+EVENT_OBJECT_FOCUS on <li#option3> role=ROLE_SYSTEM_LISTITEM name="Banana" FOCUSED,FOCUSABLE,SELECTABLE
+IA2_EVENT_ACTIVE_DESCENDANT_CHANGED on <input> role=ROLE_SYSTEM_COMBOBOX EXPANDED,FOCUSABLE,HASPOPUP IA2_STATE_EDITABLE,IA2_STATE_SELECTABLE_TEXT,IA2_STATE_SINGLE_LINE,IA2_STATE_SUPPORTS_AUTOCOMPLETION
\ No newline at end of file
diff --git a/content/test/data/accessibility/event/aria-slider-value-both-change-expected-win.txt b/content/test/data/accessibility/event/aria-slider-value-both-change-expected-win.txt
index 7e1ef31..e7c71c2b8 100644
--- a/content/test/data/accessibility/event/aria-slider-value-both-change-expected-win.txt
+++ b/content/test/data/accessibility/event/aria-slider-value-both-change-expected-win.txt
@@ -1 +1 @@
-EVENT_OBJECT_VALUECHANGE on role=ROLE_SYSTEM_SLIDER value="2%" IA2_STATE_VERTICAL
+EVENT_OBJECT_VALUECHANGE on <div#slider> role=ROLE_SYSTEM_SLIDER value="2%" IA2_STATE_VERTICAL
\ No newline at end of file
diff --git a/content/test/data/accessibility/event/aria-slider-value-change-expected-win.txt b/content/test/data/accessibility/event/aria-slider-value-change-expected-win.txt
index 9776e0b..a8a79ec 100644
--- a/content/test/data/accessibility/event/aria-slider-value-change-expected-win.txt
+++ b/content/test/data/accessibility/event/aria-slider-value-change-expected-win.txt
@@ -1 +1 @@
-EVENT_OBJECT_VALUECHANGE on role=ROLE_SYSTEM_SLIDER value="2" IA2_STATE_HORIZONTAL
+EVENT_OBJECT_VALUECHANGE on <div#slider> role=ROLE_SYSTEM_SLIDER value="2" IA2_STATE_HORIZONTAL
\ No newline at end of file
diff --git a/content/test/data/accessibility/event/aria-slider-valuetext-change-expected-win.txt b/content/test/data/accessibility/event/aria-slider-valuetext-change-expected-win.txt
index 7e1ef31..e7c71c2b8 100644
--- a/content/test/data/accessibility/event/aria-slider-valuetext-change-expected-win.txt
+++ b/content/test/data/accessibility/event/aria-slider-valuetext-change-expected-win.txt
@@ -1 +1 @@
-EVENT_OBJECT_VALUECHANGE on role=ROLE_SYSTEM_SLIDER value="2%" IA2_STATE_VERTICAL
+EVENT_OBJECT_VALUECHANGE on <div#slider> role=ROLE_SYSTEM_SLIDER value="2%" IA2_STATE_VERTICAL
\ No newline at end of file
diff --git a/content/test/data/accessibility/event/aria-spinbutton-value-both-change-expected-win.txt b/content/test/data/accessibility/event/aria-spinbutton-value-both-change-expected-win.txt
index 2e7b489..9a366422 100644
--- a/content/test/data/accessibility/event/aria-spinbutton-value-both-change-expected-win.txt
+++ b/content/test/data/accessibility/event/aria-spinbutton-value-both-change-expected-win.txt
@@ -1 +1 @@
-EVENT_OBJECT_VALUECHANGE on role=ROLE_SYSTEM_SPINBUTTON value="2%"
+EVENT_OBJECT_VALUECHANGE on <div#spinbutton> role=ROLE_SYSTEM_SPINBUTTON value="2%"
\ No newline at end of file
diff --git a/content/test/data/accessibility/event/aria-spinbutton-value-change-expected-win.txt b/content/test/data/accessibility/event/aria-spinbutton-value-change-expected-win.txt
index 4f40b59..3b026145 100644
--- a/content/test/data/accessibility/event/aria-spinbutton-value-change-expected-win.txt
+++ b/content/test/data/accessibility/event/aria-spinbutton-value-change-expected-win.txt
@@ -1 +1 @@
-EVENT_OBJECT_VALUECHANGE on role=ROLE_SYSTEM_SPINBUTTON value="2"
+EVENT_OBJECT_VALUECHANGE on <div#spinbutton> role=ROLE_SYSTEM_SPINBUTTON value="2"
\ No newline at end of file
diff --git a/content/test/data/accessibility/event/aria-spinbutton-valuetext-change-expected-win.txt b/content/test/data/accessibility/event/aria-spinbutton-valuetext-change-expected-win.txt
index 2e7b489..9a366422 100644
--- a/content/test/data/accessibility/event/aria-spinbutton-valuetext-change-expected-win.txt
+++ b/content/test/data/accessibility/event/aria-spinbutton-valuetext-change-expected-win.txt
@@ -1 +1 @@
-EVENT_OBJECT_VALUECHANGE on role=ROLE_SYSTEM_SPINBUTTON value="2%"
+EVENT_OBJECT_VALUECHANGE on <div#spinbutton> role=ROLE_SYSTEM_SPINBUTTON value="2%"
\ No newline at end of file
diff --git a/content/test/data/accessibility/event/checked-state-changed-expected-win.txt b/content/test/data/accessibility/event/checked-state-changed-expected-win.txt
index cc184f5..2e431a8 100644
--- a/content/test/data/accessibility/event/checked-state-changed-expected-win.txt
+++ b/content/test/data/accessibility/event/checked-state-changed-expected-win.txt
@@ -1,2 +1,2 @@
-EVENT_OBJECT_STATECHANGE on role=ROLE_SYSTEM_CHECKBUTTON name="My Checkbox" CHECKED,FOCUSABLE IA2_STATE_CHECKABLE
-EVENT_OBJECT_STATECHANGE on role=ROLE_SYSTEM_OUTLINEITEM name="Treeitem" CHECKED,SELECTABLE IA2_STATE_CHECKABLE
\ No newline at end of file
+EVENT_OBJECT_STATECHANGE on <input#c> role=ROLE_SYSTEM_CHECKBUTTON name="My Checkbox" CHECKED,FOCUSABLE IA2_STATE_CHECKABLE
+EVENT_OBJECT_STATECHANGE on <div#treeitem> role=ROLE_SYSTEM_OUTLINEITEM name="Treeitem" CHECKED,SELECTABLE IA2_STATE_CHECKABLE
\ No newline at end of file
diff --git a/content/test/data/accessibility/event/css-display-expected-win.txt b/content/test/data/accessibility/event/css-display-expected-win.txt
index 156653f..a3cce1a 100644
--- a/content/test/data/accessibility/event/css-display-expected-win.txt
+++ b/content/test/data/accessibility/event/css-display-expected-win.txt
@@ -1,5 +1,5 @@
-EVENT_OBJECT_HIDE on role=DIV name="Heading"
-IA2_EVENT_TEXT_REMOVED on role=ROLE_SYSTEM_TOOLBAR IA2_STATE_HORIZONTAL old_text={'<obj>' start=0 end=1}
-IA2_EVENT_TEXT_INSERTED on role=ROLE_SYSTEM_TOOLBAR IA2_STATE_HORIZONTAL new_text={'<obj>' start=0 end=1}
-EVENT_OBJECT_SHOW on role=ROLE_SYSTEM_GROUPING name="Banner"
-EVENT_OBJECT_REORDER on role=ROLE_SYSTEM_TOOLBAR IA2_STATE_HORIZONTAL
+EVENT_OBJECT_HIDE on <div> role=DIV name="Heading"
+IA2_EVENT_TEXT_REMOVED on <div> role=ROLE_SYSTEM_TOOLBAR IA2_STATE_HORIZONTAL old_text={'<obj>' start=0 end=1}
+IA2_EVENT_TEXT_INSERTED on <div> role=ROLE_SYSTEM_TOOLBAR IA2_STATE_HORIZONTAL new_text={'<obj>' start=0 end=1}
+EVENT_OBJECT_SHOW on <div> role=ROLE_SYSTEM_GROUPING name="Banner"
+EVENT_OBJECT_REORDER on <div> role=ROLE_SYSTEM_TOOLBAR IA2_STATE_HORIZONTAL
\ No newline at end of file
diff --git a/content/test/data/accessibility/event/css-visibility-expected-win.txt b/content/test/data/accessibility/event/css-visibility-expected-win.txt
index 156653f..a3cce1a 100644
--- a/content/test/data/accessibility/event/css-visibility-expected-win.txt
+++ b/content/test/data/accessibility/event/css-visibility-expected-win.txt
@@ -1,5 +1,5 @@
-EVENT_OBJECT_HIDE on role=DIV name="Heading"
-IA2_EVENT_TEXT_REMOVED on role=ROLE_SYSTEM_TOOLBAR IA2_STATE_HORIZONTAL old_text={'<obj>' start=0 end=1}
-IA2_EVENT_TEXT_INSERTED on role=ROLE_SYSTEM_TOOLBAR IA2_STATE_HORIZONTAL new_text={'<obj>' start=0 end=1}
-EVENT_OBJECT_SHOW on role=ROLE_SYSTEM_GROUPING name="Banner"
-EVENT_OBJECT_REORDER on role=ROLE_SYSTEM_TOOLBAR IA2_STATE_HORIZONTAL
+EVENT_OBJECT_HIDE on <div> role=DIV name="Heading"
+IA2_EVENT_TEXT_REMOVED on <div> role=ROLE_SYSTEM_TOOLBAR IA2_STATE_HORIZONTAL old_text={'<obj>' start=0 end=1}
+IA2_EVENT_TEXT_INSERTED on <div> role=ROLE_SYSTEM_TOOLBAR IA2_STATE_HORIZONTAL new_text={'<obj>' start=0 end=1}
+EVENT_OBJECT_SHOW on <div> role=ROLE_SYSTEM_GROUPING name="Banner"
+EVENT_OBJECT_REORDER on <div> role=ROLE_SYSTEM_TOOLBAR IA2_STATE_HORIZONTAL
\ No newline at end of file
diff --git a/content/test/data/accessibility/event/description-change-expected-win.txt b/content/test/data/accessibility/event/description-change-expected-win.txt
index c53e34d8..6db35f5 100644
--- a/content/test/data/accessibility/event/description-change-expected-win.txt
+++ b/content/test/data/accessibility/event/description-change-expected-win.txt
@@ -1 +1 @@
-EVENT_OBJECT_DESCRIPTIONCHANGE on role=H1 name="Before"
+EVENT_OBJECT_DESCRIPTIONCHANGE on <h1#a> role=H1 name="Before"
\ No newline at end of file
diff --git a/content/test/data/accessibility/event/description-change-indirect-expected-win.txt b/content/test/data/accessibility/event/description-change-indirect-expected-win.txt
index d41a504..a5251e3 100644
--- a/content/test/data/accessibility/event/description-change-indirect-expected-win.txt
+++ b/content/test/data/accessibility/event/description-change-indirect-expected-win.txt
@@ -1,7 +1,7 @@
 EVENT_OBJECT_HIDE on role=ROLE_SYSTEM_STATICTEXT name="apples"
-EVENT_OBJECT_NAMECHANGE on role=H1 name="oranges"
-IA2_EVENT_TEXT_REMOVED on role=H1 name="oranges" old_text={'appl' start=0 end=4}
-IA2_EVENT_TEXT_INSERTED on role=H1 name="oranges" new_text={'orang' start=0 end=5}
+EVENT_OBJECT_NAMECHANGE on <h1#title> role=H1 name="oranges"
+IA2_EVENT_TEXT_REMOVED on <h1#title> role=H1 name="oranges" old_text={'appl' start=0 end=4}
+IA2_EVENT_TEXT_INSERTED on <h1#title> role=H1 name="oranges" new_text={'orang' start=0 end=5}
 EVENT_OBJECT_SHOW on role=ROLE_SYSTEM_STATICTEXT name="oranges"
-EVENT_OBJECT_DESCRIPTIONCHANGE on role=ROLE_SYSTEM_GROUPING
-EVENT_OBJECT_REORDER on role=H1 name="oranges"
+EVENT_OBJECT_DESCRIPTIONCHANGE on <div> role=ROLE_SYSTEM_GROUPING
+EVENT_OBJECT_REORDER on <h1#title> role=H1 name="oranges"
\ No newline at end of file
diff --git a/content/test/data/accessibility/event/inner-html-change-expected-win.txt b/content/test/data/accessibility/event/inner-html-change-expected-win.txt
index 5b6aa8f9..39ba107 100644
--- a/content/test/data/accessibility/event/inner-html-change-expected-win.txt
+++ b/content/test/data/accessibility/event/inner-html-change-expected-win.txt
@@ -1,6 +1,6 @@
-EVENT_OBJECT_HIDE on role=H1 name="A"
-EVENT_OBJECT_HIDE on role=P
-IA2_EVENT_TEXT_REMOVED on role=ROLE_SYSTEM_GROUPING old_text={'<obj><obj>' start=0 end=2}
-IA2_EVENT_TEXT_INSERTED on role=ROLE_SYSTEM_GROUPING new_text={'<obj><obj>' start=0 end=2}
-EVENT_OBJECT_SHOW on role=H1 name="C"
-EVENT_OBJECT_SHOW on role=P
+EVENT_OBJECT_HIDE on <h1> role=H1 name="A"
+EVENT_OBJECT_HIDE on <p> role=P
+IA2_EVENT_TEXT_REMOVED on <div#main> role=ROLE_SYSTEM_GROUPING old_text={'<obj><obj>' start=0 end=2}
+IA2_EVENT_TEXT_INSERTED on <div#main> role=ROLE_SYSTEM_GROUPING new_text={'<obj><obj>' start=0 end=2}
+EVENT_OBJECT_SHOW on <h1> role=H1 name="C"
+EVENT_OBJECT_SHOW on <p> role=P
\ No newline at end of file
diff --git a/content/test/data/accessibility/event/input-type-text-value-changed-expected-win.txt b/content/test/data/accessibility/event/input-type-text-value-changed-expected-win.txt
index 3776899..52bd2a6 100644
--- a/content/test/data/accessibility/event/input-type-text-value-changed-expected-win.txt
+++ b/content/test/data/accessibility/event/input-type-text-value-changed-expected-win.txt
@@ -1 +1 @@
-EVENT_OBJECT_VALUECHANGE on role=ROLE_SYSTEM_TEXT value="After" FOCUSABLE IA2_STATE_EDITABLE,IA2_STATE_SELECTABLE_TEXT,IA2_STATE_SINGLE_LINE
+EVENT_OBJECT_VALUECHANGE on <input#c> role=ROLE_SYSTEM_TEXT value="After" FOCUSABLE IA2_STATE_EDITABLE,IA2_STATE_SELECTABLE_TEXT,IA2_STATE_SINGLE_LINE
\ No newline at end of file
diff --git a/content/test/data/accessibility/event/listbox-focus-expected-win.txt b/content/test/data/accessibility/event/listbox-focus-expected-win.txt
index 2550580d..0e8874f 100644
--- a/content/test/data/accessibility/event/listbox-focus-expected-win.txt
+++ b/content/test/data/accessibility/event/listbox-focus-expected-win.txt
@@ -1 +1 @@
-EVENT_OBJECT_FOCUS on role=ROLE_SYSTEM_LIST FOCUSED,FOCUSABLE IA2_STATE_VERTICAL
+EVENT_OBJECT_FOCUS on <select> role=ROLE_SYSTEM_LIST FOCUSED,FOCUSABLE IA2_STATE_VERTICAL
\ No newline at end of file
diff --git a/content/test/data/accessibility/event/listbox-next-expected-win.txt b/content/test/data/accessibility/event/listbox-next-expected-win.txt
index 6771bd1..18b5b71 100644
--- a/content/test/data/accessibility/event/listbox-next-expected-win.txt
+++ b/content/test/data/accessibility/event/listbox-next-expected-win.txt
@@ -1,7 +1,6 @@
-EVENT_OBJECT_STATECHANGE on role=ROLE_SYSTEM_LISTITEM name="Orange" SELECTED,FOCUSABLE,SELECTABLE
-EVENT_OBJECT_SELECTION on role=ROLE_SYSTEM_LISTITEM name="Orange" SELECTED,FOCUSABLE,SELECTABLE
-EVENT_OBJECT_STATECHANGE on role=ROLE_SYSTEM_LISTITEM name="Apple" FOCUSABLE,SELECTABLE
-EVENT_OBJECT_FOCUS on role=ROLE_SYSTEM_LISTITEM name="Orange" SELECTED,FOCUSED,FOCUSABLE,SELECTABLE
-IA2_EVENT_ACTIVE_DESCENDANT_CHANGED on role=ROLE_SYSTEM_LIST FOCUSABLE IA2_STATE_VERTICAL
-EVENT_OBJECT_SELECTIONWITHIN on role=ROLE_SYSTEM_LIST FOCUSABLE IA2_STATE_VERTICAL
-<-- End-of-file -->
\ No newline at end of file
+EVENT_OBJECT_STATECHANGE on <option> role=ROLE_SYSTEM_LISTITEM name="Orange" SELECTED,FOCUSABLE,SELECTABLE
+EVENT_OBJECT_SELECTION on <option> role=ROLE_SYSTEM_LISTITEM name="Orange" SELECTED,FOCUSABLE,SELECTABLE
+EVENT_OBJECT_STATECHANGE on <option> role=ROLE_SYSTEM_LISTITEM name="Apple" FOCUSABLE,SELECTABLE
+EVENT_OBJECT_FOCUS on <option> role=ROLE_SYSTEM_LISTITEM name="Orange" SELECTED,FOCUSED,FOCUSABLE,SELECTABLE
+IA2_EVENT_ACTIVE_DESCENDANT_CHANGED on <select> role=ROLE_SYSTEM_LIST FOCUSABLE IA2_STATE_VERTICAL
+EVENT_OBJECT_SELECTIONWITHIN on <select> role=ROLE_SYSTEM_LIST FOCUSABLE IA2_STATE_VERTICAL
\ No newline at end of file
diff --git a/content/test/data/accessibility/event/live-region-add-expected-win.txt b/content/test/data/accessibility/event/live-region-add-expected-win.txt
index f19994f..32f13d6 100644
--- a/content/test/data/accessibility/event/live-region-add-expected-win.txt
+++ b/content/test/data/accessibility/event/live-region-add-expected-win.txt
@@ -1,4 +1,4 @@
-IA2_EVENT_TEXT_INSERTED on role=DIV new_text={'<obj>' start=6 end=7}
-EVENT_OBJECT_SHOW on role=P
-EVENT_OBJECT_REORDER on role=DIV
-EVENT_OBJECT_LIVEREGIONCHANGED on role=DIV
+IA2_EVENT_TEXT_INSERTED on <div#live> role=DIV new_text={'<obj>' start=6 end=7}
+EVENT_OBJECT_SHOW on <p> role=P
+EVENT_OBJECT_REORDER on <div#live> role=DIV
+EVENT_OBJECT_LIVEREGIONCHANGED on <div#live> role=DIV
\ No newline at end of file
diff --git a/content/test/data/accessibility/event/live-region-change-expected-win.txt b/content/test/data/accessibility/event/live-region-change-expected-win.txt
index bec69b2..3fa68df 100644
--- a/content/test/data/accessibility/event/live-region-change-expected-win.txt
+++ b/content/test/data/accessibility/event/live-region-change-expected-win.txt
@@ -1,6 +1,6 @@
 EVENT_OBJECT_NAMECHANGE on role=ROLE_SYSTEM_STATICTEXT name="After"
 IA2_EVENT_TEXT_REMOVED on role=ROLE_SYSTEM_STATICTEXT name="After" old_text={'Before' start=0 end=6}
 IA2_EVENT_TEXT_INSERTED on role=ROLE_SYSTEM_STATICTEXT name="After" new_text={'After' start=0 end=5}
-IA2_EVENT_TEXT_REMOVED on role=DIV old_text={'Before' start=0 end=6}
-IA2_EVENT_TEXT_INSERTED on role=DIV new_text={'After' start=0 end=5}
-EVENT_OBJECT_LIVEREGIONCHANGED on role=DIV
+IA2_EVENT_TEXT_REMOVED on <div#live> role=DIV old_text={'Before' start=0 end=6}
+IA2_EVENT_TEXT_INSERTED on <div#live> role=DIV new_text={'After' start=0 end=5}
+EVENT_OBJECT_LIVEREGIONCHANGED on <div#live> role=DIV
\ No newline at end of file
diff --git a/content/test/data/accessibility/event/live-region-create-expected-win.txt b/content/test/data/accessibility/event/live-region-create-expected-win.txt
index 10bd0c4..74b3241e7 100644
--- a/content/test/data/accessibility/event/live-region-create-expected-win.txt
+++ b/content/test/data/accessibility/event/live-region-create-expected-win.txt
@@ -1,3 +1,3 @@
-IA2_EVENT_TEXT_INSERTED on role=DIV new_text={'<obj>' start=1 end=2}
-EVENT_OBJECT_SHOW on role=DIV
-EVENT_OBJECT_REORDER on role=DIV
+IA2_EVENT_TEXT_INSERTED on <div#container> role=DIV new_text={'<obj>' start=1 end=2}
+EVENT_OBJECT_SHOW on <div> role=DIV
+EVENT_OBJECT_REORDER on <div#container> role=DIV
\ No newline at end of file
diff --git a/content/test/data/accessibility/event/menulist-collapse-expected-win.txt b/content/test/data/accessibility/event/menulist-collapse-expected-win.txt
index 5ed2eb42..6f816c75 100644
--- a/content/test/data/accessibility/event/menulist-collapse-expected-win.txt
+++ b/content/test/data/accessibility/event/menulist-collapse-expected-win.txt
@@ -1,2 +1,2 @@
-EVENT_OBJECT_STATECHANGE on role=ROLE_SYSTEM_LISTITEM name="Apple" FOCUSED,INVISIBLE,FOCUSABLE,SELECTABLE
-EVENT_OBJECT_VALUECHANGE on role=ROLE_SYSTEM_COMBOBOX COLLAPSED,FOCUSABLE,HASPOPUP
+EVENT_OBJECT_STATECHANGE on <option> role=ROLE_SYSTEM_LISTITEM name="Apple" FOCUSED,INVISIBLE,FOCUSABLE,SELECTABLE
+EVENT_OBJECT_VALUECHANGE on <select> role=ROLE_SYSTEM_COMBOBOX COLLAPSED,FOCUSABLE,HASPOPUP
\ No newline at end of file
diff --git a/content/test/data/accessibility/event/menulist-focus-expected-win.txt b/content/test/data/accessibility/event/menulist-focus-expected-win.txt
index ac94789..af861d9e 100644
--- a/content/test/data/accessibility/event/menulist-focus-expected-win.txt
+++ b/content/test/data/accessibility/event/menulist-focus-expected-win.txt
@@ -1 +1 @@
-EVENT_OBJECT_FOCUS on role=ROLE_SYSTEM_LISTITEM name="Apple" SELECTED,FOCUSED,FOCUSABLE,SELECTABLE
+EVENT_OBJECT_FOCUS on <option> role=ROLE_SYSTEM_LISTITEM name="Apple" SELECTED,FOCUSED,FOCUSABLE,SELECTABLE
\ No newline at end of file
diff --git a/content/test/data/accessibility/event/name-change-expected-win.txt b/content/test/data/accessibility/event/name-change-expected-win.txt
index 8c811e52..c5ef9444 100644
--- a/content/test/data/accessibility/event/name-change-expected-win.txt
+++ b/content/test/data/accessibility/event/name-change-expected-win.txt
@@ -1 +1 @@
-EVENT_OBJECT_NAMECHANGE on role=H1 name="After"
+EVENT_OBJECT_NAMECHANGE on <h1#a> role=H1 name="After"
\ No newline at end of file
diff --git a/content/test/data/accessibility/event/name-change-indirect-expected-win.txt b/content/test/data/accessibility/event/name-change-indirect-expected-win.txt
index 30bb23749..969eea31 100644
--- a/content/test/data/accessibility/event/name-change-indirect-expected-win.txt
+++ b/content/test/data/accessibility/event/name-change-indirect-expected-win.txt
@@ -1,7 +1,7 @@
 EVENT_OBJECT_HIDE on role=ROLE_SYSTEM_STATICTEXT name="apples"
-EVENT_OBJECT_NAMECHANGE on role=H1 name="oranges"
-IA2_EVENT_TEXT_REMOVED on role=H1 name="oranges" old_text={'appl' start=0 end=4}
-IA2_EVENT_TEXT_INSERTED on role=H1 name="oranges" new_text={'orang' start=0 end=5}
+EVENT_OBJECT_NAMECHANGE on <h1#title> role=H1 name="oranges"
+IA2_EVENT_TEXT_REMOVED on <h1#title> role=H1 name="oranges" old_text={'appl' start=0 end=4}
+IA2_EVENT_TEXT_INSERTED on <h1#title> role=H1 name="oranges" new_text={'orang' start=0 end=5}
 EVENT_OBJECT_SHOW on role=ROLE_SYSTEM_STATICTEXT name="oranges"
-EVENT_OBJECT_NAMECHANGE on role=ROLE_SYSTEM_GROUPING name="oranges"
-EVENT_OBJECT_REORDER on role=H1 name="oranges"
+EVENT_OBJECT_NAMECHANGE on <div> role=ROLE_SYSTEM_GROUPING name="oranges"
+EVENT_OBJECT_REORDER on <h1#title> role=H1 name="oranges"
\ No newline at end of file
diff --git a/content/test/data/accessibility/event/remove-child-expected-win.txt b/content/test/data/accessibility/event/remove-child-expected-win.txt
index 21f76cd..40c164d7 100644
--- a/content/test/data/accessibility/event/remove-child-expected-win.txt
+++ b/content/test/data/accessibility/event/remove-child-expected-win.txt
@@ -1,3 +1,3 @@
-EVENT_OBJECT_HIDE on role=ROLE_SYSTEM_LISTITEM name="Item 3"
-IA2_EVENT_TEXT_REMOVED on role=ROLE_SYSTEM_LIST old_text={'<obj>' start=2 end=3}
-EVENT_OBJECT_REORDER on role=ROLE_SYSTEM_LIST
+EVENT_OBJECT_HIDE on <div#item3> role=ROLE_SYSTEM_LISTITEM name="Item 3"
+IA2_EVENT_TEXT_REMOVED on <div> role=ROLE_SYSTEM_LIST old_text={'<obj>' start=2 end=3}
+EVENT_OBJECT_REORDER on <div> role=ROLE_SYSTEM_LIST
\ No newline at end of file
diff --git a/content/test/data/accessibility/event/remove-hidden-attribute-expected-win.txt b/content/test/data/accessibility/event/remove-hidden-attribute-expected-win.txt
index 5a2f0a84..5c6819b 100644
--- a/content/test/data/accessibility/event/remove-hidden-attribute-expected-win.txt
+++ b/content/test/data/accessibility/event/remove-hidden-attribute-expected-win.txt
@@ -1,3 +1,3 @@
-IA2_EVENT_TEXT_INSERTED on role=ROLE_SYSTEM_LIST new_text={'<obj>' start=2 end=3}
-EVENT_OBJECT_SHOW on role=ROLE_SYSTEM_LISTITEM name="Item 3"
-EVENT_OBJECT_REORDER on role=ROLE_SYSTEM_LIST
+IA2_EVENT_TEXT_INSERTED on <div> role=ROLE_SYSTEM_LIST new_text={'<obj>' start=2 end=3}
+EVENT_OBJECT_SHOW on <div#item3> role=ROLE_SYSTEM_LISTITEM name="Item 3"
+EVENT_OBJECT_REORDER on <div> role=ROLE_SYSTEM_LIST
\ No newline at end of file
diff --git a/content/test/data/accessibility/event/remove-hidden-attribute-subtree-expected-win.txt b/content/test/data/accessibility/event/remove-hidden-attribute-subtree-expected-win.txt
index 49451f8..efecd44 100644
--- a/content/test/data/accessibility/event/remove-hidden-attribute-subtree-expected-win.txt
+++ b/content/test/data/accessibility/event/remove-hidden-attribute-subtree-expected-win.txt
@@ -1,3 +1,3 @@
-IA2_EVENT_TEXT_INSERTED on role=ROLE_SYSTEM_LIST new_text={'<obj>' start=2 end=3}
-EVENT_OBJECT_SHOW on role=ROLE_SYSTEM_LISTITEM
-EVENT_OBJECT_REORDER on role=ROLE_SYSTEM_LIST
+IA2_EVENT_TEXT_INSERTED on <ul> role=ROLE_SYSTEM_LIST new_text={'<obj>' start=2 end=3}
+EVENT_OBJECT_SHOW on <li#item3> role=ROLE_SYSTEM_LISTITEM
+EVENT_OBJECT_REORDER on <ul> role=ROLE_SYSTEM_LIST
\ No newline at end of file
diff --git a/content/test/data/accessibility/event/text-changed-expected-win.txt b/content/test/data/accessibility/event/text-changed-expected-win.txt
index 674186d19..348bca9 100644
--- a/content/test/data/accessibility/event/text-changed-expected-win.txt
+++ b/content/test/data/accessibility/event/text-changed-expected-win.txt
@@ -1,11 +1,11 @@
 EVENT_OBJECT_HIDE on role=ROLE_SYSTEM_STATICTEXT name="Para"
-IA2_EVENT_TEXT_INSERTED on role=P new_text={'Modified ' start=0 end=9}
+IA2_EVENT_TEXT_INSERTED on <p#p> role=P new_text={'Modified ' start=0 end=9}
 EVENT_OBJECT_SHOW on role=ROLE_SYSTEM_STATICTEXT name="Modified Para"
 EVENT_OBJECT_NAMECHANGE on role=ROLE_SYSTEM_STATICTEXT name="Modified Heading"
 IA2_EVENT_TEXT_INSERTED on role=ROLE_SYSTEM_STATICTEXT name="Modified Heading" new_text={'Modified ' start=0 end=9}
-IA2_EVENT_TEXT_INSERTED on role=H2 name="Heading" new_text={'Modified ' start=0 end=9}
+IA2_EVENT_TEXT_INSERTED on <h2#h> role=H2 name="Heading" new_text={'Modified ' start=0 end=9}
 EVENT_OBJECT_NAMECHANGE on role=ROLE_SYSTEM_STATICTEXT name="Text modified"
 IA2_EVENT_TEXT_REMOVED on role=ROLE_SYSTEM_STATICTEXT name="Text modified" old_text={'Div' start=0 end=3}
 IA2_EVENT_TEXT_INSERTED on role=ROLE_SYSTEM_STATICTEXT name="Text modified" new_text={'Text modified' start=0 end=13}
-IA2_EVENT_TEXT_REMOVED on role=DIV name="div" old_text={'Div' start=0 end=3}
-IA2_EVENT_TEXT_INSERTED on role=DIV name="div" new_text={'Text modified' start=0 end=13}
+IA2_EVENT_TEXT_REMOVED on <div> role=DIV name="div" old_text={'Div' start=0 end=3}
+IA2_EVENT_TEXT_INSERTED on <div> role=DIV name="div" new_text={'Text modified' start=0 end=13}
\ No newline at end of file
diff --git a/content/test/gpu/gpu_tests/webgl_conformance_expectations.py b/content/test/gpu/gpu_tests/webgl_conformance_expectations.py
index bfb51d89..ba0f078 100644
--- a/content/test/gpu/gpu_tests/webgl_conformance_expectations.py
+++ b/content/test/gpu/gpu_tests/webgl_conformance_expectations.py
@@ -167,14 +167,18 @@
         ['passthrough', 'opengl'], bug=2198) # angle bug ID
 
     # Passthrough command decoder / OpenGL / Intel
-    self.Fail('conformance/textures/misc/texture-attachment-formats.html',
-        ['passthrough', 'opengl', 'intel'], bug=665521)
+    self.Fail('conformance/extensions/webgl-draw-buffers.html',
+        ['passthrough', 'opengl', 'intel'], bug=1523) # angle bug ID
     self.Fail('conformance/glsl/constructors/glsl-construct-mat2.html',
         ['passthrough', 'opengl', 'intel'], bug=665521)
+    self.Fail('conformance/textures/misc/texture-attachment-formats.html',
+        ['passthrough', 'opengl', 'intel'], bug=665521)
 
     # Passthrough command decoder / OpenGL / AMD
     # self.Fail('conformance/extensions/ext-sRGB.html',
     #     ['passthrough', 'opengl', 'amd'], bug=679696)
+    self.Fail('conformance/extensions/webgl-draw-buffers.html',
+        ['passthrough', 'opengl', 'amd', 'linux'], bug=1523) # angle bug ID
     self.Fail('conformance/glsl/constructors/glsl-construct-mat2.html',
         ['passthrough', 'opengl', 'amd'], bug=665521)
     self.Fail('conformance/glsl/constructors/' +
diff --git a/content/test/test_render_frame.cc b/content/test/test_render_frame.cc
index 9e07a73..a82c6cb6 100644
--- a/content/test/test_render_frame.cc
+++ b/content/test/test_render_frame.cc
@@ -140,11 +140,12 @@
 
 void TestRenderFrame::Navigate(const CommonNavigationParams& common_params,
                                const RequestNavigationParams& request_params) {
-  CommitNavigation(
-      network::ResourceResponseHead(), GURL(), common_params, request_params,
-      network::mojom::URLLoaderClientEndpointsPtr(), URLLoaderFactoryBundle(),
-      mojom::ControllerServiceWorkerInfoPtr(),
-      base::UnguessableToken::Create());
+  CommitNavigation(network::ResourceResponseHead(), GURL(), common_params,
+                   request_params,
+                   network::mojom::URLLoaderClientEndpointsPtr(),
+                   std::make_unique<URLLoaderFactoryBundleInfo>(),
+                   mojom::ControllerServiceWorkerInfoPtr(),
+                   base::UnguessableToken::Create());
 }
 
 void TestRenderFrame::SwapOut(
diff --git a/content/test/test_render_frame_host.cc b/content/test/test_render_frame_host.cc
index 5d7ce5e2..52e8670 100644
--- a/content/test/test_render_frame_host.cc
+++ b/content/test/test_render_frame_host.cc
@@ -64,7 +64,7 @@
       const CommonNavigationParams& common_params,
       const RequestNavigationParams& request_params,
       network::mojom::URLLoaderClientEndpointsPtr url_loader_client_endpoints,
-      base::Optional<URLLoaderFactoryBundle> subresource_loader_factories,
+      std::unique_ptr<URLLoaderFactoryBundleInfo> subresource_loader_factories,
       mojom::ControllerServiceWorkerInfoPtr controller_service_worker,
       const base::UnguessableToken& devtools_navigation_token) override {
     frame_host_->GetProcess()->set_did_frame_commit_navigation(true);
@@ -81,8 +81,8 @@
       bool has_stale_copy_in_cache,
       int32_t error_code,
       const base::Optional<std::string>& error_page_content,
-      base::Optional<content::URLLoaderFactoryBundle>
-          subresource_loader_factories) override {}
+      std::unique_ptr<URLLoaderFactoryBundleInfo> subresource_loader_factories)
+      override {}
 
  private:
   TestRenderFrameHost* const frame_host_;
diff --git a/docs/memory/tools.md b/docs/memory/tools.md
index 60dbd15..e1f923aa 100644
--- a/docs/memory/tools.md
+++ b/docs/memory/tools.md
@@ -164,7 +164,7 @@
      dump of all the profiled processes. On Android, enable debugging via USB
      and use chrome://inspect/?tracing#devices to take a memory-infra trace
      which will have the heap dump embedded.
-  2. Symbolize trace using  [`symbolize_trace.py`](../../third_party/catapult/experimental/tracing/bin/symbolize_trace.py)
+  2. Symbolize trace using  [`symbolize_trace.py`](../../third_party/catapult/tracing/bin/symbolize_trace). If the Chrome binary was built locally, pass the flag "--is-local-build".
   3. Analyze resuing heap dump using [`diff_heap_profiler.py`](#diff-heap-profiler), or [Heap Profile view in Chrome Tracing](#tracing-heap-profile)
 
 On deskop, using chrome://memory-internals to take a heap dump is more reliable
diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc
index 4068a7f2..58e1c8a 100644
--- a/gpu/command_buffer/client/gles2_implementation.cc
+++ b/gpu/command_buffer/client/gles2_implementation.cc
@@ -6304,8 +6304,6 @@
       return capabilities.texture_format_etc1;
     case GL_R16_EXT:
       return capabilities.texture_norm16;
-    case GL_RGB10_A2_EXT:
-      return capabilities.image_xr30;
     case GL_RED:
     case GL_RG_EXT:
     case GL_RGB:
diff --git a/gpu/ipc/common/gpu_memory_buffer_support.cc b/gpu/ipc/common/gpu_memory_buffer_support.cc
index 1a8313b..6d4a1ec 100644
--- a/gpu/ipc/common/gpu_memory_buffer_support.cc
+++ b/gpu/ipc/common/gpu_memory_buffer_support.cc
@@ -56,7 +56,6 @@
       return format == gfx::BufferFormat::R_8 ||
              format == gfx::BufferFormat::BGRA_8888 ||
              format == gfx::BufferFormat::RGBA_F16 ||
-             format == gfx::BufferFormat::BGRX_1010102 ||
              format == gfx::BufferFormat::UYVY_422 ||
              format == gfx::BufferFormat::YUV_420_BIPLANAR;
     case gfx::BufferUsage::SCANOUT_VDA_WRITE:
diff --git a/ios/chrome/browser/passwords/ios_chrome_password_manager_infobar_delegate.h b/ios/chrome/browser/passwords/ios_chrome_password_manager_infobar_delegate.h
index 8f315b3f..3be745e3 100644
--- a/ios/chrome/browser/passwords/ios_chrome_password_manager_infobar_delegate.h
+++ b/ios/chrome/browser/passwords/ios_chrome_password_manager_infobar_delegate.h
@@ -53,7 +53,6 @@
 
  private:
   // ConfirmInfoBarDelegate implementation.
-  Type GetInfoBarType() const override;
   base::string16 GetLinkText() const override;
   int GetIconId() const override;
   bool LinkClicked(WindowOpenDisposition disposition) override;
diff --git a/ios/chrome/browser/passwords/ios_chrome_password_manager_infobar_delegate.mm b/ios/chrome/browser/passwords/ios_chrome_password_manager_infobar_delegate.mm
index f88834a..a3bdcfc 100644
--- a/ios/chrome/browser/passwords/ios_chrome_password_manager_infobar_delegate.mm
+++ b/ios/chrome/browser/passwords/ios_chrome_password_manager_infobar_delegate.mm
@@ -35,11 +35,6 @@
       infobar_response_(password_manager::metrics_util::NO_DIRECT_INTERACTION),
       is_smart_lock_branding_enabled_(is_smart_lock_branding_enabled) {}
 
-infobars::InfoBarDelegate::Type
-IOSChromePasswordManagerInfoBarDelegate::GetInfoBarType() const {
-  return PAGE_ACTION_TYPE;
-};
-
 base::string16 IOSChromePasswordManagerInfoBarDelegate::GetLinkText() const {
   return is_smart_lock_branding_enabled_
              ? l10n_util::GetStringUTF16(IDS_PASSWORD_MANAGER_SMART_LOCK)
diff --git a/ios/chrome/browser/ui/app_launcher/app_launcher_coordinator_unittest.mm b/ios/chrome/browser/ui/app_launcher/app_launcher_coordinator_unittest.mm
index 59fc639..0f76ad2 100644
--- a/ios/chrome/browser/ui/app_launcher/app_launcher_coordinator_unittest.mm
+++ b/ios/chrome/browser/ui/app_launcher/app_launcher_coordinator_unittest.mm
@@ -33,6 +33,8 @@
     OCMStub([application_ sharedApplication]).andReturn(application_);
   }
 
+  ~AppLauncherCoordinatorTest() override { [application_ stopMocking]; }
+
   UIViewController* base_view_controller_ = nil;
   ScopedKeyWindow scoped_key_window_;
   AppLauncherCoordinator* coordinator_ = nil;
diff --git a/ios/chrome/browser/ui/download/legacy_download_manager_controller_unittest.mm b/ios/chrome/browser/ui/download/legacy_download_manager_controller_unittest.mm
index 1aba2212..4b6a8cf 100644
--- a/ios/chrome/browser/ui/download/legacy_download_manager_controller_unittest.mm
+++ b/ios/chrome/browser/ui/download/legacy_download_manager_controller_unittest.mm
@@ -88,7 +88,7 @@
 }
 
 // TODO(crbug.com/804250): this test is flaky.
-TEST_F(LegacyDownloadManagerControllerTest, FLAKY_TestStart) {
+TEST_F(LegacyDownloadManagerControllerTest, TestStart) {
   [_controller start];
   EXPECT_TRUE(
       [[UIApplication sharedApplication] isNetworkActivityIndicatorVisible]);
diff --git a/ios/chrome/browser/ui/download/pass_kit_coordinator_unittest.mm b/ios/chrome/browser/ui/download/pass_kit_coordinator_unittest.mm
index ee8cc6c..88e3323 100644
--- a/ios/chrome/browser/ui/download/pass_kit_coordinator_unittest.mm
+++ b/ios/chrome/browser/ui/download/pass_kit_coordinator_unittest.mm
@@ -64,7 +64,7 @@
 // Tests that PassKitCoordinator presents PKAddPassesViewController for the
 // valid PKPass object.
 // TODO(crbug.com/804250): this test is flaky.
-TEST_F(PassKitCoordinatorTest, FLAKY_ValidPassKitObject) {
+TEST_F(PassKitCoordinatorTest, ValidPassKitObject) {
   std::string data = testing::GetTestPass();
   NSData* nsdata = [NSData dataWithBytes:data.c_str() length:data.size()];
   PKPass* pass = [[PKPass alloc] initWithData:nsdata error:nil];
@@ -101,7 +101,7 @@
 
 // Tests presenting multiple valid PKPass objects.
 // TODO(crbug.com/804250): this test is flaky.
-TEST_F(PassKitCoordinatorTest, FLAKY_MultiplePassKitObjects) {
+TEST_F(PassKitCoordinatorTest, MultiplePassKitObjects) {
   if (IsIPadIdiom()) {
     // Wallet app is not supported on iPads.
     return;
diff --git a/ios/chrome/browser/ui/fullscreen/BUILD.gn b/ios/chrome/browser/ui/fullscreen/BUILD.gn
index 07727b1..e175fd9c 100644
--- a/ios/chrome/browser/ui/fullscreen/BUILD.gn
+++ b/ios/chrome/browser/ui/fullscreen/BUILD.gn
@@ -17,6 +17,7 @@
 
 source_set("new_fullscreen") {
   sources = [
+    "animated_scoped_fullscreen_disabler.h",
     "fullscreen_controller.h",
     "fullscreen_controller_factory.h",
     "fullscreen_controller_observer.h",
diff --git a/ios/chrome/browser/ui/fullscreen/animated_scoped_fullscreen_disabler.h b/ios/chrome/browser/ui/fullscreen/animated_scoped_fullscreen_disabler.h
new file mode 100644
index 0000000..e1524355
--- /dev/null
+++ b/ios/chrome/browser/ui/fullscreen/animated_scoped_fullscreen_disabler.h
@@ -0,0 +1,26 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef IOS_CHROME_BROWSER_UI_FULLSCREEN_ANIMATED_SCOPED_FULLSCREEN_DISABLER_H_
+#define IOS_CHROME_BROWSER_UI_FULLSCREEN_ANIMATED_SCOPED_FULLSCREEN_DISABLER_H_
+
+#include "base/macros.h"
+
+class FullscreenController;
+
+// A helper object that increments FullscrenController's disabled counter for
+// its entire lifetime. Since the disabling is happening inside an animation
+// block, any UI changes related to Fullscreen being disabled will be animated.
+class AnimatedScopedFullscreenDisabler {
+ public:
+  explicit AnimatedScopedFullscreenDisabler(FullscreenController* controller);
+
+ private:
+  // The FullscreenController being disabled by this object.
+  FullscreenController* controller_;
+
+  DISALLOW_COPY_AND_ASSIGN(AnimatedScopedFullscreenDisabler);
+};
+
+#endif  // IOS_CHROME_BROWSER_UI_FULLSCREEN_ANIMATED_SCOPED_FULLSCREEN_DISABLER_H_
diff --git a/ios/chrome/browser/ui/fullscreen/animated_scoped_fullscreen_disabler.mm b/ios/chrome/browser/ui/fullscreen/animated_scoped_fullscreen_disabler.mm
new file mode 100644
index 0000000..a2f4a60
--- /dev/null
+++ b/ios/chrome/browser/ui/fullscreen/animated_scoped_fullscreen_disabler.mm
@@ -0,0 +1,27 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#import "ios/chrome/browser/ui/fullscreen/animated_scoped_fullscreen_disabler.h"
+
+#import "ios/chrome/browser/ui/fullscreen/fullscreen_controller.h"
+#import "ios/chrome/common/material_timing.h"
+
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
+AnimatedScopedFullscreenDisabler::AnimatedScopedFullscreenDisabler(
+    FullscreenController* controller)
+    : controller_(controller) {
+  DCHECK(controller_);
+  [UIView animateWithDuration:ios::material::kDuration1
+                   animations:^{
+                     controller_->IncrementDisabledCounter();
+                   }
+                   completion:nil];
+}
+
+AnimatedScopedFullscreenDisabler::~AnimatedScopedFullscreenDisabler() {
+  controller_->DecrementDisabledCounter();
+}
diff --git a/ios/chrome/browser/ui/settings/autofill_collection_view_controller.mm b/ios/chrome/browser/ui/settings/autofill_collection_view_controller.mm
index fdc417d6..52b0fa1 100644
--- a/ios/chrome/browser/ui/settings/autofill_collection_view_controller.mm
+++ b/ios/chrome/browser/ui/settings/autofill_collection_view_controller.mm
@@ -158,6 +158,7 @@
       [[CollectionViewSwitchItem alloc] initWithType:ItemTypeAutofillSwitch];
   switchItem.text = l10n_util::GetNSString(IDS_IOS_AUTOFILL);
   switchItem.on = [self isAutofillEnabled];
+  switchItem.accessibilityIdentifier = @"autofillItem_switch";
   return switchItem;
 }
 
@@ -166,6 +167,7 @@
       [[CollectionViewSwitchItem alloc] initWithType:ItemTypeWalletSwitch];
   switchItem.text = l10n_util::GetNSString(IDS_IOS_AUTOFILL_USE_WALLET_DATA);
   switchItem.on = [self isWalletEnabled];
+  switchItem.accessibilityIdentifier = @"walletItem_switch";
   return switchItem;
 }
 
@@ -323,7 +325,7 @@
   switchItem.on = on;
 }
 
-// Sets switchItem's enaled status to |enabled| and reconfigures the
+// Sets switchItem's enabled status to |enabled| and reconfigures the
 // corresponding cell. It is important that there is no more than one item of
 // |switchItemType| in SectionIdentifierSwitches.
 - (void)setSwitchItemEnabled:(BOOL)enabled itemType:(ItemType)switchItemType {
diff --git a/ios/chrome/browser/ui/settings/autofill_settings_egtest.mm b/ios/chrome/browser/ui/settings/autofill_settings_egtest.mm
index ee7fb7f..61549a2a 100644
--- a/ios/chrome/browser/ui/settings/autofill_settings_egtest.mm
+++ b/ios/chrome/browser/ui/settings/autofill_settings_egtest.mm
@@ -199,4 +199,32 @@
   [self exitSettingsMenu];
 }
 
+// Checks that if the autofill profiles and credit cards list view is in edit
+// mode, the "autofill" and "wallet" switch items are disabled.
+- (void)testListViewEditMode {
+  [self loadAndSubmitTheForm];
+
+  [ChromeEarlGreyUI openSettingsMenu];
+  [[EarlGrey
+      selectElementWithMatcher:ButtonWithAccessibilityLabel(
+                                   l10n_util::GetNSString(IDS_IOS_AUTOFILL))]
+      performAction:grey_tap()];
+
+  // Switch on edit mode.
+  [[EarlGrey selectElementWithMatcher:ButtonWithAccessibilityLabelId(
+                                          IDS_IOS_NAVIGATION_BAR_EDIT_BUTTON)]
+      performAction:grey_tap()];
+
+  // Check the "autofill" and "wallet" switches are disabled. Disabled switches
+  // are toggled off.
+  [[EarlGrey
+      selectElementWithMatcher:chrome_test_util::CollectionViewSwitchCell(
+                                   @"autofillItem_switch", NO, NO)]
+      assertWithMatcher:grey_notNil()];
+  [[EarlGrey
+      selectElementWithMatcher:chrome_test_util::CollectionViewSwitchCell(
+                                   @"walletItem_switch", NO, NO)]
+      assertWithMatcher:grey_notNil()];
+}
+
 @end
diff --git a/ios/chrome/browser/ui/settings/passwords_settings_egtest.mm b/ios/chrome/browser/ui/settings/passwords_settings_egtest.mm
index 8141b86..585b3fdf0 100644
--- a/ios/chrome/browser/ui/settings/passwords_settings_egtest.mm
+++ b/ios/chrome/browser/ui/settings/passwords_settings_egtest.mm
@@ -942,8 +942,9 @@
       performAction:grey_tap()];
 }
 
-// Checks that if the list view is in edit mode, then the details password view
-// is not accessible on tapping the entries.
+// Checks that if the list view is in edit mode, the "Save Passwords" switch is
+// disabled and the details password view is not accessible on tapping the
+// entries.
 - (void)testEditMode {
   base::test::ScopedFeatureList scoped_feature_list;
   scoped_feature_list.InitAndEnableFeature(
@@ -956,6 +957,13 @@
 
   TapEdit();
 
+  // Check that the "Save Passwords" switch is disabled. Disabled switches are
+  // toggled off.
+  [[EarlGrey
+      selectElementWithMatcher:chrome_test_util::CollectionViewSwitchCell(
+                                   @"savePasswordsItem_switch", NO, NO)]
+      assertWithMatcher:grey_notNil()];
+
   [GetInteractionForPasswordEntry(@"example.com, concrete username")
       performAction:grey_tap()];
 
diff --git a/ios/chrome/browser/ui/settings/save_passwords_collection_view_controller.mm b/ios/chrome/browser/ui/settings/save_passwords_collection_view_controller.mm
index f58fadc..1fa526c 100644
--- a/ios/chrome/browser/ui/settings/save_passwords_collection_view_controller.mm
+++ b/ios/chrome/browser/ui/settings/save_passwords_collection_view_controller.mm
@@ -585,6 +585,18 @@
          [item isKindOfClass:[BlacklistedFormContentItem class]];
 }
 
+- (void)collectionViewWillBeginEditing:(UICollectionView*)collectionView {
+  [super collectionViewWillBeginEditing:collectionView];
+
+  [self setSavePasswordsSwitchItemEnabled:NO];
+}
+
+- (void)collectionViewWillEndEditing:(UICollectionView*)collectionView {
+  [super collectionViewWillEndEditing:collectionView];
+
+  [self setSavePasswordsSwitchItemEnabled:YES];
+}
+
 - (void)collectionView:(UICollectionView*)collectionView
     willDeleteItemsAtIndexPaths:(NSArray*)indexPaths {
   // Ensure indexPaths are sorted to maintain delete logic, and keep track of
@@ -753,4 +765,25 @@
   [self presentViewController:alertController animated:YES completion:nil];
 }
 
+#pragma mark Helper methods
+
+// Sets the save passwords switch item's enabled status to |enabled| and
+// reconfigures the corresponding cell.
+- (void)setSavePasswordsSwitchItemEnabled:(BOOL)enabled {
+  CollectionViewModel* model = self.collectionViewModel;
+
+  if (![model hasItemForItemType:ItemTypeSavePasswordsSwitch
+               sectionIdentifier:SectionIdentifierSavePasswordsSwitch]) {
+    return;
+  }
+  NSIndexPath* switchPath =
+      [model indexPathForItemType:ItemTypeSavePasswordsSwitch
+                sectionIdentifier:SectionIdentifierSavePasswordsSwitch];
+  CollectionViewSwitchItem* switchItem =
+      base::mac::ObjCCastStrict<CollectionViewSwitchItem>(
+          [model itemAtIndexPath:switchPath]);
+  [switchItem setEnabled:enabled];
+  [self reconfigureCellsForItems:@[ switchItem ]];
+}
+
 @end
diff --git a/ios/chrome/browser/upgrade/upgrade_center.mm b/ios/chrome/browser/upgrade/upgrade_center.mm
index a1cc862c..37c1c05e 100644
--- a/ios/chrome/browser/upgrade/upgrade_center.mm
+++ b/ios/chrome/browser/upgrade/upgrade_center.mm
@@ -96,10 +96,6 @@
     return icon_;
   }
 
-  InfoBarDelegate::Type GetInfoBarType() const override {
-    return PAGE_ACTION_TYPE;
-  }
-
   base::string16 GetMessageText() const override {
     return l10n_util::GetStringUTF16(IDS_IOS_UPGRADE_AVAILABLE);
   }
diff --git a/ios/chrome/browser/web/blocked_popup_tab_helper.mm b/ios/chrome/browser/web/blocked_popup_tab_helper.mm
index a119c5c..ec71e5c 100644
--- a/ios/chrome/browser/web/blocked_popup_tab_helper.mm
+++ b/ios/chrome/browser/web/blocked_popup_tab_helper.mm
@@ -55,10 +55,6 @@
     return icon_;
   }
 
-  infobars::InfoBarDelegate::Type GetInfoBarType() const override {
-    return WARNING_TYPE;
-  }
-
   base::string16 GetMessageText() const override {
     return l10n_util::GetStringFUTF16(
         IDS_IOS_POPUPS_BLOCKED_MOBILE,
diff --git a/ios/chrome/test/earl_grey/chrome_matchers.h b/ios/chrome/test/earl_grey/chrome_matchers.h
index 3afee9cd..baf0e27 100644
--- a/ios/chrome/test/earl_grey/chrome_matchers.h
+++ b/ios/chrome/test/earl_grey/chrome_matchers.h
@@ -69,15 +69,16 @@
 id<GREYMatcher> ShowTabsButton();
 
 // Matcher for CollectionViewSwitchCell.
-// TODO(crbug.com/684139): Update |isOn| to something more obvious from
-// callsites.
 id<GREYMatcher> CollectionViewSwitchCell(NSString* accessibilityIdentifier,
-                                         BOOL isOn);
+                                         BOOL isToggledOn);
+
+// Matcher for CollectionViewSwitchCell.
+id<GREYMatcher> CollectionViewSwitchCell(NSString* accessibilityIdentifier,
+                                         BOOL isToggledOn,
+                                         BOOL isEnabled);
 
 // Matcher for SyncSwitchCell.
-// TODO(crbug.com/684139): Update |is_on| to something more obvious from
-// callsites.
-id<GREYMatcher> SyncSwitchCell(NSString* accessibilityLabel, BOOL is_on);
+id<GREYMatcher> SyncSwitchCell(NSString* accessibilityLabel, BOOL isToggledOn);
 
 // Matcher for the Open in New Tab option in the context menu when long pressing
 // a link.
diff --git a/ios/chrome/test/earl_grey/chrome_matchers.mm b/ios/chrome/test/earl_grey/chrome_matchers.mm
index 5e85110..a90b22e 100644
--- a/ios/chrome/test/earl_grey/chrome_matchers.mm
+++ b/ios/chrome/test/earl_grey/chrome_matchers.mm
@@ -43,17 +43,35 @@
 
 namespace {
 
-id<GREYMatcher> CollectionViewSwitchIsOn(BOOL is_on) {
+id<GREYMatcher> CollectionViewSwitchIsToggledOn(BOOL isToggledOn) {
   MatchesBlock matches = ^BOOL(id element) {
     CollectionViewSwitchCell* switch_cell =
         base::mac::ObjCCastStrict<CollectionViewSwitchCell>(element);
     UISwitch* switch_view = switch_cell.switchView;
-    return (switch_view.on && is_on) || (!switch_view.on && !is_on);
+    return (switch_view.on && isToggledOn) || (!switch_view.on && !isToggledOn);
   };
   DescribeToBlock describe = ^void(id<GREYDescription> description) {
     NSString* name =
-        [NSString stringWithFormat:@"collectionViewSwitchInState(%@)",
-                                   is_on ? @"ON" : @"OFF"];
+        [NSString stringWithFormat:@"collectionViewSwitchToggledState(%@)",
+                                   isToggledOn ? @"ON" : @"OFF"];
+    [description appendText:name];
+  };
+  return [[GREYElementMatcherBlock alloc] initWithMatchesBlock:matches
+                                              descriptionBlock:describe];
+}
+
+id<GREYMatcher> CollectionViewSwitchIsEnabled(BOOL isEnabled) {
+  MatchesBlock matches = ^BOOL(id element) {
+    CollectionViewSwitchCell* switch_cell =
+        base::mac::ObjCCastStrict<CollectionViewSwitchCell>(element);
+    UISwitch* switch_view = switch_cell.switchView;
+    return (switch_view.enabled && isEnabled) ||
+           (!switch_view.enabled && !isEnabled);
+  };
+  DescribeToBlock describe = ^void(id<GREYDescription> description) {
+    NSString* name =
+        [NSString stringWithFormat:@"collectionViewSwitchEnabledState(%@)",
+                                   isEnabled ? @"YES" : @"NO"];
     [description appendText:name];
   };
   return [[GREYElementMatcherBlock alloc] initWithMatchesBlock:matches
@@ -165,20 +183,28 @@
 }
 
 id<GREYMatcher> CollectionViewSwitchCell(NSString* accessibilityIdentifier,
-                                         BOOL is_on) {
-  return grey_allOf(grey_accessibilityID(accessibilityIdentifier),
-                    CollectionViewSwitchIsOn(is_on), grey_sufficientlyVisible(),
-                    nil);
+                                         BOOL isToggledOn) {
+  return CollectionViewSwitchCell(accessibilityIdentifier, isToggledOn, YES);
 }
 
-id<GREYMatcher> SyncSwitchCell(NSString* accessibilityLabel, BOOL is_on) {
-  return grey_allOf(grey_accessibilityLabel(accessibilityLabel),
-                    grey_accessibilityValue(
-                        is_on ? l10n_util::GetNSString(IDS_IOS_SETTING_ON)
-                              : l10n_util::GetNSString(IDS_IOS_SETTING_OFF)),
+id<GREYMatcher> CollectionViewSwitchCell(NSString* accessibilityIdentifier,
+                                         BOOL isToggledOn,
+                                         BOOL isEnabled) {
+  return grey_allOf(grey_accessibilityID(accessibilityIdentifier),
+                    CollectionViewSwitchIsToggledOn(isToggledOn),
+                    CollectionViewSwitchIsEnabled(isEnabled),
                     grey_sufficientlyVisible(), nil);
 }
 
+id<GREYMatcher> SyncSwitchCell(NSString* accessibilityLabel, BOOL isToggledOn) {
+  return grey_allOf(
+      grey_accessibilityLabel(accessibilityLabel),
+      grey_accessibilityValue(
+          isToggledOn ? l10n_util::GetNSString(IDS_IOS_SETTING_ON)
+                      : l10n_util::GetNSString(IDS_IOS_SETTING_OFF)),
+      grey_sufficientlyVisible(), nil);
+}
+
 id<GREYMatcher> OpenLinkInNewTabButton() {
   return ButtonWithAccessibilityLabelId(IDS_IOS_CONTENT_CONTEXT_OPENLINKNEWTAB);
 }
diff --git a/media/capture/BUILD.gn b/media/capture/BUILD.gn
index c7d100e..b01ab85 100644
--- a/media/capture/BUILD.gn
+++ b/media/capture/BUILD.gn
@@ -9,12 +9,13 @@
 group("capture") {
   public_deps = [
     ":capture_lib",
-    "//media/capture/mojo:capture_types",
+    "//media/capture/mojo:image_capture",
+    "//media/capture/mojo:video_capture",
     "//services/service_manager/public/cpp",
   ]
 }
 
-# Things needed by //media/capture/mojo:capture_types.
+# Things needed by //media/capture/mojo/video_capture_types.mojom.
 component("capture_base") {
   defines = [ "CAPTURE_IMPLEMENTATION" ]
   sources = [
@@ -160,8 +161,8 @@
     "//base",
     "//base:i18n",
     "//media",
-    "//media/capture/mojo:capture_types",
     "//media/capture/mojo:image_capture",
+    "//media/capture/mojo:video_capture",
     "//media/mojo/interfaces:interfaces",
     "//services/service_manager/public/cpp",
     "//third_party/libyuv",
diff --git a/media/capture/mojo/BUILD.gn b/media/capture/mojo/BUILD.gn
index fc19ee1..ee0c181b 100644
--- a/media/capture/mojo/BUILD.gn
+++ b/media/capture/mojo/BUILD.gn
@@ -4,8 +4,9 @@
 
 import("//mojo/public/tools/bindings/mojom.gni")
 
-mojom("capture_types") {
+mojom("video_capture") {
   sources = [
+    "video_capture.mojom",
     "video_capture_types.mojom",
   ]
 
diff --git a/content/common/video_capture.mojom b/media/capture/mojo/video_capture.mojom
similarity index 92%
rename from content/common/video_capture.mojom
rename to media/capture/mojo/video_capture.mojom
index bfa1ee2..41531c5 100644
--- a/content/common/video_capture.mojom
+++ b/media/capture/mojo/video_capture.mojom
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-module content.mojom;
+module media.mojom;
 
 import "media/mojo/interfaces/media_types.mojom";
 import "media/capture/mojo/video_capture_types.mojom";
@@ -69,7 +69,7 @@
 
   // |buffer_id| has video capture data with |info| containing the associated
   // VideoFrame constituent parts.
-  OnBufferReady(int32 buffer_id, media.mojom.VideoFrameInfo info);
+  OnBufferReady(int32 buffer_id, VideoFrameInfo info);
 
   // |buffer_id| has been released by VideoCaptureHost and must not be used.
   OnBufferDestroyed(int32 buffer_id);
@@ -79,7 +79,7 @@
   // Start the |session_id| session with |params|. The video capture will be
   // identified as |device_id|, a new id picked by the renderer process.
   // |observer| will be used for notifications.
-  Start(int32 device_id, int32 session_id, media.mojom.VideoCaptureParams params,
+  Start(int32 device_id, int32 session_id, VideoCaptureParams params,
         VideoCaptureObserver observer);
 
   // Closes the video capture specified by |device_id|.
@@ -89,7 +89,7 @@
   Pause(int32 device_id);
 
   // Resume |device_id| video capture, in |session_id| and with |params|.
-  Resume(int32 device_id, int32 session_id, media.mojom.VideoCaptureParams params);
+  Resume(int32 device_id, int32 session_id, VideoCaptureParams params);
 
   // Requests that the video capturer send a frame "soon" (e.g., to resolve
   // picture loss or quality issues).
@@ -101,9 +101,9 @@
 
   // Get the formats supported by a device referenced by |session_id|.
   GetDeviceSupportedFormats(int32 device_id, int32 session_id)
-    => (array<media.mojom.VideoCaptureFormat> formats_supported);
+    => (array<VideoCaptureFormat> formats_supported);
 
   // Get the format(s) in use by a device referenced by |session_id|.
   GetDeviceFormatsInUse(int32 device_id, int32 session_id)
-    => (array<media.mojom.VideoCaptureFormat> formats_in_use);
+    => (array<VideoCaptureFormat> formats_in_use);
 };
diff --git a/media/video/gpu_memory_buffer_video_frame_pool.cc b/media/video/gpu_memory_buffer_video_frame_pool.cc
index b93154b5..2955641d 100644
--- a/media/video/gpu_memory_buffer_video_frame_pool.cc
+++ b/media/video/gpu_memory_buffer_video_frame_pool.cc
@@ -208,9 +208,6 @@
     case GpuVideoAcceleratorFactories::OutputFormat::UYVY:
       DCHECK_EQ(0u, plane);
       return gfx::BufferFormat::UYVY_422;
-    case GpuVideoAcceleratorFactories::OutputFormat::XR30:
-      DCHECK_EQ(0u, plane);
-      return gfx::BufferFormat::BGRX_1010102;
     case GpuVideoAcceleratorFactories::OutputFormat::UNDEFINED:
       NOTREACHED();
       break;
@@ -233,11 +230,6 @@
     case GpuVideoAcceleratorFactories::OutputFormat::UYVY:
       DCHECK_EQ(0u, plane);
       return GL_RGB_YCBCR_422_CHROMIUM;
-    case GpuVideoAcceleratorFactories::OutputFormat::XR30:
-      DCHECK_EQ(0u, plane);
-      // Technically speaking we should say GL_RGB10_EXT, but that format is not
-      // supported in OpenGLES.
-      return GL_RGB10_A2_EXT;
     case GpuVideoAcceleratorFactories::OutputFormat::UNDEFINED:
       NOTREACHED();
       break;
@@ -254,8 +246,6 @@
     case GpuVideoAcceleratorFactories::OutputFormat::NV12_DUAL_GMB:
     case GpuVideoAcceleratorFactories::OutputFormat::NV12_SINGLE_GMB:
       return 2;
-    case GpuVideoAcceleratorFactories::OutputFormat::XR30:
-      return 3;
     case GpuVideoAcceleratorFactories::OutputFormat::UNDEFINED:
       NOTREACHED();
       break;
@@ -273,8 +263,6 @@
       return PIXEL_FORMAT_NV12;
     case GpuVideoAcceleratorFactories::OutputFormat::UYVY:
       return PIXEL_FORMAT_UYVY;
-    case GpuVideoAcceleratorFactories::OutputFormat::XR30:
-      return PIXEL_FORMAT_ARGB;
     case GpuVideoAcceleratorFactories::OutputFormat::UNDEFINED:
       NOTREACHED();
       break;
@@ -293,8 +281,6 @@
       return 2;
     case GpuVideoAcceleratorFactories::OutputFormat::UYVY:
       return 1;
-    case GpuVideoAcceleratorFactories::OutputFormat::XR30:
-      return 1;
     case GpuVideoAcceleratorFactories::OutputFormat::UNDEFINED:
       NOTREACHED();
       break;
@@ -409,66 +395,6 @@
   done.Run();
 }
 
-void CopyRowsToXR30Buffer(int first_row,
-                          int rows,
-                          int width,
-                          const scoped_refptr<VideoFrame>& source_frame,
-                          uint8_t* output,
-                          int dest_stride,
-                          const base::Closure& done) {
-  TRACE_EVENT2("media", "CopyRowsToXR30Buffer", "bytes_per_row", width * 2,
-               "rows", rows);
-  if (output) {
-    DCHECK_NE(dest_stride, 0);
-    DCHECK_LE(width, std::abs(dest_stride / 2));
-    DCHECK_EQ(0, first_row % 2);
-
-    int color_space;
-    if (source_frame->metadata()->GetInteger(VideoFrameMetadata::COLOR_SPACE,
-                                             &color_space)) {
-      color_space = COLOR_SPACE_UNSPECIFIED;
-    }
-    const uint16_t* y_plane = reinterpret_cast<const uint16_t*>(
-        source_frame->visible_data(VideoFrame::kYPlane) +
-        first_row * source_frame->stride(VideoFrame::kYPlane));
-    const size_t y_plane_stride = source_frame->stride(VideoFrame::kYPlane) / 2;
-    const uint16_t* v_plane = reinterpret_cast<const uint16_t*>(
-        source_frame->visible_data(VideoFrame::kVPlane) +
-        first_row / 2 * source_frame->stride(VideoFrame::kVPlane));
-    const size_t v_plane_stride = source_frame->stride(VideoFrame::kVPlane) / 2;
-    const uint16_t* u_plane = reinterpret_cast<const uint16_t*>(
-        source_frame->visible_data(VideoFrame::kUPlane) +
-        first_row / 2 * source_frame->stride(VideoFrame::kUPlane));
-    const size_t u_plane_stride = source_frame->stride(VideoFrame::kUPlane) / 2;
-    uint8_t* dest_ar30 = output + first_row * dest_stride;
-
-    // RGB textures need RGB as MatrixID.
-    switch (color_space) {
-      case COLOR_SPACE_HD_REC709:
-        libyuv::H010ToAR30(y_plane, y_plane_stride, v_plane, v_plane_stride,
-                           u_plane, u_plane_stride, dest_ar30, dest_stride,
-                           width, rows);
-        source_frame->set_color_space(gfx::ColorSpace(
-            gfx::ColorSpace::PrimaryID::BT709,
-            gfx::ColorSpace::TransferID::BT709, gfx::ColorSpace::MatrixID::RGB,
-            gfx::ColorSpace::RangeID::LIMITED));
-        break;
-      case COLOR_SPACE_UNSPECIFIED:
-      case COLOR_SPACE_JPEG:
-      case COLOR_SPACE_SD_REC601:
-        libyuv::I010ToAR30(y_plane, y_plane_stride, v_plane, v_plane_stride,
-                           u_plane, u_plane_stride, dest_ar30, dest_stride,
-                           width, rows);
-        source_frame->set_color_space(gfx::ColorSpace(
-            gfx::ColorSpace::PrimaryID::SMPTE170M,
-            gfx::ColorSpace::TransferID::SMPTE170M,
-            gfx::ColorSpace::MatrixID::RGB, gfx::ColorSpace::RangeID::LIMITED));
-        break;
-    }
-  }
-  done.Run();
-}
-
 gfx::Size CodedSize(const scoped_refptr<VideoFrame>& video_frame,
                     GpuVideoAcceleratorFactories::OutputFormat output_format) {
   DCHECK(gfx::Rect(video_frame->coded_size())
@@ -484,7 +410,6 @@
                          (video_frame->visible_rect().height() + 1) & ~1);
       break;
     case GpuVideoAcceleratorFactories::OutputFormat::UYVY:
-    case GpuVideoAcceleratorFactories::OutputFormat::XR30:
       output = gfx::Size((video_frame->visible_rect().width() + 1) & ~1,
                          video_frame->visible_rect().height());
       break;
@@ -717,15 +642,6 @@
                                     static_cast<uint8_t*>(buffer->memory(0)),
                                     buffer->stride(0), barrier));
           break;
-
-        case GpuVideoAcceleratorFactories::OutputFormat::XR30:
-          worker_task_runner_->PostTask(
-              FROM_HERE, base::Bind(&CopyRowsToXR30Buffer, row, rows_to_copy,
-                                    coded_size.width(), video_frame,
-                                    static_cast<uint8_t*>(buffer->memory(0)),
-                                    buffer->stride(0), barrier));
-          break;
-
         case GpuVideoAcceleratorFactories::OutputFormat::UNDEFINED:
           NOTREACHED();
       }
@@ -818,9 +734,6 @@
       allow_overlay = true;
 #endif
       break;
-    case GpuVideoAcceleratorFactories::OutputFormat::XR30:
-      allow_overlay = true;
-      break;
     default:
       break;
   }
diff --git a/media/video/gpu_memory_buffer_video_frame_pool_unittest.cc b/media/video/gpu_memory_buffer_video_frame_pool_unittest.cc
index a973f823..b62af9a 100644
--- a/media/video/gpu_memory_buffer_video_frame_pool_unittest.cc
+++ b/media/video/gpu_memory_buffer_video_frame_pool_unittest.cc
@@ -289,24 +289,6 @@
       media::VideoFrameMetadata::READ_LOCK_FENCES_ENABLED));
 }
 
-TEST_F(GpuMemoryBufferVideoFramePoolTest, CreateOneHardwareXR30Frame) {
-  scoped_refptr<VideoFrame> software_frame = CreateTestYUVVideoFrame(10, 10);
-  scoped_refptr<VideoFrame> frame;
-  mock_gpu_factories_->SetVideoFrameOutputFormat(
-      media::GpuVideoAcceleratorFactories::OutputFormat::XR30);
-  gpu_memory_buffer_pool_->MaybeCreateHardwareFrame(
-      software_frame, base::Bind(MaybeCreateHardwareFrameCallback, &frame));
-
-  RunUntilIdle();
-
-  EXPECT_NE(software_frame.get(), frame.get());
-  EXPECT_EQ(PIXEL_FORMAT_ARGB, frame->format());
-  EXPECT_EQ(1u, frame->NumTextures());
-  EXPECT_EQ(1u, gles2_->gen_textures_count());
-  EXPECT_TRUE(frame->metadata()->IsTrue(
-      media::VideoFrameMetadata::READ_LOCK_FENCES_ENABLED));
-}
-
 // CreateGpuMemoryBuffer can return null (e.g: when the GPU process is down).
 // This test checks that in that case we don't crash and still create the
 // textures.
diff --git a/media/video/gpu_video_accelerator_factories.h b/media/video/gpu_video_accelerator_factories.h
index e1de25b..2f1678c 100644
--- a/media/video/gpu_video_accelerator_factories.h
+++ b/media/video/gpu_video_accelerator_factories.h
@@ -69,7 +69,6 @@
     UYVY,             // One 422 GMB
     NV12_SINGLE_GMB,  // One NV12 GMB
     NV12_DUAL_GMB,    // One R8, one RG88 GMB
-    XR30,             // 10:10:10:2 BGRX in one GMB
   };
 
   // Return whether GPU encoding/decoding is enabled.
diff --git a/media/video/mock_gpu_video_accelerator_factories.cc b/media/video/mock_gpu_video_accelerator_factories.cc
index 51306fd..65ce444 100644
--- a/media/video/mock_gpu_video_accelerator_factories.cc
+++ b/media/video/mock_gpu_video_accelerator_factories.cc
@@ -27,8 +27,7 @@
     DCHECK(gfx::BufferFormat::R_8 == format_ ||
            gfx::BufferFormat::RG_88 == format_ ||
            gfx::BufferFormat::YUV_420_BIPLANAR == format_ ||
-           gfx::BufferFormat::UYVY_422 == format_ ||
-           gfx::BufferFormat::BGRX_1010102 == format_);
+           gfx::BufferFormat::UYVY_422 == format_);
     DCHECK(num_planes_ <= kMaxPlanes);
     for (int i = 0; i < static_cast<int>(num_planes_); ++i) {
       bytes_[i].resize(gfx::RowSizeForBufferFormat(size_.width(), format_, i) *
diff --git a/mojo/public/cpp/bindings/BUILD.gn b/mojo/public/cpp/bindings/BUILD.gn
index 4e4e0baf..1433399 100644
--- a/mojo/public/cpp/bindings/BUILD.gn
+++ b/mojo/public/cpp/bindings/BUILD.gn
@@ -204,6 +204,7 @@
 
     public_deps = [
       ":bindings",
+      "//third_party/WebKit/Source/platform:platform_export",
       "//third_party/WebKit/Source/platform/wtf",
     ]
 
diff --git a/mojo/public/tools/bindings/mojom.gni b/mojo/public/tools/bindings/mojom.gni
index 0bba833..0a74fac 100644
--- a/mojo/public/tools/bindings/mojom.gni
+++ b/mojo/public/tools/bindings/mojom.gni
@@ -258,6 +258,11 @@
 #   overridden_deps_blink (optional)
 #   component_deps_blink (optional)
 #       These two parameters are the blink variants of the previous two.
+#
+# check_includes_blink (optional)
+#     Overrides the check_includes variable for the blink variant.
+#     If check_includes_blink is not defined, the check_includes variable
+#     retains its original value.
 template("mojom") {
   assert(
       defined(invoker.sources) || defined(invoker.deps) ||
@@ -851,7 +856,13 @@
           }
           public_deps += invoker.component_deps_blink
         }
+        if (defined(invoker.check_includes_blink)) {
+          check_includes = invoker.check_includes_blink
+        }
       } else {
+        if (defined(invoker.check_includes_blink)) {
+          not_needed(invoker, [ "check_includes_blink" ])
+        }
         if (defined(invoker.overridden_deps)) {
           foreach(d, invoker.overridden_deps) {
             # Resolve the name, so that a target //mojo/something becomes
diff --git a/net/BUILD.gn b/net/BUILD.gn
index d40fabd..aa66442 100644
--- a/net/BUILD.gn
+++ b/net/BUILD.gn
@@ -596,7 +596,6 @@
       "cert/test_root_certs_mac.cc",
       "cert/test_root_certs_nss.cc",
       "cert/test_root_certs_win.cc",
-      "cert/x509_certificate_known_roots_win.h",
       "cert/x509_util_android.cc",
       "cert/x509_util_ios.cc",
       "cert/x509_util_ios.h",
@@ -888,7 +887,6 @@
       "http/proxy_connect_redirect_http_stream.h",
       "http/transport_security_persister.cc",
       "http/transport_security_persister.h",
-      "http/transport_security_state_static.h",
       "http/url_security_manager.cc",
       "http/url_security_manager.h",
       "http/url_security_manager_posix.cc",
@@ -2359,6 +2357,9 @@
     "data/ssl/certificates/768-rsa-ee-by-768-rsa-intermediate.pem",
     "data/ssl/certificates/768-rsa-ee-by-prime256v1-ecdsa-intermediate.pem",
     "data/ssl/certificates/768-rsa-intermediate.pem",
+    "data/ssl/certificates/825_days_1_second_after_2018_03_01.pem",
+    "data/ssl/certificates/825_days_after_2018_03_01.pem",
+    "data/ssl/certificates/826_days_after_2018_03_01.pem",
     "data/ssl/certificates/README",
     "data/ssl/certificates/aia-cert.pem",
     "data/ssl/certificates/aia-intermediate.der",
diff --git a/net/cert/cert_verifier.h b/net/cert/cert_verifier.h
index 2745942..c083c86 100644
--- a/net/cert/cert_verifier.h
+++ b/net/cert/cert_verifier.h
@@ -80,10 +80,7 @@
     // they are issued by non-public trust anchors.
     VERIFY_ENABLE_SHA1_LOCAL_ANCHORS = 1 << 5,
 
-    // If set, certificates which lack a subjectAltName will be allowed to
-    // match against the commonName of the certificate, but only if they are
-    // issued by non-public trust anchors.
-    VERIFY_ENABLE_COMMON_NAME_FALLBACK_LOCAL_ANCHORS = 1 << 6,
+    // 1 << 6 is reserved.
 
     // If set, disables the policy enforcement described at
     // https://security.googleblog.com/2017/09/chromes-plan-to-distrust-symantec.html
diff --git a/net/cert/cert_verify_proc.cc b/net/cert/cert_verify_proc.cc
index 181590b6..5e372e8f 100644
--- a/net/cert/cert_verify_proc.cc
+++ b/net/cert/cert_verify_proc.cc
@@ -519,10 +519,7 @@
     rv = MapCertStatusToNetError(verify_result->cert_status);
   }
 
-  bool allow_common_name_fallback =
-      !verify_result->is_issued_by_known_root &&
-      (flags & CertVerifier::VERIFY_ENABLE_COMMON_NAME_FALLBACK_LOCAL_ANCHORS);
-  if (!cert->VerifyNameMatch(hostname, allow_common_name_fallback)) {
+  if (!cert->VerifyNameMatch(hostname)) {
     verify_result->cert_status |= CERT_STATUS_COMMON_NAME_INVALID;
     rv = MapCertStatusToNetError(verify_result->cert_status);
   }
@@ -867,22 +864,29 @@
   int month_diff = (exploded_expiry.year - exploded_start.year) * 12 +
                    (exploded_expiry.month - exploded_start.month);
 
+  base::TimeDelta days_diff = cert.valid_expiry() - cert.valid_start();
+
   // Add any remainder as a full month.
   if (exploded_expiry.day_of_month > exploded_start.day_of_month)
     ++month_diff;
 
+  // These dates are derived from the transitions noted in Section 1.2.2
+  // (Relevant Dates) of the Baseline Requirements.
   const base::Time time_2012_07_01 =
-      base::Time::FromInternalValue(12985574400000000);
+      base::Time::UnixEpoch() + base::TimeDelta::FromSeconds(1341100800);
   const base::Time time_2015_04_01 =
-      base::Time::FromInternalValue(13072320000000000);
+      base::Time::UnixEpoch() + base::TimeDelta::FromSeconds(1427846400);
+  const base::Time time_2018_03_01 =
+      base::Time::UnixEpoch() + base::TimeDelta::FromSeconds(1519862400);
   const base::Time time_2019_07_01 =
-      base::Time::FromInternalValue(13206412800000000);
+      base::Time::UnixEpoch() + base::TimeDelta::FromSeconds(1561939200);
 
   // For certificates issued before the BRs took effect.
   if (start < time_2012_07_01 && (month_diff > 120 || expiry > time_2019_07_01))
     return true;
 
-  // For certificates issued after 1 July 2012: 60 months.
+  // For certificates issued after the BR effective date of 1 July 2012: 60
+  // months.
   if (start >= time_2012_07_01 && month_diff > 60)
     return true;
 
@@ -890,6 +894,10 @@
   if (start >= time_2015_04_01 && month_diff > 39)
     return true;
 
+  // For certificates issued after 1 March 2018: 825 days.
+  if (start >= time_2018_03_01 && days_diff > base::TimeDelta::FromDays(825))
+    return true;
+
   return false;
 }
 
diff --git a/net/cert/cert_verify_proc.h b/net/cert/cert_verify_proc.h
index 6a6e3f3..1798d32 100644
--- a/net/cert/cert_verify_proc.h
+++ b/net/cert/cert_verify_proc.h
@@ -132,10 +132,11 @@
       const std::vector<std::string>& ip_addrs);
 
   // The CA/Browser Forum's Baseline Requirements specify maximum validity
-  // periods (https://cabforum.org/Baseline_Requirements_V1.pdf):
+  // periods (https://cabforum.org/baseline-requirements-documents/).
   //
   // For certificates issued after 1 July 2012: 60 months.
   // For certificates issued after 1 April 2015: 39 months.
+  // For certificates issued after 1 March 2018: 825 days.
   //
   // For certificates issued before the BRs took effect, there were no
   // guidelines, but clamp them at a maximum of 10 year validity, with the
diff --git a/net/cert/cert_verify_proc_android.cc b/net/cert/cert_verify_proc_android.cc
index e9c6231..9f163f5 100644
--- a/net/cert/cert_verify_proc_android.cc
+++ b/net/cert/cert_verify_proc_android.cc
@@ -22,6 +22,7 @@
 #include "net/cert/cert_verify_result.h"
 #include "net/cert/internal/cert_errors.h"
 #include "net/cert/internal/parsed_certificate.h"
+#include "net/cert/known_roots.h"
 #include "net/cert/x509_certificate.h"
 #include "net/cert/x509_util.h"
 #include "url/gurl.h"
@@ -300,10 +301,12 @@
       verify_result->cert_status |= CERT_STATUS_INVALID;
   }
 
-  // Extract the public key hashes.
-  for (size_t i = 0; i < verified_chain.size(); i++) {
+  // Extract the public key hashes and check whether or not any are known
+  // roots. Walk from the end of the chain (root) to leaf, to optimize for
+  // known root checks.
+  for (auto it = verified_chain.rbegin(); it != verified_chain.rend(); ++it) {
     base::StringPiece spki_bytes;
-    if (!asn1::ExtractSPKIFromDERCert(verified_chain[i], &spki_bytes)) {
+    if (!asn1::ExtractSPKIFromDERCert(*it, &spki_bytes)) {
       verify_result->cert_status |= CERT_STATUS_INVALID;
       continue;
     }
@@ -311,8 +314,17 @@
     HashValue sha256(HASH_VALUE_SHA256);
     crypto::SHA256HashString(spki_bytes, sha256.data(), crypto::kSHA256Length);
     verify_result->public_key_hashes.push_back(sha256);
+
+    if (!verify_result->is_issued_by_known_root) {
+      verify_result->is_issued_by_known_root =
+          GetNetTrustAnchorHistogramIdForSPKI(sha256) != 0;
+    }
   }
 
+  // Reverse the hash list, to maintain the leaf->root ordering.
+  std::reverse(verify_result->public_key_hashes.begin(),
+               verify_result->public_key_hashes.end());
+
   return true;
 }
 
diff --git a/net/cert/cert_verify_proc_builtin.cc b/net/cert/cert_verify_proc_builtin.cc
index dc565ea..fc38245 100644
--- a/net/cert/cert_verify_proc_builtin.cc
+++ b/net/cert/cert_verify_proc_builtin.cc
@@ -27,6 +27,7 @@
 #include "net/cert/internal/revocation_checker.h"
 #include "net/cert/internal/simple_path_builder_delegate.h"
 #include "net/cert/internal/system_trust_store.h"
+#include "net/cert/known_roots.h"
 #include "net/cert/x509_certificate.h"
 #include "net/cert/x509_util.h"
 #include "net/der/encode_values.h"
@@ -468,12 +469,24 @@
   const CertPathBuilderResultPath& partial_path =
       *result.paths[result.best_result_index].get();
 
+  AppendPublicKeyHashes(partial_path, &verify_result->public_key_hashes);
+
+  for (auto it = verify_result->public_key_hashes.rbegin();
+       it != verify_result->public_key_hashes.rend() &&
+       !verify_result->is_issued_by_known_root;
+       ++it) {
+    verify_result->is_issued_by_known_root =
+        GetNetTrustAnchorHistogramIdForSPKI(*it) != 0;
+  }
+
   bool path_is_valid = partial_path.IsValid();
 
   const ParsedCertificate* trusted_cert = partial_path.GetTrustedCert();
   if (trusted_cert) {
-    verify_result->is_issued_by_known_root =
-        ssl_trust_store->IsKnownRoot(trusted_cert);
+    if (!verify_result->is_issued_by_known_root) {
+      verify_result->is_issued_by_known_root =
+          ssl_trust_store->IsKnownRoot(trusted_cert);
+    }
 
     verify_result->is_issued_by_additional_trust_anchor =
         ssl_trust_store->IsAdditionalTrustAnchor(trusted_cert);
@@ -494,7 +507,6 @@
   verify_result->verified_cert =
       CreateVerifiedCertChain(input_cert, partial_path);
 
-  AppendPublicKeyHashes(partial_path, &verify_result->public_key_hashes);
   MapPathBuilderErrorsToCertStatus(partial_path.errors,
                                    &verify_result->cert_status);
 
diff --git a/net/cert/cert_verify_proc_ios.cc b/net/cert/cert_verify_proc_ios.cc
index a93efff..a388b8e 100644
--- a/net/cert/cert_verify_proc_ios.cc
+++ b/net/cert/cert_verify_proc_ios.cc
@@ -12,6 +12,7 @@
 #include "net/base/net_errors.h"
 #include "net/cert/asn1_util.h"
 #include "net/cert/cert_verify_result.h"
+#include "net/cert/known_roots.h"
 #include "net/cert/test_root_certs.h"
 #include "net/cert/x509_certificate.h"
 #include "net/cert/x509_util_ios.h"
@@ -270,7 +271,7 @@
   if (CFArrayGetCount(final_chain) == 0)
     return ERR_FAILED;
 
-  // TODO(sleevi): Support CRLSet revocation.
+  // TODO(rsleevi): Support CRLSet revocation.
   switch (trust_result) {
     case kSecTrustResultUnspecified:
     case kSecTrustResultProceed:
@@ -284,10 +285,18 @@
 
   GetCertChainInfo(final_chain, verify_result);
 
-  // iOS lacks the ability to distinguish built-in versus non-built-in roots,
-  // so opt to 'fail open' of any restrictive policies that apply to built-in
-  // roots.
-  verify_result->is_issued_by_known_root = false;
+  // While iOS lacks the ability to distinguish system-trusted versus
+  // user-installed roots, the set of roots that are expected to comply with
+  // the Baseline Requirements can be determined by
+  // GetNetTrustAnchorHistogramForSPKI() - a non-zero value means that it is
+  // known as a publicly trusted, and therefore subject to the BRs, cert.
+  for (auto it = verify_result->public_key_hashes.rbegin();
+       it != verify_result->public_key_hashes.rend() &&
+       !verify_result->is_issued_by_known_root;
+       ++it) {
+    verify_result->is_issued_by_known_root =
+        GetNetTrustAnchorHistogramIdForSPKI(*it) != 0;
+  }
 
   if (IsCertStatusError(verify_result->cert_status))
     return MapCertStatusToNetError(verify_result->cert_status);
diff --git a/net/cert/cert_verify_proc_mac.cc b/net/cert/cert_verify_proc_mac.cc
index 4dd8715c..6e482e1e 100644
--- a/net/cert/cert_verify_proc_mac.cc
+++ b/net/cert/cert_verify_proc_mac.cc
@@ -8,6 +8,7 @@
 #include <CoreServices/CoreServices.h>
 #include <Security/Security.h>
 
+#include <algorithm>
 #include <string>
 #include <vector>
 
@@ -29,6 +30,7 @@
 #include "net/cert/ev_root_ca_metadata.h"
 #include "net/cert/internal/certificate_policies.h"
 #include "net/cert/internal/parsed_certificate.h"
+#include "net/cert/known_roots.h"
 #include "net/cert/known_roots_mac.h"
 #include "net/cert/test_keychain_search_list_mac.h"
 #include "net/cert/test_root_certs.h"
@@ -363,12 +365,13 @@
   return true;
 }
 
-void AppendPublicKeyHashes(CFArrayRef chain,
-                           HashValueVector* hashes) {
-  const CFIndex n = CFArrayGetCount(chain);
-  for (CFIndex i = 0; i < n; i++) {
+void AppendPublicKeyHashesAndUpdateKnownRoot(CFArrayRef chain,
+                                             HashValueVector* hashes,
+                                             bool* known_root) {
+  // Walk the chain in reverse, to optimize for IsKnownRoot checks.
+  for (CFIndex i = CFArrayGetCount(chain); i > 0; i--) {
     SecCertificateRef cert = reinterpret_cast<SecCertificateRef>(
-        const_cast<void*>(CFArrayGetValueAtIndex(chain, i)));
+        const_cast<void*>(CFArrayGetValueAtIndex(chain, i - 1)));
 
     CSSM_DATA cert_data;
     OSStatus err = SecCertificateGetData(cert, &cert_data);
@@ -382,7 +385,14 @@
     HashValue sha256(HASH_VALUE_SHA256);
     CC_SHA256(spki_bytes.data(), spki_bytes.size(), sha256.data());
     hashes->push_back(sha256);
+
+    if (!*known_root) {
+      *known_root =
+          GetNetTrustAnchorHistogramIdForSPKI(sha256) != 0 || IsKnownRoot(cert);
+    }
   }
+  // Reverse the hash array, to maintain the leaf-first ordering.
+  std::reverse(hashes->begin(), hashes->end());
 }
 
 enum CRLSetResult {
@@ -418,9 +428,9 @@
   // We iterate from the root certificate down to the leaf, keeping track of
   // the issuer's SPKI at each step.
   std::string issuer_spki_hash;
-  for (CFIndex i = CFArrayGetCount(chain) - 1; i >= 0; i--) {
+  for (CFIndex i = CFArrayGetCount(chain); i > 0; i--) {
     SecCertificateRef cert = reinterpret_cast<SecCertificateRef>(
-        const_cast<void*>(CFArrayGetValueAtIndex(chain, i)));
+        const_cast<void*>(CFArrayGetValueAtIndex(chain, i - 1)));
 
     CSSM_DATA cert_data;
     OSStatus err = SecCertificateGetData(cert, &cert_data);
@@ -594,17 +604,6 @@
   return OK;
 }
 
-// IsIssuedByKnownRoot returns true if the given chain is rooted at a root CA
-// that we recognise as a standard root.
-bool IsIssuedByKnownRoot(CFArrayRef chain) {
-  CFIndex n = CFArrayGetCount(chain);
-  if (n < 1)
-    return false;
-  SecCertificateRef root_ref = reinterpret_cast<SecCertificateRef>(
-      const_cast<void*>(CFArrayGetValueAtIndex(chain, n - 1)));
-  return IsKnownRoot(root_ref);
-}
-
 // Runs path building & verification loop for |cert|, given |flags|. This is
 // split into a separate function so verification can be repeated with different
 // flags. This function does not handle EV.
@@ -966,8 +965,9 @@
   // compatible with WinHTTP, which doesn't report this error (bug 3004).
   verify_result->cert_status &= ~CERT_STATUS_NO_REVOCATION_MECHANISM;
 
-  AppendPublicKeyHashes(completed_chain, &verify_result->public_key_hashes);
-  verify_result->is_issued_by_known_root = IsIssuedByKnownRoot(completed_chain);
+  AppendPublicKeyHashesAndUpdateKnownRoot(
+      completed_chain, &verify_result->public_key_hashes,
+      &verify_result->is_issued_by_known_root);
 
   if (IsCertStatusError(verify_result->cert_status))
     return MapCertStatusToNetError(verify_result->cert_status);
diff --git a/net/cert/cert_verify_proc_nss.cc b/net/cert/cert_verify_proc_nss.cc
index a137d5e..9860ac3 100644
--- a/net/cert/cert_verify_proc_nss.cc
+++ b/net/cert/cert_verify_proc_nss.cc
@@ -30,6 +30,7 @@
 #include "net/cert/cert_verify_result.h"
 #include "net/cert/crl_set.h"
 #include "net/cert/ev_root_ca_metadata.h"
+#include "net/cert/known_roots.h"
 #include "net/cert/known_roots_nss.h"
 #include "net/cert/x509_certificate.h"
 #include "net/cert/x509_util_nss.h"
@@ -650,17 +651,42 @@
   return hash;
 }
 
-void AppendPublicKeyHashes(CERTCertList* cert_list,
-                           CERTCertificate* root_cert,
-                           HashValueVector* hashes) {
+void AppendPublicKeyHashesAndTestKnownRoot(CERTCertList* cert_list,
+                                           CERTCertificate* root_cert,
+                                           HashValueVector* hashes,
+                                           bool* known_root) {
+  *known_root = false;
+
+  // First, traverse the list to build the list of public key hashes, in order
+  // of leaf to root.
   for (CERTCertListNode* node = CERT_LIST_HEAD(cert_list);
-       !CERT_LIST_END(node, cert_list);
-       node = CERT_LIST_NEXT(node)) {
+       !CERT_LIST_END(node, cert_list); node = CERT_LIST_NEXT(node)) {
     hashes->push_back(CertPublicKeyHashSHA256(node->cert));
   }
   if (root_cert) {
     hashes->push_back(CertPublicKeyHashSHA256(root_cert));
   }
+
+  // Second, as an optimization, work from the hashes from the last (presumed
+  // root) to the leaf, checking against the built-in list.
+  for (auto it = hashes->rbegin(); it != hashes->rend() && !*known_root; ++it) {
+    *known_root = GetNetTrustAnchorHistogramIdForSPKI(*it) != 0;
+  }
+
+  // Third, see if a root_cert was provided, and if so, if it matches a
+  // built-in root (it should, if provided).
+  if (root_cert && !*known_root) {
+    *known_root = IsKnownRoot(root_cert);
+  }
+
+  // Finally, if all else has failed and nothing short-circuited, walk the
+  // remainder of the chain. As it's unlikely to reach this point, this just
+  // walks from the leaf and is not optimized, favoring readability.
+  for (CERTCertListNode* node = CERT_LIST_HEAD(cert_list);
+       !*known_root && !CERT_LIST_END(node, cert_list);
+       node = CERT_LIST_NEXT(node)) {
+    *known_root = IsKnownRoot(node->cert);
+  }
 }
 
 // Returns true if |cert_handle| contains a policy OID that is an EV policy
@@ -886,9 +912,18 @@
       PKIXVerifyCert(cert_handle, check_revocation, false, cert_io_enabled,
                      NULL, 0, trust_anchors.get(), &crlset_callback, cvout);
 
+  bool known_root = false;
+  HashValueVector hashes;
+  if (status == SECSuccess) {
+    AppendPublicKeyHashesAndTestKnownRoot(
+        cvout[cvout_cert_list_index].value.pointer.chain,
+        cvout[cvout_trust_anchor_index].value.pointer.cert, &hashes,
+        &known_root);
+  }
+
   if (status == SECSuccess &&
       (flags & CertVerifier::VERIFY_REV_CHECKING_REQUIRED_LOCAL_ANCHORS) &&
-      !IsKnownRoot(cvout[cvout_trust_anchor_index].value.pointer.cert)) {
+      !known_root) {
     // TODO(rsleevi): Optimize this by supplying the constructed chain to
     // libpkix via cvin. Omitting for now, due to lack of coverage in upstream
     // NSS tests for that feature.
@@ -896,15 +931,18 @@
     verify_result->cert_status |= CERT_STATUS_REV_CHECKING_ENABLED;
     status = PKIXVerifyCert(cert_handle, true, true, cert_io_enabled, NULL, 0,
                             trust_anchors.get(), &crlset_callback, cvout);
+    if (status == SECSuccess) {
+      AppendPublicKeyHashesAndTestKnownRoot(
+          cvout[cvout_cert_list_index].value.pointer.chain,
+          cvout[cvout_trust_anchor_index].value.pointer.cert, &hashes,
+          &known_root);
+    }
   }
 
   if (status == SECSuccess) {
-    AppendPublicKeyHashes(cvout[cvout_cert_list_index].value.pointer.chain,
-                          cvout[cvout_trust_anchor_index].value.pointer.cert,
-                          &verify_result->public_key_hashes);
+    verify_result->public_key_hashes = hashes;
+    verify_result->is_issued_by_known_root = known_root;
 
-    verify_result->is_issued_by_known_root =
-        IsKnownRoot(cvout[cvout_trust_anchor_index].value.pointer.cert);
     verify_result->is_issued_by_additional_trust_anchor =
         IsAdditionalTrustAnchor(
             trust_anchors.get(),
diff --git a/net/cert/cert_verify_proc_unittest.cc b/net/cert/cert_verify_proc_unittest.cc
index 9199b89..63a7e98 100644
--- a/net/cert/cert_verify_proc_unittest.cc
+++ b/net/cert/cert_verify_proc_unittest.cc
@@ -1241,6 +1241,9 @@
       {"40_months_after_2015_04.pem", true},
       {"60_months_after_2012_07.pem", false},
       {"61_months_after_2012_07.pem", true},
+      {"825_days_after_2018_03_01.pem", false},
+      {"826_days_after_2018_03_01.pem", true},
+      {"825_days_1_second_after_2018_03_01.pem", true},
   };
 
   base::FilePath certs_dir = GetTestCertsDirectory();
@@ -2490,73 +2493,6 @@
   VerifyCertName(".test.example", false);
 }
 
-// Tests that commonName-fallback is handled correctly:
-// - If it's a publicly trusted certificate, the commonName should never
-//   match.
-// - If it chains to a private root, the commonName should not match if
-//   the subjectAltName is absent, and the flags don't allow fallback.
-// - If it chains to a private root, the commonName SHOULD match iff the
-//   subjectAltName is absent and the flags allow a fallback.
-TEST_F(CertVerifyProcNameTest, HandlesCommonNameFallbackLocalAnchors) {
-  scoped_refptr<X509Certificate> cert(
-      ImportCertFromFile(GetTestCertsDirectory(), "salesforce_com_test.pem"));
-  ASSERT_TRUE(cert);
-
-  CertVerifyResult result;
-  scoped_refptr<CertVerifyProc> verify_proc;
-  CertVerifyResult verify_result;
-  int error;
-
-  // Publicly trusted: Always ignores commonName, regardless of flags.
-  result = CertVerifyResult();
-  verify_result = CertVerifyResult();
-  error = 0;
-  result.is_issued_by_known_root = true;
-  verify_proc = new MockCertVerifyProc(result);
-  error = verify_proc->Verify(cert.get(), "prerelna1.pre.salesforce.com",
-                              std::string(), 0, nullptr, CertificateList(),
-                              &verify_result);
-  EXPECT_THAT(error, IsError(ERR_CERT_COMMON_NAME_INVALID));
-  EXPECT_TRUE(verify_result.cert_status & CERT_STATUS_COMMON_NAME_INVALID);
-
-  result = CertVerifyResult();
-  verify_result = CertVerifyResult();
-  error = 0;
-  result.is_issued_by_known_root = true;
-  verify_proc = new MockCertVerifyProc(result);
-  error = verify_proc->Verify(
-      cert.get(), "prerelna1.pre.salesforce.com", std::string(),
-      CertVerifier::VERIFY_ENABLE_COMMON_NAME_FALLBACK_LOCAL_ANCHORS, nullptr,
-      CertificateList(), &verify_result);
-  EXPECT_THAT(error, IsError(ERR_CERT_COMMON_NAME_INVALID));
-  EXPECT_TRUE(verify_result.cert_status & CERT_STATUS_COMMON_NAME_INVALID);
-
-  // Privately trusted: Ignores commonName by default.
-  result = CertVerifyResult();
-  verify_result = CertVerifyResult();
-  error = 0;
-  result.is_issued_by_known_root = false;
-  verify_proc = new MockCertVerifyProc(result);
-  error = verify_proc->Verify(cert.get(), "prerelna1.pre.salesforce.com",
-                              std::string(), 0, nullptr, CertificateList(),
-                              &verify_result);
-  EXPECT_THAT(error, IsError(ERR_CERT_COMMON_NAME_INVALID));
-  EXPECT_TRUE(verify_result.cert_status & CERT_STATUS_COMMON_NAME_INVALID);
-
-  // Privately trusted: Falls back to common name if flags allow.
-  result = CertVerifyResult();
-  verify_result = CertVerifyResult();
-  error = 0;
-  result.is_issued_by_known_root = false;
-  verify_proc = new MockCertVerifyProc(result);
-  error = verify_proc->Verify(
-      cert.get(), "prerelna1.pre.salesforce.com", std::string(),
-      CertVerifier::VERIFY_ENABLE_COMMON_NAME_FALLBACK_LOCAL_ANCHORS, nullptr,
-      CertificateList(), &verify_result);
-  EXPECT_THAT(error, IsOk());
-  EXPECT_FALSE(verify_result.cert_status & CERT_STATUS_COMMON_NAME_INVALID);
-}
-
 // Tests that CertVerifyProc records a histogram correctly when a
 // certificate chaining to a private root contains the TLS feature
 // extension and does not have a stapled OCSP response.
diff --git a/net/cert/cert_verify_proc_win.cc b/net/cert/cert_verify_proc_win.cc
index a606da9d..9777053 100644
--- a/net/cert/cert_verify_proc_win.cc
+++ b/net/cert/cert_verify_proc_win.cc
@@ -4,6 +4,7 @@
 
 #include "net/cert/cert_verify_proc_win.h"
 
+#include <algorithm>
 #include <memory>
 #include <string>
 #include <vector>
@@ -23,6 +24,7 @@
 #include "net/cert/cert_verify_result.h"
 #include "net/cert/crl_set.h"
 #include "net/cert/ev_root_ca_metadata.h"
+#include "net/cert/known_roots.h"
 #include "net/cert/known_roots_win.h"
 #include "net/cert/test_root_certs.h"
 #include "net/cert/x509_certificate.h"
@@ -264,19 +266,6 @@
   return false;
 }
 
-// IsIssuedByKnownRoot returns true if the given chain is rooted at a root CA
-// which we recognise as a standard root.
-// static
-bool IsIssuedByKnownRoot(PCCERT_CHAIN_CONTEXT chain_context) {
-  PCERT_SIMPLE_CHAIN first_chain = chain_context->rgpChain[0];
-  int num_elements = first_chain->cElement;
-  if (num_elements < 1)
-    return false;
-  PCERT_CHAIN_ELEMENT* element = first_chain->rgpElement;
-  PCCERT_CONTEXT cert = element[num_elements - 1]->pCertContext;
-  return IsKnownRoot(cert);
-}
-
 // Saves some information about the certificate chain |chain_context| in
 // |*verify_result|. The caller MUST initialize |*verify_result| before
 // calling this function.
@@ -527,17 +516,20 @@
   return result;
 }
 
-void AppendPublicKeyHashes(PCCERT_CHAIN_CONTEXT chain,
-                           HashValueVector* hashes) {
+void AppendPublicKeyHashesAndUpdateKnownRoot(PCCERT_CHAIN_CONTEXT chain,
+                                             HashValueVector* hashes,
+                                             bool* known_root) {
   if (chain->cChain == 0)
     return;
 
   PCERT_SIMPLE_CHAIN first_chain = chain->rgpChain[0];
   PCERT_CHAIN_ELEMENT* const element = first_chain->rgpElement;
-
   const DWORD num_elements = first_chain->cElement;
-  for (DWORD i = 0; i < num_elements; i++) {
-    PCCERT_CONTEXT cert = element[i]->pCertContext;
+
+  // Walk the chain in reverse, from the probable root to the known leaf, as
+  // an optimization for IsKnownRoot checks.
+  for (DWORD i = num_elements; i > 0; i--) {
+    PCCERT_CONTEXT cert = element[i - 1]->pCertContext;
 
     base::StringPiece der_bytes(
         reinterpret_cast<const char*>(cert->pbCertEncoded),
@@ -549,7 +541,15 @@
     HashValue sha256(HASH_VALUE_SHA256);
     crypto::SHA256HashString(spki_bytes, sha256.data(), crypto::kSHA256Length);
     hashes->push_back(sha256);
+
+    if (!*known_root) {
+      *known_root =
+          GetNetTrustAnchorHistogramIdForSPKI(sha256) != 0 || IsKnownRoot(cert);
+    }
   }
+
+  // Reverse the hash list, such that it's ordered from leaf to root.
+  std::reverse(hashes->begin(), hashes->end());
 }
 
 // Returns true if the certificate is an extended-validation certificate.
@@ -1163,8 +1163,9 @@
     verify_result->cert_status &= ~CERT_STATUS_UNABLE_TO_CHECK_REVOCATION;
   }
 
-  AppendPublicKeyHashes(chain_context, &verify_result->public_key_hashes);
-  verify_result->is_issued_by_known_root = IsIssuedByKnownRoot(chain_context);
+  AppendPublicKeyHashesAndUpdateKnownRoot(
+      chain_context, &verify_result->public_key_hashes,
+      &verify_result->is_issued_by_known_root);
 
   if (IsCertStatusError(verify_result->cert_status))
     return MapCertStatusToNetError(verify_result->cert_status);
diff --git a/net/cert/cert_verify_result.cc b/net/cert/cert_verify_result.cc
index 22ba649..f77bf8f3 100644
--- a/net/cert/cert_verify_result.cc
+++ b/net/cert/cert_verify_result.cc
@@ -28,7 +28,6 @@
   has_sha1_leaf = false;
   is_issued_by_known_root = false;
   is_issued_by_additional_trust_anchor = false;
-  common_name_fallback_used = false;
 
   public_key_hashes.clear();
   ocsp_result = OCSPVerifyResult();
@@ -39,13 +38,12 @@
          (!verified_cert || verified_cert->Equals(other.verified_cert.get())) &&
          std::tie(cert_status, has_md2, has_md4, has_md5, has_sha1,
                   has_sha1_leaf, public_key_hashes, is_issued_by_known_root,
-                  is_issued_by_additional_trust_anchor,
-                  common_name_fallback_used, ocsp_result) ==
+                  is_issued_by_additional_trust_anchor, ocsp_result) ==
              std::tie(other.cert_status, other.has_md2, other.has_md4,
                       other.has_md5, other.has_sha1, other.has_sha1_leaf,
                       other.public_key_hashes, other.is_issued_by_known_root,
                       other.is_issued_by_additional_trust_anchor,
-                      other.common_name_fallback_used, other.ocsp_result);
+                      other.ocsp_result);
 }
 
 }  // namespace net
diff --git a/net/cert/cert_verify_result.h b/net/cert/cert_verify_result.h
index 43c88b9..8d50fd2 100644
--- a/net/cert/cert_verify_result.h
+++ b/net/cert/cert_verify_result.h
@@ -78,10 +78,6 @@
   // verification came from the list of additional trust anchors.
   bool is_issued_by_additional_trust_anchor;
 
-  // True if a fallback to the common name was used when matching the host
-  // name, rather than using the subjectAltName.
-  bool common_name_fallback_used;
-
   // Verification of stapled OCSP response, if present.
   OCSPVerifyResult ocsp_result;
 };
diff --git a/net/cert/known_roots_mac.cc b/net/cert/known_roots_mac.cc
index c4c7c645..40ed9ac 100644
--- a/net/cert/known_roots_mac.cc
+++ b/net/cert/known_roots_mac.cc
@@ -6,7 +6,8 @@
 
 #include <Security/Security.h>
 
-#include <set>
+#include <algorithm>
+#include <vector>
 
 #include "base/lazy_instance.h"
 #include "crypto/mac_security_services_lock.h"
@@ -32,8 +33,9 @@
     if (known_roots_.empty())
       return true;
 
-    SHA256HashValue hash = x509_util::CalculateFingerprint256(cert);
-    return known_roots_.find(hash) != known_roots_.end();
+    HashValue hash(x509_util::CalculateFingerprint256(cert));
+    return IsSHA256HashInSortedArray(hash, &known_roots_[0],
+                                     known_roots_.size());
   }
 
  private:
@@ -51,16 +53,19 @@
       return;
     }
     base::ScopedCFTypeRef<CFArrayRef> scoped_array(cert_array);
+
+    known_roots_.reserve(CFArrayGetCount(cert_array));
     for (CFIndex i = 0, size = CFArrayGetCount(cert_array); i < size; ++i) {
       SecCertificateRef cert = reinterpret_cast<SecCertificateRef>(
           const_cast<void*>(CFArrayGetValueAtIndex(cert_array, i)));
-      known_roots_.insert(x509_util::CalculateFingerprint256(cert));
+      known_roots_.push_back(x509_util::CalculateFingerprint256(cert));
     }
+    std::sort(known_roots_.begin(), known_roots_.end());
   }
 
   ~OSXKnownRootHelper() {}
 
-  std::set<SHA256HashValue> known_roots_;
+  std::vector<SHA256HashValue> known_roots_;
 };
 
 base::LazyInstance<OSXKnownRootHelper>::Leaky g_known_roots =
diff --git a/net/cert/known_roots_win.cc b/net/cert/known_roots_win.cc
index 33dd6999..89c9a41 100644
--- a/net/cert/known_roots_win.cc
+++ b/net/cert/known_roots_win.cc
@@ -7,51 +7,16 @@
 #include "base/metrics/histogram_macros.h"
 #include "crypto/sha2.h"
 #include "net/base/hash_value.h"
-#include "net/cert/x509_certificate_known_roots_win.h"
 #include "net/cert/x509_util_win.h"
 
 namespace net {
 
 bool IsKnownRoot(PCCERT_CONTEXT cert) {
-  SHA256HashValue hash = x509_util::CalculateFingerprint256(cert);
-  bool is_builtin =
-      IsSHA256HashInSortedArray(HashValue(hash), kKnownRootCertSHA256Hashes,
-                                kKnownRootCertSHA256HashesLength);
-
-  // Test to see if the use of a built-in set of known roots on Windows can be
-  // replaced with using AuthRoot's SHA-256 property. On any system other than
-  // a fresh RTM with no AuthRoot updates, this property should always exist for
-  // roots delivered via AuthRoot.stl, but should not exist on any manually or
-  // administratively deployed roots.
   BYTE hash_prop[32] = {0};
   DWORD size = sizeof(hash_prop);
-  bool found_property =
-      CertGetCertificateContextProperty(
-          cert, CERT_AUTH_ROOT_SHA256_HASH_PROP_ID, &hash_prop, &size) &&
-      size == sizeof(hash_prop);
-
-  enum BuiltinStatus {
-    BUILT_IN_PROPERTY_NOT_FOUND_BUILTIN_NOT_SET = 0,
-    BUILT_IN_PROPERTY_NOT_FOUND_BUILTIN_SET = 1,
-    BUILT_IN_PROPERTY_FOUND_BUILTIN_NOT_SET = 2,
-    BUILT_IN_PROPERTY_FOUND_BUILTIN_SET = 3,
-    BUILT_IN_MAX_VALUE,
-  } status;
-  if (!found_property && !is_builtin) {
-    status = BUILT_IN_PROPERTY_NOT_FOUND_BUILTIN_NOT_SET;
-  } else if (!found_property && is_builtin) {
-    status = BUILT_IN_PROPERTY_NOT_FOUND_BUILTIN_SET;
-  } else if (found_property && !is_builtin) {
-    status = BUILT_IN_PROPERTY_FOUND_BUILTIN_NOT_SET;
-  } else if (found_property && is_builtin) {
-    status = BUILT_IN_PROPERTY_FOUND_BUILTIN_SET;
-  } else {
-    status = BUILT_IN_MAX_VALUE;
-  }
-  UMA_HISTOGRAM_ENUMERATION("Net.SSL_AuthRootConsistency", status,
-                            BUILT_IN_MAX_VALUE);
-
-  return is_builtin;
+  return CertGetCertificateContextProperty(
+             cert, CERT_AUTH_ROOT_SHA256_HASH_PROP_ID, &hash_prop, &size) &&
+         size == sizeof(hash_prop);
 }
 
 }  // namespace net
diff --git a/net/cert/multi_threaded_cert_verifier.cc b/net/cert/multi_threaded_cert_verifier.cc
index 544fe3a..9b4437c 100644
--- a/net/cert/multi_threaded_cert_verifier.cc
+++ b/net/cert/multi_threaded_cert_verifier.cc
@@ -95,8 +95,6 @@
                       verify_result.is_issued_by_known_root);
   results->SetBoolean("is_issued_by_additional_trust_anchor",
                       verify_result.is_issued_by_additional_trust_anchor);
-  results->SetBoolean("common_name_fallback_used",
-                      verify_result.common_name_fallback_used);
   results->SetInteger("cert_status", verify_result.cert_status);
   results->Set("verified_cert",
                NetLogX509CertificateCallback(verify_result.verified_cert.get(),
diff --git a/net/cert/x509_certificate.cc b/net/cert/x509_certificate.cc
index ffc90d0..615c03ae 100644
--- a/net/cert/x509_certificate.cc
+++ b/net/cert/x509_certificate.cc
@@ -373,12 +373,6 @@
   }
 }
 
-void X509Certificate::GetDNSNames(std::vector<std::string>* dns_names) const {
-  GetSubjectAltName(dns_names, NULL);
-  if (dns_names->empty())
-    dns_names->push_back(subject_.common_name);
-}
-
 bool X509Certificate::GetSubjectAltName(
     std::vector<std::string>* dns_names,
     std::vector<std::string>* ip_addrs) const {
@@ -478,11 +472,16 @@
 // static
 bool X509Certificate::VerifyHostname(
     const std::string& hostname,
-    const std::string& cert_common_name,
     const std::vector<std::string>& cert_san_dns_names,
-    const std::vector<std::string>& cert_san_ip_addrs,
-    bool allow_common_name_fallback) {
+    const std::vector<std::string>& cert_san_ip_addrs) {
   DCHECK(!hostname.empty());
+
+  if (cert_san_dns_names.empty() && cert_san_ip_addrs.empty()) {
+    // Either a dNSName or iPAddress subjectAltName MUST be present in order
+    // to match, so fail quickly if not.
+    return false;
+  }
+
   // Perform name verification following http://tools.ietf.org/html/rfc6125.
   // The terminology used in this method is as per that RFC:-
   // Reference identifier == the host the local user/agent is intending to
@@ -502,21 +501,8 @@
   if (reference_name.empty())
     return false;
 
-  if (!allow_common_name_fallback && cert_san_dns_names.empty() &&
-      cert_san_ip_addrs.empty()) {
-    // Common Name matching is not allowed, so fail fast.
-    return false;
-  }
-
   // Fully handle all cases where |hostname| contains an IP address.
   if (host_info.IsIPAddress()) {
-    if (allow_common_name_fallback && cert_san_dns_names.empty() &&
-        cert_san_ip_addrs.empty() &&
-        host_info.family == url::CanonHostInfo::IPV4) {
-      // Fallback to Common name matching. As this is deprecated and only
-      // supported for compatibility refuse it for IPv6 addresses.
-      return reference_name == cert_common_name;
-    }
     base::StringPiece ip_addr_string(
         reinterpret_cast<const char*>(host_info.address),
         host_info.AddressLength());
@@ -566,19 +552,9 @@
   }
 
   // Now step through the DNS names doing wild card comparison (if necessary)
-  // on each against the reference name. If subjectAltName is empty, then
-  // fallback to use the common name instead.
+  // on each against the reference name.
   std::vector<std::string> common_name_as_vector;
   const std::vector<std::string>* presented_names = &cert_san_dns_names;
-  if (allow_common_name_fallback && cert_san_dns_names.empty() &&
-      cert_san_ip_addrs.empty()) {
-    // Note: there's a small possibility cert_common_name is an international
-    // domain name in non-standard encoding (e.g. UTF8String or BMPString
-    // instead of A-label). As common name fallback is deprecated we're not
-    // doing anything specific to deal with this.
-    common_name_as_vector.push_back(cert_common_name);
-    presented_names = &common_name_as_vector;
-  }
   for (std::vector<std::string>::const_iterator it =
            presented_names->begin();
        it != presented_names->end(); ++it) {
@@ -618,12 +594,10 @@
   return false;
 }
 
-bool X509Certificate::VerifyNameMatch(const std::string& hostname,
-                                      bool allow_common_name_fallback) const {
+bool X509Certificate::VerifyNameMatch(const std::string& hostname) const {
   std::vector<std::string> dns_names, ip_addrs;
   GetSubjectAltName(&dns_names, &ip_addrs);
-  return VerifyHostname(hostname, subject_.common_name, dns_names, ip_addrs,
-                        allow_common_name_fallback);
+  return VerifyHostname(hostname, dns_names, ip_addrs);
 }
 
 // static
diff --git a/net/cert/x509_certificate.h b/net/cert/x509_certificate.h
index 9d3af48..5497e2e 100644
--- a/net/cert/x509_certificate.h
+++ b/net/cert/x509_certificate.h
@@ -166,15 +166,6 @@
   const base::Time& valid_start() const { return valid_start_; }
   const base::Time& valid_expiry() const { return valid_expiry_; }
 
-  // Gets the DNS names in the certificate. Pursuant to RFC 2818, Section 3.1
-  // Server Identity, if the certificate has a subjectAltName extension of
-  // type dNSName, this method gets the DNS names in that extension.
-  // Otherwise, it gets the common name in the subject field.
-  //
-  // Note: Chrome has deprecated fallback to the subject field, see
-  // https://crbug.com/308330; prefer GetSubjectAltName() instead.
-  void GetDNSNames(std::vector<std::string>* dns_names) const;
-
   // Gets the subjectAltName extension field from the certificate, if any.
   // For future extension; currently this only returns those name types that
   // are required for HTTP certificate name verification - see VerifyHostname.
@@ -199,14 +190,10 @@
   // Verifies that |hostname| matches this certificate.
   // Does not verify that the certificate is valid, only that the certificate
   // matches this host.
-  // If |allow_common_name_fallback| is set to true, and iff no SANs are
-  // present of type dNSName or iPAddress, then fallback to using the
-  // certificate's commonName field in the Subject.
-  bool VerifyNameMatch(const std::string& hostname,
-                       bool allow_common_name_fallback) const;
+  bool VerifyNameMatch(const std::string& hostname) const;
 
-  // Returns the PEM encoded data from a DER encoded certificate. If the return
-  // value is true, then the PEM encoded certificate is written to
+  // Returns the PEM encoded data from a DER encoded certificate. If the
+  // return value is true, then the PEM encoded certificate is written to
   // |pem_encoded|.
   static bool GetPEMEncodedFromDER(base::StringPiece der_encoded,
                                    std::string* pem_encoded);
@@ -294,20 +281,14 @@
   // Verifies that |hostname| matches one of the certificate names or IP
   // addresses supplied, based on TLS name matching rules - specifically,
   // following http://tools.ietf.org/html/rfc6125.
-  // |cert_common_name| is the Subject CN, e.g. from X509Certificate::subject().
   // The members of |cert_san_dns_names| and |cert_san_ipaddrs| must be filled
   // from the dNSName and iPAddress components of the subject alternative name
   // extension, if present. Note these IP addresses are NOT ascii-encoded:
   // they must be 4 or 16 bytes of network-ordered data, for IPv4 and IPv6
   // addresses, respectively.
-  // If |allow_common_name_fallback| is true, then the |cert_common_name| will
-  // be used if the |cert_san_dns_names| and |cert_san_ip_addrs| parameters are
-  // empty.
   static bool VerifyHostname(const std::string& hostname,
-                             const std::string& cert_common_name,
                              const std::vector<std::string>& cert_san_dns_names,
-                             const std::vector<std::string>& cert_san_ip_addrs,
-                             bool allow_common_name_fallback);
+                             const std::vector<std::string>& cert_san_ip_addrs);
 
   // The subject of the certificate.
   CertPrincipal subject_;
diff --git a/net/cert/x509_certificate_known_roots_win.h b/net/cert/x509_certificate_known_roots_win.h
deleted file mode 100644
index cdc660e..0000000
--- a/net/cert/x509_certificate_known_roots_win.h
+++ /dev/null
@@ -1,2077 +0,0 @@
-// Copyright (c) 2011 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 NET_CERT_X509_CERTIFICATE_KNOWN_ROOTS_WIN_H_
-#define NET_CERT_X509_CERTIFICATE_KNOWN_ROOTS_WIN_H_
-
-#include <stdint.h>
-
-#include "net/base/hash_value.h"
-
-namespace net {
-
-// This is a union of Microsoft trust roots over time, from 01 January
-// 2007 through 13 June 2017.
-//
-// Extracted from
-// http://www.download.windowsupdate.com/msdownload/update/v3/
-// static/trustedr/en/authrootstl.cab
-//
-// Note that these *are not* trust anchors for Chromium. They are only used to
-// distinguish `real' root CAs from roots that were user-installed.
-static const SHA256HashValue kKnownRootCertSHA256Hashes[] = {
-    // C=US, O=Network Solutions L.L.C., CN=Network Solutions Certificate
-    // Authority
-    {{0x00, 0x16, 0x86, 0xCD, 0x18, 0x1F, 0x83, 0xA1, 0xB1, 0x21, 0x7D,
-      0x30, 0x5B, 0x36, 0x5C, 0x41, 0xE3, 0x47, 0x0A, 0x78, 0xA1, 0xD3,
-      0x7B, 0x13, 0x4A, 0x98, 0xCD, 0x54, 0x7B, 0x92, 0xDA, 0xB3}},
-    // C=SI, O=POSTA, OU=POSTArCA
-    {{0x00, 0x7E, 0x45, 0x2F, 0xD5, 0xCF, 0x83, 0x89, 0x46, 0x69, 0x6D,
-      0xFE, 0x37, 0xA2, 0xDB, 0x2E, 0xF3, 0x99, 0x14, 0x36, 0xD2, 0x7B,
-      0xCB, 0xAB, 0x45, 0x92, 0x20, 0x53, 0xC1, 0x5A, 0x87, 0xA8}},
-    // C=ES, O=Agencia Notarial de Certificacion S.L. Unipersonal - CIF
-    // B83395988, CN=ANCERT Certificados Notariales
-    {{0x00, 0xAB, 0x44, 0x4A, 0xBD, 0x6B, 0xDB, 0xA3, 0x3D, 0xA8, 0xDE,
-      0x56, 0x9A, 0xC4, 0xEC, 0xDE, 0x32, 0x6D, 0x1B, 0xE1, 0xA6, 0x14,
-      0x42, 0xD5, 0xEE, 0xC3, 0x97, 0x5A, 0x0C, 0x24, 0x3F, 0x04}},
-    // C=US, O=Entrust, Inc., OU=See www.entrust.net/legal-terms, OU=(c) 2012
-    // Entrust, Inc. - for authorized use only, CN=Entrust Root Certification
-    // Authority - EC1
-    {{0x02, 0xED, 0x0E, 0xB2, 0x8C, 0x14, 0xDA, 0x45, 0x16, 0x5C, 0x56,
-      0x67, 0x91, 0x70, 0x0D, 0x64, 0x51, 0xD7, 0xFB, 0x56, 0xF0, 0xB2,
-      0xAB, 0x1D, 0x3B, 0x8E, 0xB0, 0x70, 0xE5, 0x6E, 0xDF, 0xF5}},
-    // C=US, O=Wells Fargo, OU=Wells Fargo Certification Authority, CN=Wells
-    // Fargo Root Certificate Authority
-    {{0x03, 0x45, 0x8B, 0x6A, 0xBE, 0xEC, 0xC2, 0x14, 0x95, 0x3D, 0x97,
-      0x14, 0x9A, 0xF4, 0x53, 0x91, 0x69, 0x1D, 0xE9, 0xF9, 0xCD, 0xCC,
-      0x26, 0x47, 0x86, 0x3A, 0x3D, 0x67, 0xC9, 0x5C, 0x24, 0x3B}},
-    // C=US, O=AffirmTrust, CN=AffirmTrust Commercial
-    {{0x03, 0x76, 0xAB, 0x1D, 0x54, 0xC5, 0xF9, 0x80, 0x3C, 0xE4, 0xB2,
-      0xE2, 0x01, 0xA0, 0xEE, 0x7E, 0xEF, 0x7B, 0x57, 0xB6, 0x36, 0xE8,
-      0xA9, 0x3C, 0x9B, 0x8D, 0x48, 0x60, 0xC9, 0x6F, 0x5F, 0xA7}},
-    // C=KR, O=Government of Korea, OU=GPKI, CN=Root CA
-    {{0x03, 0x78, 0xB2, 0x02, 0xCC, 0xAB, 0xBA, 0x99, 0xA1, 0x2E, 0x56,
-      0x9A, 0x11, 0xA0, 0x77, 0xDB, 0x1E, 0xDB, 0x39, 0x48, 0x20, 0x61,
-      0xC7, 0x5D, 0x00, 0x73, 0x05, 0x9D, 0x9A, 0xB5, 0xB5, 0x13}},
-    // CN=ACEDICOM Root, OU=PKI, O=EDICOM, C=ES
-    {{0x03, 0x95, 0x0F, 0xB4, 0x9A, 0x53, 0x1F, 0x3E, 0x19, 0x91, 0x94,
-      0x23, 0x98, 0xDF, 0xA9, 0xE0, 0xEA, 0x32, 0xD7, 0xBA, 0x1C, 0xDD,
-      0x9B, 0xC8, 0x5D, 0xB5, 0x7E, 0xD9, 0x40, 0x0B, 0x43, 0x4A}},
-    // C=ES, CN=Autoridad de Certificacion Firmaprofesional CIF A62634068
-    {{0x04, 0x04, 0x80, 0x28, 0xBF, 0x1F, 0x28, 0x64, 0xD4, 0x8F, 0x9A,
-      0xD4, 0xD8, 0x32, 0x94, 0x36, 0x6A, 0x82, 0x88, 0x56, 0x55, 0x3F,
-      0x3B, 0x14, 0x30, 0x3F, 0x90, 0x14, 0x7F, 0x5D, 0x40, 0xEF}},
-    // C=us, O=U.S. Government, OU=FBCA, CN=Common Policy
-    {{0x04, 0xAC, 0xFB, 0x3B, 0x24, 0x79, 0x3F, 0x30, 0x0F, 0x67, 0xEF,
-      0x87, 0xE4, 0x4D, 0xD7, 0x2C, 0xB9, 0xB2, 0x8B, 0x20, 0x4F, 0x38,
-      0x9A, 0x7C, 0xD5, 0xAE, 0x28, 0x78, 0x5C, 0x7D, 0x42, 0xCD}},
-    // C=ES, ST=MADRID, L=MADRID, OU=see current address at
-    // www.camerfirma.com/address, OU=CHAMBERS OF COMMERCE ROOT -
-    // 2016/serialNumber=A82743287/2.5.4.97=VATES-A82743287, O=AC CAMERFIRMA
-    // S.A., CN=CHAMBERS OF COMMERCE ROOT - 2016
-    {{0x04, 0xF1, 0xBE, 0xC3, 0x69, 0x51, 0xBC, 0x14, 0x54, 0xA9, 0x04,
-      0xCE, 0x32, 0x89, 0x0C, 0x5D, 0xA3, 0xCD, 0xE1, 0x35, 0x6B, 0x79,
-      0x00, 0xF6, 0xE6, 0x2D, 0xFA, 0x20, 0x41, 0xEB, 0xAD, 0x51}},
-    // C=LT, O=VI Registru Centras - I.k. 124110246, OU=Registru Centro
-    // Sertifikavimo Centras, CN=VI Registru Centras RCSC (RootCA)
-    {{0x05, 0x36, 0x80, 0x1F, 0xBB, 0x44, 0x3B, 0x3E, 0x90, 0x5F, 0xD6,
-      0xD7, 0x0D, 0x8C, 0x81, 0xEB, 0x88, 0x55, 0x1B, 0xE8, 0x06, 0x12,
-      0x99, 0x11, 0x0D, 0x2B, 0x4F, 0x82, 0xE6, 0x4C, 0xAD, 0xE1}},
-    // C=BE, O=Certipost s.a./n.v., CN=Certipost E-Trust Primary Qualified CA
-    {{0x05, 0x8A, 0x40, 0x32, 0x3E, 0xC8, 0xC4, 0x62, 0x62, 0xC3, 0x05,
-      0x2A, 0x5D, 0x35, 0x7B, 0x91, 0xAC, 0x24, 0xD3, 0xDA, 0x26, 0x35,
-      0x1B, 0x3F, 0xF4, 0x40, 0x7E, 0x99, 0xF7, 0xA4, 0xE9, 0xB4}},
-    // C=EU, L=Madrid (see current address at
-    // www.camerfirma.com/address)/serialNumber=A82743287, O=AC Camerfirma S.A.,
-    // CN=Chambers of Commerce Root - 2008
-    {{0x06, 0x3E, 0x4A, 0xFA, 0xC4, 0x91, 0xDF, 0xD3, 0x32, 0xF3, 0x08,
-      0x9B, 0x85, 0x42, 0xE9, 0x46, 0x17, 0xD8, 0x93, 0xD7, 0xFE, 0x94,
-      0x4E, 0x10, 0xA7, 0x93, 0x7E, 0xE2, 0x9D, 0x96, 0x93, 0xC0}},
-    // O=Digital Signature Trust Co., CN=DST Root CA X3
-    {{0x06, 0x87, 0x26, 0x03, 0x31, 0xA7, 0x24, 0x03, 0xD9, 0x09, 0xF1,
-      0x05, 0xE6, 0x9B, 0xCF, 0x0D, 0x32, 0xE1, 0xBD, 0x24, 0x93, 0xFF,
-      0xC6, 0xD9, 0x20, 0x6D, 0x11, 0xBC, 0xD6, 0x77, 0x07, 0x39}},
-    // C=JP, O=LGPKI, OU=Application CA G2
-    {{0x06, 0xDB, 0x3A, 0xF2, 0xDB, 0x7B, 0xAE, 0xE0, 0x0C, 0x03, 0xB9,
-      0x57, 0x82, 0x88, 0xBB, 0xDE, 0x54, 0x1D, 0x90, 0x6E, 0xB0, 0x06,
-      0x93, 0x27, 0x41, 0x32, 0x95, 0xFF, 0xB4, 0x86, 0x00, 0x8E}},
-    // C=IE, O=An Post, OU=Post.Trust Ltd., CN=Post.Trust Root CA
-    {{0x07, 0x45, 0x3D, 0x53, 0x79, 0x3B, 0xF4, 0x18, 0x19, 0xA5, 0x25,
-      0x1C, 0x69, 0xF8, 0x8E, 0x2B, 0xB3, 0x44, 0xB5, 0x9C, 0xA8, 0x28,
-      0xB5, 0xA5, 0x43, 0x78, 0x15, 0x99, 0xEA, 0xF3, 0xD6, 0x02}},
-    // C=PA, ST=Panama, L=Panama City, O=TrustCor Systems S. de R.L.,
-    // OU=TrustCor Certificate Authority, CN=TrustCor RootCert CA-2
-    {{0x07, 0x53, 0xE9, 0x40, 0x37, 0x8C, 0x1B, 0xD5, 0xE3, 0x83, 0x6E,
-      0x39, 0x5D, 0xAE, 0xA5, 0xCB, 0x83, 0x9E, 0x50, 0x46, 0xF1, 0xBD,
-      0x0E, 0xAE, 0x19, 0x51, 0xCF, 0x10, 0xFE, 0xC7, 0xC9, 0x65}},
-    // C=IL, O=PersonalID Ltd., OU=Certificate Services, CN=PersonalID
-    // Trustworthy RootCA 2011
-    {{0x07, 0x5B, 0xFC, 0xCA, 0x2D, 0x55, 0xAE, 0x6E, 0x35, 0x74, 0x2C,
-      0x32, 0xAF, 0xD0, 0xCA, 0x8E, 0xA4, 0xC9, 0x58, 0xFE, 0xEF, 0xC2,
-      0x32, 0x24, 0x99, 0x95, 0x41, 0xC0, 0x33, 0xD6, 0x9C, 0x8D}},
-    // C=CN, O=CFCA GT CA
-    {{0x07, 0x71, 0x92, 0x0C, 0x8C, 0xB8, 0x74, 0xD5, 0xC5, 0xA4, 0xDC,
-      0x0D, 0x6A, 0x51, 0xA2, 0xD4, 0x95, 0xD3, 0x8C, 0x4D, 0xE2, 0xCD,
-      0x5B, 0x83, 0xD2, 0xA0, 0x6F, 0xAA, 0x05, 0x19, 0x35, 0xF6}},
-    // C=US, O=Equifax, OU=Equifax Secure Certificate Authority
-    {{0x08, 0x29, 0x7A, 0x40, 0x47, 0xDB, 0xA2, 0x36, 0x80, 0xC7, 0x31,
-      0xDB, 0x6E, 0x31, 0x76, 0x53, 0xCA, 0x78, 0x48, 0xE1, 0xBE, 0xBD,
-      0x3A, 0x0B, 0x01, 0x79, 0xA7, 0x07, 0xF9, 0x2C, 0xF1, 0x78}},
-    // C=US, O=AffirmTrust, CN=AffirmTrust Networking
-    {{0x0A, 0x81, 0xEC, 0x5A, 0x92, 0x97, 0x77, 0xF1, 0x45, 0x90, 0x4A,
-      0xF3, 0x8D, 0x5D, 0x50, 0x9F, 0x66, 0xB5, 0xE2, 0xC5, 0x8F, 0xCD,
-      0xB5, 0x31, 0x05, 0x8B, 0x0E, 0x17, 0xF3, 0xF0, 0xB4, 0x1B}},
-    // C=HU, L=Budapest, O=NetLock Halozatbiztonsagi Kft., OU=Tanusitvanykiadok,
-    // CN=NetLock Expressz (Class C) Tanusitvanykiado
-    {{0x0B, 0x5E, 0xED, 0x4E, 0x84, 0x64, 0x03, 0xCF, 0x55, 0xE0, 0x65,
-      0x84, 0x84, 0x40, 0xED, 0x2A, 0x82, 0x75, 0x8B, 0xF5, 0xB9, 0xAA,
-      0x1F, 0x25, 0x3D, 0x46, 0x13, 0xCF, 0xA0, 0x80, 0xFF, 0x3F}},
-    // C=LT, O=Skaitmeninio sertifikavimo centras, OU=Certification Authority,
-    // CN=SSC Root CA B
-    {{0x0B, 0x9F, 0x26, 0xDF, 0xCA, 0x68, 0x4C, 0x2C, 0xFC, 0xE2, 0x3E,
-      0x4E, 0x4D, 0xD5, 0x67, 0xC8, 0x86, 0xBA, 0x25, 0x9E, 0x1D, 0xB2,
-      0x67, 0xF9, 0x80, 0x6F, 0x0C, 0x5A, 0x09, 0x97, 0x11, 0xF2}},
-    // C=EU, O=AC Camerfirma SA CIF A82743287, OU=http://www.chambersign.org,
-    // CN=Chambers of Commerce Root
-    {{0x0C, 0x25, 0x8A, 0x12, 0xA5, 0x67, 0x4A, 0xEF, 0x25, 0xF2, 0x8B,
-      0xA7, 0xDC, 0xFA, 0xEC, 0xEE, 0xA3, 0x48, 0xE5, 0x41, 0xE6, 0xF5,
-      0xCC, 0x4E, 0xE6, 0x3B, 0x71, 0xB3, 0x61, 0x60, 0x6A, 0xC3}},
-    // C=GB, ST=Greater Manchester, L=Salford, O=COMODO CA Limited, CN=COMODO
-    // Certification Authority
-    {{0x0C, 0x2C, 0xD6, 0x3D, 0xF7, 0x80, 0x6F, 0xA3, 0x99, 0xED, 0xE8,
-      0x09, 0x11, 0x6B, 0x57, 0x5B, 0xF8, 0x79, 0x89, 0xF0, 0x65, 0x18,
-      0xF9, 0x80, 0x8C, 0x86, 0x05, 0x03, 0x17, 0x8B, 0xAF, 0x66}},
-    // C=NL, O=DigiNotar, CN=DigiNotar Root CA/emailAddress=info@diginotar.nl
-    {{0x0D, 0x13, 0x6E, 0x43, 0x9F, 0x0A, 0xB6, 0xE9, 0x7F, 0x3A, 0x02,
-      0xA5, 0x40, 0xDA, 0x9F, 0x06, 0x41, 0xAA, 0x55, 0x4E, 0x1D, 0x66,
-      0xEA, 0x51, 0xAE, 0x29, 0x20, 0xD5, 0x1B, 0x2F, 0x72, 0x17}},
-    // CN=Autoridad de Certificacion Raiz del Estado Venezolano, C=VE,
-    // L=Caracas, ST=Distrito Capital, O=Sistema Nacional de Certificacion
-    // Electronica, OU=Superintendencia de Servicios de Certificacion
-    // Electronica/emailAddress=acraiz@suscerte.gob.ve
-    {{0x0E, 0x88, 0xEB, 0x6E, 0xA2, 0x56, 0xE1, 0x9E, 0xF8, 0xD3, 0xAB,
-      0xD6, 0x1A, 0x24, 0xD3, 0x8D, 0xBA, 0xD6, 0x32, 0x81, 0x6D, 0xD9,
-      0x57, 0x29, 0x44, 0x27, 0xE4, 0x72, 0x4D, 0x81, 0xA3, 0x86}},
-    // C=NO, O=Buypass AS-983163327, CN=Buypass Class 2 CA 1
-    {{0x0F, 0x4E, 0x9C, 0xDD, 0x26, 0x4B, 0x02, 0x55, 0x50, 0xD1, 0x70,
-      0x80, 0x63, 0x40, 0x21, 0x4F, 0xE9, 0x44, 0x34, 0xC9, 0xB0, 0x2F,
-      0x69, 0x7E, 0xC7, 0x10, 0xFC, 0x5F, 0xEA, 0xFB, 0x5E, 0x38}},
-    // C=FR, O=Certplus, CN=Class 2 Primary CA
-    {{0x0F, 0x99, 0x3C, 0x8A, 0xEF, 0x97, 0xBA, 0xAF, 0x56, 0x87, 0x14,
-      0x0E, 0xD5, 0x9A, 0xD1, 0x82, 0x1B, 0xB4, 0xAF, 0xAC, 0xF0, 0xAA,
-      0x9A, 0x58, 0xB5, 0xD5, 0x7A, 0x33, 0x8A, 0x3A, 0xFB, 0xCB}},
-    // C=JP, O=Japanese Government, OU=GPKI, CN=ApplicationCA2 Root
-    {{0x12, 0x6B, 0xF0, 0x1C, 0x10, 0x94, 0xD2, 0xF0, 0xCA, 0x2E, 0x35,
-      0x23, 0x80, 0xB3, 0xC7, 0x24, 0x29, 0x45, 0x46, 0xCC, 0xC6, 0x55,
-      0x97, 0xBE, 0xF7, 0xF1, 0x2D, 0x8A, 0x17, 0x1F, 0x19, 0x84}},
-    // C=si, O=state-institutions, OU=sigen-ca
-    {{0x12, 0xD4, 0x80, 0xC1, 0xA3, 0xC6, 0x64, 0x78, 0x1B, 0x99, 0xD9,
-      0xDF, 0x0E, 0x9F, 0xAF, 0x3F, 0x1C, 0xAC, 0xEE, 0x1B, 0x3C, 0x30,
-      0xC3, 0x12, 0x3A, 0x33, 0x7A, 0x4A, 0x45, 0x4F, 0xFE, 0xD2}},
-    // C=EU, L=Madrid (see current address at
-    // www.camerfirma.com/address)/serialNumber=A82743287, O=AC Camerfirma S.A.,
-    // CN=Global Chambersign Root - 2008
-    {{0x13, 0x63, 0x35, 0x43, 0x93, 0x34, 0xA7, 0x69, 0x80, 0x16, 0xA0,
-      0xD3, 0x24, 0xDE, 0x72, 0x28, 0x4E, 0x07, 0x9D, 0x7B, 0x52, 0x20,
-      0xBB, 0x8F, 0xBD, 0x74, 0x78, 0x16, 0xEE, 0xBE, 0xBA, 0xCA}},
-    // C=US, O=Starfield Technologies, Inc., OU=Starfield Class 2 Certification
-    // Authority
-    {{0x14, 0x65, 0xFA, 0x20, 0x53, 0x97, 0xB8, 0x76, 0xFA, 0xA6, 0xF0,
-      0xA9, 0x95, 0x8E, 0x55, 0x90, 0xE4, 0x0F, 0xCC, 0x7F, 0xAA, 0x4F,
-      0xB7, 0xC2, 0xC8, 0x67, 0x75, 0x21, 0xFB, 0x5F, 0xB6, 0x58}},
-    // CN=CAEDICOM Root, O=EDICOM, C=ES
-    {{0x15, 0x01, 0xF8, 0x9C, 0x5C, 0x4D, 0xCF, 0x36, 0xCF, 0x58, 0x8A,
-      0x17, 0xC9, 0xFD, 0x7C, 0xFC, 0xEB, 0x9E, 0xE0, 0x1E, 0x87, 0x29,
-      0xBE, 0x35, 0x5E, 0x25, 0xDE, 0x80, 0xEB, 0x62, 0x84, 0xB4}},
-    // C=FR, O=Certplus, CN=Certplus Root CA G1
-    {{0x15, 0x2A, 0x40, 0x2B, 0xFC, 0xDF, 0x2C, 0xD5, 0x48, 0x05, 0x4D,
-      0x22, 0x75, 0xB3, 0x9C, 0x7F, 0xCA, 0x3E, 0xC0, 0x97, 0x80, 0x78,
-      0xB0, 0xF0, 0xEA, 0x76, 0xE5, 0x61, 0xA6, 0xC7, 0x43, 0x3E}},
-    // C=es, O=Servicio de Certificacion del Colegio de Registradores (SCR),
-    // OU=Certificado Propio, OU=Certificado Raiz, CN=Certificado de la Clave
-    // Principal/street=Principe de Vergara 72 28006
-    // Madrid/emailAddress=scr@registradores.org
-    {{0x15, 0x94, 0xCB, 0x5B, 0x82, 0x6C, 0x31, 0x5D, 0xE3, 0xBC, 0x93,
-      0x2C, 0x56, 0x89, 0x5F, 0xF2, 0x3A, 0x3A, 0x98, 0x8B, 0x5D, 0xC1,
-      0xF0, 0x34, 0xD2, 0x14, 0xDF, 0xD8, 0x58, 0xD8, 0x9E, 0xE8}},
-    // C=US, O=Network Solutions L.L.C., CN=Network Solutions Certificate
-    // Authority
-    {{0x15, 0xF0, 0xBA, 0x00, 0xA3, 0xAC, 0x7A, 0xF3, 0xAC, 0x88, 0x4C,
-      0x07, 0x2B, 0x10, 0x11, 0xA0, 0x77, 0xBD, 0x77, 0xC0, 0x97, 0xF4,
-      0x01, 0x64, 0xB2, 0xF8, 0x59, 0x8A, 0xBD, 0x83, 0x86, 0x0C}},
-    // C=IE, O=Baltimore, OU=CyberTrust, CN=Baltimore CyberTrust Root
-    {{0x16, 0xAF, 0x57, 0xA9, 0xF6, 0x76, 0xB0, 0xAB, 0x12, 0x60, 0x95,
-      0xAA, 0x5E, 0xBA, 0xDE, 0xF2, 0x2A, 0xB3, 0x11, 0x19, 0xD6, 0x44,
-      0xAC, 0x95, 0xCD, 0x4B, 0x93, 0xDB, 0xF3, 0xF2, 0x6A, 0xEB}},
-    // C=GB, ST=Greater Manchester, L=Salford, O=COMODO CA Limited, CN=COMODO
-    // ECC Certification Authority
-    {{0x17, 0x93, 0x92, 0x7A, 0x06, 0x14, 0x54, 0x97, 0x89, 0xAD, 0xCE,
-      0x2F, 0x8F, 0x34, 0xF7, 0xF0, 0xB6, 0x6D, 0x0F, 0x3A, 0xE3, 0xA3,
-      0xB8, 0x4D, 0x21, 0xEC, 0x15, 0xDB, 0xBA, 0x4F, 0xAD, 0xC7}},
-    // OU=GlobalSign ECC Root CA - R5, O=GlobalSign, CN=GlobalSign
-    {{0x17, 0x9F, 0xBC, 0x14, 0x8A, 0x3D, 0xD0, 0x0F, 0xD2, 0x4E, 0xA1,
-      0x34, 0x58, 0xCC, 0x43, 0xBF, 0xA7, 0xF5, 0x9C, 0x81, 0x82, 0xD7,
-      0x83, 0xA5, 0x13, 0xF6, 0xEB, 0xEC, 0x10, 0x0C, 0x89, 0x24}},
-    // C=US, O=Amazon, CN=Amazon Root CA 3
-    {{0x18, 0xCE, 0x6C, 0xFE, 0x7B, 0xF1, 0x4E, 0x60, 0xB2, 0xE3, 0x47,
-      0xB8, 0xDF, 0xE8, 0x68, 0xCB, 0x31, 0xD0, 0x2E, 0xBB, 0x3A, 0xDA,
-      0x27, 0x15, 0x69, 0xF5, 0x03, 0x43, 0xB4, 0x6D, 0xB3, 0xA4}},
-    // C=BM, O=QuoVadis Limited, CN=QuoVadis Root CA 3
-    {{0x18, 0xF1, 0xFC, 0x7F, 0x20, 0x5D, 0xF8, 0xAD, 0xDD, 0xEB, 0x7F,
-      0xE0, 0x07, 0xDD, 0x57, 0xE3, 0xAF, 0x37, 0x5A, 0x9C, 0x4D, 0x8D,
-      0x73, 0x54, 0x6B, 0xF4, 0xF1, 0xFE, 0xD1, 0xE1, 0x8D, 0x35}},
-    // C=MY, O=Digicert Sdn. Bhd., CN=PosDigicert Class 2 Root CA G2
-    {{0x19, 0xAB, 0xCD, 0xFF, 0x3A, 0x74, 0x40, 0x2F, 0xA8, 0xF0, 0xCA,
-      0x20, 0x6B, 0xF7, 0xFA, 0xB0, 0xDF, 0xFF, 0xF3, 0xAE, 0x2B, 0xBD,
-      0x71, 0x95, 0x84, 0xD2, 0x10, 0x90, 0xA4, 0x35, 0x32, 0x07}},
-    // C=GB, ST=Greater Manchester, L=Salford, O=COMODO CA Limited, CN=COMODO
-    // Certification Authority
-    {{0x1A, 0x0D, 0x20, 0x44, 0x5D, 0xE5, 0xBA, 0x18, 0x62, 0xD1, 0x9E,
-      0xF8, 0x80, 0x85, 0x8C, 0xBC, 0xE5, 0x01, 0x02, 0xB3, 0x6E, 0x8F,
-      0x0A, 0x04, 0x0C, 0x3C, 0x69, 0xE7, 0x45, 0x22, 0xFE, 0x6E}},
-    // C=ZA, ST=Western Cape, L=Somerset West, O=South African Post Office
-    // Limited, OU=SAPO Trust Centre, CN=SAPO Class 3 Root
-    // CA/emailAddress=pkiadmin@trustcentre.co.za
-    {{0x1A, 0x25, 0x12, 0xCD, 0xA6, 0x74, 0x4A, 0xBE, 0xA1, 0x14, 0x32,
-      0xA2, 0xFD, 0xC9, 0xF8, 0xC0, 0x88, 0xDB, 0x5A, 0x98, 0xC8, 0x9E,
-      0x13, 0x35, 0x25, 0x74, 0xCD, 0xE4, 0xD9, 0xE8, 0x0C, 0xDD}},
-    // C=US, O=Amazon, CN=Amazon Root CA 2
-    {{0x1B, 0xA5, 0xB2, 0xAA, 0x8C, 0x65, 0x40, 0x1A, 0x82, 0x96, 0x01,
-      0x18, 0xF8, 0x0B, 0xEC, 0x4F, 0x62, 0x30, 0x4D, 0x83, 0xCE, 0xC4,
-      0x71, 0x3A, 0x19, 0xC3, 0x9C, 0x01, 0x1E, 0xA4, 0x6D, 0xB4}},
-    // C=CN, O=China Internet Network Information Center, CN=China Internet
-    // Network Information Center EV Certificates Root
-    {{0x1C, 0x01, 0xC6, 0xF4, 0xDB, 0xB2, 0xFE, 0xFC, 0x22, 0x55, 0x8B,
-      0x2B, 0xCA, 0x32, 0x56, 0x3F, 0x49, 0x84, 0x4A, 0xCF, 0xC3, 0x2B,
-      0x7B, 0xE4, 0xB0, 0xFF, 0x59, 0x9F, 0x9E, 0x8C, 0x7A, 0xF7}},
-    // C=TN, O=ANCE, OU=Certification & PKI, CN=Agence Nationale de
-    // Certification Electronique/emailAddress=ance@certification.tn
-    {{0x1D, 0x4F, 0x05, 0x96, 0xFC, 0xA2, 0x61, 0x1D, 0x09, 0xF8, 0x4C,
-      0x78, 0xF2, 0xEA, 0x56, 0x5E, 0xF2, 0xEA, 0xB9, 0xCF, 0xC2, 0x72,
-      0xA1, 0x71, 0x8B, 0xD3, 0x36, 0xE6, 0xE0, 0xAE, 0x02, 0x1A}},
-    // C=FR, O=ANSSI, OU=0002 130007669, CN=IGC/A AC racine Etat francais
-    {{0x1E, 0x1A, 0x69, 0x84, 0xB4, 0xE7, 0x6B, 0xD7, 0x09, 0xAE, 0xE3,
-      0xE9, 0xC9, 0xCF, 0x31, 0x18, 0xEA, 0xC0, 0x96, 0xDA, 0xB9, 0xCC,
-      0x20, 0xDC, 0x25, 0xFA, 0xAB, 0x67, 0x29, 0x7E, 0x96, 0x5A}},
-    // C=CH, O=SwissSign AG, CN=SwissSign Silver Root CA - G3
-    {{0x1E, 0x49, 0xAC, 0x5D, 0xC6, 0x9E, 0x86, 0xD0, 0x56, 0x5D, 0xA2,
-      0xC1, 0x30, 0x5C, 0x41, 0x93, 0x30, 0xB0, 0xB7, 0x81, 0xBF, 0xEC,
-      0x50, 0xE5, 0x4A, 0x1B, 0x35, 0xAF, 0x7F, 0xDD, 0xD5, 0x01}},
-    // C=TW, O=Chunghwa Telecom Co., Ltd., CN=ePKI Root Certification Authority
-    // - G2
-    {{0x1E, 0x51, 0x94, 0x2B, 0x84, 0xFD, 0x46, 0x7B, 0xF7, 0x7D, 0x1C,
-      0x89, 0xDA, 0x24, 0x1C, 0x04, 0x25, 0x4D, 0xC8, 0xF3, 0xEF, 0x4C,
-      0x22, 0x45, 0x1F, 0xE7, 0xA8, 0x99, 0x78, 0xBD, 0xCD, 0x4F}},
-    // C=AU, O=GOV, OU=DoD, OU=PKI, OU=CAs, CN=Australian Defence Public Root CA
-    {{0x20, 0x9E, 0x95, 0x6A, 0xF0, 0x4D, 0xF3, 0x99, 0x65, 0x07, 0xC8,
-      0x87, 0xD3, 0x56, 0x23, 0x0D, 0x6E, 0xB4, 0x9F, 0xDB, 0xDD, 0x2D,
-      0x8A, 0x05, 0x8F, 0xF5, 0x0B, 0x8F, 0x80, 0xF6, 0x90, 0xAA}},
-    // C=US, ST=FL, L=Jacksonville, O=Network Solutions L.L.C., CN=Network
-    // Solutions ECC Certificate Authority
-    {{0x21, 0x93, 0xCF, 0xEA, 0x38, 0x12, 0x11, 0xA1, 0xAE, 0xAA, 0x2D,
-      0xE9, 0x84, 0xE6, 0x30, 0x64, 0x3A, 0x87, 0x16, 0x0B, 0x12, 0x08,
-      0x11, 0x81, 0x45, 0xEA, 0xFB, 0x8E, 0x1B, 0xC6, 0x99, 0x58}},
-    // C=ch, O=Swisscom, OU=Digital Certificate Services, CN=Swisscom Root CA 1
-    {{0x21, 0xDB, 0x20, 0x12, 0x36, 0x60, 0xBB, 0x2E, 0xD4, 0x18, 0x20,
-      0x5D, 0xA1, 0x1E, 0xE7, 0xA8, 0x5A, 0x65, 0xE2, 0xBC, 0x6E, 0x55,
-      0xB5, 0xAF, 0x7E, 0x78, 0x99, 0xC8, 0xA2, 0x66, 0xD9, 0x2E}},
-    // C=US, O=Cisco Systems, CN=Cisco RXC-R2
-    {{0x22, 0x9C, 0xCC, 0x19, 0x6D, 0x32, 0xC9, 0x84, 0x21, 0xCC, 0x11,
-      0x9E, 0x78, 0x48, 0x6E, 0xEB, 0xEF, 0x60, 0x3A, 0xEC, 0xD5, 0x25,
-      0xC6, 0xB8, 0x8B, 0x47, 0xAB, 0xB7, 0x40, 0x69, 0x2B, 0x96}},
-    // C=US, ST=Texas, L=Houston, O=SSL Corporation, CN=SSL.com EV Root
-    // Certification Authority ECC
-    {{0x22, 0xA2, 0xC1, 0xF7, 0xBD, 0xED, 0x70, 0x4C, 0xC1, 0xE7, 0x01,
-      0xB5, 0xF4, 0x08, 0xC3, 0x10, 0x88, 0x0F, 0xE9, 0x56, 0xB5, 0xDE,
-      0x2A, 0x4A, 0x44, 0xF9, 0x9C, 0x87, 0x3A, 0x25, 0xA7, 0xC8}},
-    // C=US, O=Digital Signature Trust Co., OU=DST-Entrust GTI CA
-    {{0x22, 0xE0, 0xD1, 0x1D, 0xC9, 0x20, 0x7E, 0x16, 0xC9, 0x2B, 0x2E,
-      0xE1, 0x8C, 0xFD, 0xB2, 0xC2, 0xE9, 0x40, 0x62, 0x68, 0x47, 0x92,
-      0x1F, 0xC5, 0x28, 0xCE, 0xDD, 0x2F, 0x79, 0x32, 0xF7, 0x14}},
-    // C=ES, O=IZENPE S.A., CN=Izenpe.com
-    {{0x23, 0x80, 0x42, 0x03, 0xCA, 0x45, 0xD8, 0xCD, 0xE7, 0x16, 0xB8,
-      0xC1, 0x3B, 0xF3, 0xB4, 0x48, 0x45, 0x7F, 0xA0, 0x6C, 0xC1, 0x02,
-      0x50, 0x99, 0x7F, 0xA0, 0x14, 0x58, 0x31, 0x7C, 0x41, 0xE5}},
-    // C=US, O=VeriSign, Inc., OU=VeriSign Trust Network, OU=(c) 2008 VeriSign,
-    // Inc. - For authorized use only, CN=VeriSign Universal Root Certification
-    // Authority
-    {{0x23, 0x99, 0x56, 0x11, 0x27, 0xA5, 0x71, 0x25, 0xDE, 0x8C, 0xEF,
-      0xEA, 0x61, 0x0D, 0xDF, 0x2F, 0xA0, 0x78, 0xB5, 0xC8, 0x06, 0x7F,
-      0x4E, 0x82, 0x82, 0x90, 0xBF, 0xB8, 0x60, 0xE8, 0x4B, 0x3C}},
-    // C=JP, O=SECOM Trust Systems CO.,LTD., CN=Security Communication RootCA3
-    {{0x24, 0xA5, 0x5C, 0x2A, 0xB0, 0x51, 0x44, 0x2D, 0x06, 0x17, 0x76,
-      0x65, 0x41, 0x23, 0x9A, 0x4A, 0xD0, 0x32, 0xD7, 0xC5, 0x51, 0x75,
-      0xAA, 0x34, 0xFF, 0xDE, 0x2F, 0xBC, 0x4F, 0x5C, 0x52, 0x94}},
-    // C=US, ST=Utah, L=Salt Lake City, O=Xcert EZ by DST, CN=Xcert EZ by
-    // DST/emailAddress=ca@digsigtrust.com
-    {{0x26, 0x02, 0xD2, 0x1E, 0x81, 0x27, 0x7A, 0x83, 0xF6, 0x04, 0x81,
-      0x28, 0xF6, 0x1D, 0x79, 0x4A, 0x06, 0xF4, 0x74, 0xE1, 0xF7, 0x5E,
-      0x49, 0x74, 0x0A, 0x81, 0x7C, 0x26, 0x66, 0xF6, 0x22, 0x11}},
-    // CN=ComSign Global Root CA, O=ComSign Ltd., C=IL
-    {{0x26, 0x05, 0x87, 0x5A, 0xFC, 0xC1, 0x76, 0xB2, 0xD6, 0x6D, 0xD6,
-      0x6A, 0x99, 0x5D, 0x7F, 0x8D, 0x5E, 0xBB, 0x86, 0xCE, 0x12, 0x0D,
-      0x0E, 0x7E, 0x9E, 0x7C, 0x6E, 0xF2, 0x94, 0xA2, 0x7D, 0x4C}},
-    // C=FR, O=OpenTrust, CN=OpenTrust Root CA G2
-    {{0x27, 0x99, 0x58, 0x29, 0xFE, 0x6A, 0x75, 0x15, 0xC1, 0xBF, 0xE8,
-      0x48, 0xF9, 0xC4, 0x76, 0x1D, 0xB1, 0x6C, 0x22, 0x59, 0x29, 0x25,
-      0x7B, 0xF4, 0x0D, 0x08, 0x94, 0xF2, 0x9E, 0xA8, 0xBA, 0xF2}},
-    // C=DE, O=TC TrustCenter GmbH, OU=TC TrustCenter Universal CA, CN=TC
-    // TrustCenter Universal CA II
-    {{0x28, 0x34, 0x99, 0x1C, 0xF6, 0x77, 0x46, 0x6D, 0x22, 0xBA, 0xAC,
-      0x3B, 0x00, 0x55, 0xE5, 0xB9, 0x11, 0xD9, 0xA9, 0xE5, 0x5F, 0x5B,
-      0x85, 0xBA, 0x02, 0xDC, 0x56, 0x67, 0x82, 0xC3, 0x0E, 0x8A}},
-    // C=US, O=RSA Data Security, Inc., OU=Secure Server Certification Authority
-    {{0x29, 0x30, 0xBD, 0x09, 0xA0, 0x71, 0x26, 0xBD, 0xC1, 0x72, 0x88,
-      0xD4, 0xF2, 0xAD, 0x84, 0x64, 0x5E, 0xC9, 0x48, 0x60, 0x79, 0x07,
-      0xA9, 0x7B, 0x5E, 0xD0, 0xB0, 0xB0, 0x58, 0x79, 0xEF, 0x69}},
-    // C=NL, O=DigiNotar, CN=DigiNotar Root CA G2/emailAddress=info@diginotar.nl
-    {{0x29, 0x4F, 0x55, 0xEF, 0x3B, 0xD7, 0x24, 0x4C, 0x6F, 0xF8, 0xA6,
-      0x8A, 0xB7, 0x97, 0xE9, 0x18, 0x6E, 0xC2, 0x75, 0x82, 0x75, 0x1A,
-      0x79, 0x15, 0x15, 0xE3, 0x29, 0x2E, 0x48, 0x37, 0x2D, 0x61}},
-    // C=TH, O=Electronic Transactions Development Agency (Public Organization),
-    // OU=Thailand National Root Certification Authority, CN=Thailand National
-    // Root Certification Authority - G1
-    {{0x2A, 0x8D, 0xA2, 0xF8, 0xD2, 0x3E, 0x0C, 0xD3, 0xB5, 0x87, 0x1E,
-      0xCF, 0xB0, 0xF4, 0x22, 0x76, 0xCA, 0x73, 0x23, 0x06, 0x67, 0xF4,
-      0x74, 0xEE, 0xDE, 0x71, 0xC5, 0xEE, 0x32, 0xCC, 0x3E, 0xC6}},
-    // C=FR, O=Certinomis, OU=0002 433998903, CN=Certinomis - Root CA
-    {{0x2A, 0x99, 0xF5, 0xBC, 0x11, 0x74, 0xB7, 0x3C, 0xBB, 0x1D, 0x62,
-      0x08, 0x84, 0xE0, 0x1C, 0x34, 0xE5, 0x1C, 0xCB, 0x39, 0x78, 0xDA,
-      0x12, 0x5F, 0x0E, 0x33, 0x26, 0x88, 0x83, 0xBF, 0x41, 0x58}},
-    // C=US, ST=Arizona, L=Scottsdale, O=Starfield Technologies, Inc.,
-    // CN=Starfield Root Certificate Authority - G2
-    {{0x2C, 0xE1, 0xCB, 0x0B, 0xF9, 0xD2, 0xF9, 0xE1, 0x02, 0x99, 0x3F,
-      0xBE, 0x21, 0x51, 0x52, 0xC3, 0xB2, 0xDD, 0x0C, 0xAB, 0xDE, 0x1C,
-      0x68, 0xE5, 0x31, 0x9B, 0x83, 0x91, 0x54, 0xDB, 0xB7, 0xF5}},
-    // C=JP, O=Japanese Government, OU=ApplicationCA
-    {{0x2D, 0x47, 0x43, 0x7D, 0xE1, 0x79, 0x51, 0x21, 0x5A, 0x12, 0xF3,
-      0xC5, 0x8E, 0x51, 0xC7, 0x29, 0xA5, 0x80, 0x26, 0xEF, 0x1F, 0xCC,
-      0x0A, 0x5F, 0xB3, 0xD9, 0xDC, 0x01, 0x2F, 0x60, 0x0D, 0x19}},
-    // C=IN, O=India PKI, CN=CCA India 2011
-    {{0x2D, 0x66, 0xA7, 0x02, 0xAE, 0x81, 0xBA, 0x03, 0xAF, 0x8C, 0xFF,
-      0x55, 0xAB, 0x31, 0x8A, 0xFA, 0x91, 0x90, 0x39, 0xD9, 0xF3, 0x1B,
-      0x4D, 0x64, 0x38, 0x86, 0x80, 0xF8, 0x13, 0x11, 0xB6, 0x5A}},
-    // C=AT, ST=Austria, L=Vienna, O=ARGE DATEN - Austrian Society for Data
-    // Protection, OU=A-CERT Certification Service, CN=A-CERT
-    // ADVANCED/emailAddress=info@a-cert.at
-    {{0x2D, 0xC6, 0x2C, 0x3F, 0x6C, 0x0C, 0xC9, 0x02, 0x0B, 0xBA, 0x77,
-      0xE1, 0xC5, 0x11, 0x51, 0x10, 0x24, 0xB9, 0x43, 0xEE, 0x59, 0x88,
-      0x56, 0xDA, 0x5A, 0x22, 0xE2, 0x22, 0xB7, 0x27, 0x7A, 0x20}},
-    // C=AT, O=A-Trust Ges. f. Sicherheitssysteme im elektr. Datenverkehr GmbH,
-    // OU=A-Trust-Root-05, CN=A-Trust-Root-05
-    {{0x2D, 0xDE, 0x9D, 0x0C, 0x0A, 0x90, 0xE7, 0xB3, 0x2B, 0x5A, 0xBC,
-      0x01, 0xF4, 0x17, 0x99, 0xD4, 0x2E, 0x95, 0xA1, 0xE3, 0xC3, 0x1C,
-      0x3B, 0x39, 0x37, 0x3B, 0xB8, 0x14, 0x1E, 0xA5, 0x44, 0x71}},
-    // C=US, O=GTE Corporation, OU=GTE CyberTrust Solutions, Inc., CN=GTE
-    // CyberTrust Root
-    {{0x2D, 0xFC, 0xBA, 0xCA, 0xDF, 0x22, 0xA6, 0xFF, 0x10, 0x7A, 0x51,
-      0xFD, 0x3E, 0x8B, 0x9E, 0x17, 0x85, 0x80, 0x28, 0x87, 0x9B, 0x13,
-      0xF7, 0xC3, 0xB5, 0x7B, 0x3E, 0x1B, 0xD2, 0x31, 0x58, 0x09}},
-    // C=US, O=Equifax Secure, OU=Equifax Secure eBusiness CA-2
-    {{0x2F, 0x27, 0x4E, 0x48, 0xAB, 0xA4, 0xAC, 0x7B, 0x76, 0x59, 0x33,
-      0x10, 0x17, 0x75, 0x50, 0x6D, 0xC3, 0x0E, 0xE3, 0x8E, 0xF6, 0xAC,
-      0xD5, 0xC0, 0x49, 0x32, 0xCF, 0xE0, 0x41, 0x23, 0x42, 0x20}},
-    // C=DE, O=TC TrustCenter GmbH, OU=TC TrustCenter Universal CA, CN=TC
-    // TrustCenter Universal CA III
-    {{0x30, 0x9B, 0x4A, 0x87, 0xF6, 0xCA, 0x56, 0xC9, 0x31, 0x69, 0xAA,
-      0xA9, 0x9C, 0x6D, 0x98, 0x88, 0x54, 0xD7, 0x89, 0x2B, 0xD5, 0x43,
-      0x7E, 0x2D, 0x07, 0xB2, 0x9C, 0xBE, 0xDA, 0x55, 0xD3, 0x5D}},
-    // C=US, O=IdenTrust, CN=IdenTrust Public Sector Root CA 1
-    {{0x30, 0xD0, 0x89, 0x5A, 0x9A, 0x44, 0x8A, 0x26, 0x20, 0x91, 0x63,
-      0x55, 0x22, 0xD1, 0xF5, 0x20, 0x10, 0xB5, 0x86, 0x7A, 0xCA, 0xE1,
-      0x2C, 0x78, 0xEF, 0x95, 0x8F, 0xD4, 0xF4, 0x38, 0x9F, 0x2F}},
-    // C=US, O=DigiCert Inc, OU=www.digicert.com, CN=DigiCert Global Root G3
-    {{0x31, 0xAD, 0x66, 0x48, 0xF8, 0x10, 0x41, 0x38, 0xC7, 0x38, 0xF3,
-      0x9E, 0xA4, 0x32, 0x01, 0x33, 0x39, 0x3E, 0x3A, 0x18, 0xCC, 0x02,
-      0x29, 0x6E, 0xF9, 0x7C, 0x2A, 0xC9, 0xEF, 0x67, 0x31, 0xD0}},
-    // C=BR, ST=Rio de Janeiro, L=Rio de Janeiro, O=Certisign Certificadora
-    // Digital Ltda., OU=Certisign Autoridade Certificadora AC3S
-    {{0x31, 0xEA, 0xCE, 0x9B, 0x4C, 0x9C, 0x71, 0x73, 0x4A, 0x18, 0x56,
-      0x80, 0xBC, 0x24, 0x86, 0x6C, 0xA6, 0xCB, 0xD8, 0x2B, 0x3C, 0xB6,
-      0x1B, 0xCC, 0x87, 0x06, 0x26, 0x1B, 0x59, 0xCE, 0x10, 0x73}},
-    // C=DE, O=TC TrustCenter GmbH, OU=TC TrustCenter Class 4 CA, CN=TC
-    // TrustCenter Class 4 CA II
-    {{0x32, 0x66, 0x96, 0x7E, 0x59, 0xCD, 0x68, 0x00, 0x8D, 0x9D, 0xD3,
-      0x20, 0x81, 0x11, 0x85, 0xC7, 0x04, 0x20, 0x5E, 0x8D, 0x95, 0xFD,
-      0xD8, 0x4F, 0x1C, 0x7B, 0x31, 0x1E, 0x67, 0x04, 0xFC, 0x32}},
-    // C=HU, L=Budapest, O=Microsec Ltd., OU=e-Szigno CA, CN=Microsec e-Szigno
-    // Root CA
-    {{0x32, 0x7A, 0x3D, 0x76, 0x1A, 0xBA, 0xDE, 0xA0, 0x34, 0xEB, 0x99,
-      0x84, 0x06, 0x27, 0x5C, 0xB1, 0xA4, 0x77, 0x6E, 0xFD, 0xAE, 0x2F,
-      0xDF, 0x6D, 0x01, 0x68, 0xEA, 0x1C, 0x4F, 0x55, 0x67, 0xD0}},
-    // C=US, ST=Texas, L=Houston, O=SSL Corporation, CN=SSL.com Root
-    // Certification Authority ECC
-    {{0x34, 0x17, 0xBB, 0x06, 0xCC, 0x60, 0x07, 0xDA, 0x1B, 0x96, 0x1C,
-      0x92, 0x0B, 0x8A, 0xB4, 0xCE, 0x3F, 0xAD, 0x82, 0x0E, 0x4A, 0xA3,
-      0x0B, 0x9A, 0xCB, 0xC4, 0xA7, 0x4E, 0xBD, 0xCE, 0xBC, 0x65}},
-    // C=SA, O=National Center for Digital Certification, OU=Saudi National Root
-    // CA
-    {{0x34, 0xBB, 0x34, 0xE1, 0x4F, 0xAE, 0xD0, 0xD3, 0x39, 0x2F, 0x2F,
-      0xC4, 0x41, 0xC0, 0xEC, 0xD5, 0xFD, 0x88, 0xAD, 0x88, 0x11, 0x8D,
-      0xF2, 0xD1, 0xBA, 0x76, 0xCD, 0xEC, 0x1E, 0xEA, 0x10, 0xB8}},
-    // CN=EBG Elektronik Sertifika Hizmet
-    // Sa\xC4\x9Flay\xC4\xB1c\xC4\xB1s\xC4\xB1, O=EBG Bili\xC5\x9Fim
-    // Teknolojileri ve Hizmetleri A.\xC5\x9E., C=TR
-    {{0x35, 0xAE, 0x5B, 0xDD, 0xD8, 0xF7, 0xAE, 0x63, 0x5C, 0xFF, 0xBA,
-      0x56, 0x82, 0xA8, 0xF0, 0x0B, 0x95, 0xF4, 0x84, 0x62, 0xC7, 0x10,
-      0x8E, 0xE9, 0xA0, 0xE5, 0x29, 0x2B, 0x07, 0x4A, 0xAF, 0xB2}},
-    // C=ES, O=Agencia Notarial de Certificacion S.L. Unipersonal - CIF
-    // B83395988, CN=ANCERT Corporaciones de Derecho Publico
-    {{0x36, 0x54, 0x4D, 0x2F, 0xCE, 0x03, 0xC6, 0xC7, 0x2B, 0x70, 0xEB,
-      0x1A, 0x80, 0x64, 0x26, 0x4D, 0xC1, 0x51, 0x17, 0x68, 0xC2, 0xD8,
-      0xF7, 0x6A, 0x8B, 0x9F, 0x1F, 0x2B, 0xBD, 0x15, 0x3B, 0x7D}},
-    // C=US, O=GeoTrust Inc., CN=GeoTrust Primary Certification Authority
-    {{0x37, 0xD5, 0x10, 0x06, 0xC5, 0x12, 0xEA, 0xAB, 0x62, 0x64, 0x21,
-      0xF1, 0xEC, 0x8C, 0x92, 0x01, 0x3F, 0xC5, 0xF8, 0x2A, 0xE9, 0x8E,
-      0xE5, 0x33, 0xEB, 0x46, 0x19, 0xB8, 0xDE, 0xB4, 0xD0, 0x6C}},
-    // C=HU, L=Budapest, O=NetLock Halozatbiztonsagi Kft., OU=Tanusitvanykiadok,
-    // CN=NetLock Uzleti (Class B) Tanusitvanykiado
-    {{0x39, 0xDF, 0x7B, 0x68, 0x2B, 0x7B, 0x93, 0x8F, 0x84, 0x71, 0x54,
-      0x81, 0xCC, 0xDE, 0x8D, 0x60, 0xD8, 0xF2, 0x2E, 0xC5, 0x98, 0x87,
-      0x7D, 0x0A, 0xAA, 0xC1, 0x2B, 0x59, 0x18, 0x2B, 0x03, 0x12}},
-    // C=IE, O=An Post, OU=Post.Trust Ltd., CN=Post.Trust Root CA
-    {{0x39, 0xF6, 0x03, 0x3C, 0xA6, 0x64, 0xCE, 0xDB, 0x21, 0x67, 0x44,
-      0xD3, 0xC6, 0xF2, 0xB2, 0xE8, 0xE3, 0xCE, 0xBD, 0x68, 0x69, 0xF7,
-      0xDF, 0xF4, 0x7E, 0x0D, 0xB9, 0x1A, 0x79, 0xC4, 0x16, 0xF8}},
-    // C=CH, O=SwissSign AG, CN=SwissSign Platinum CA - G2
-    {{0x3B, 0x22, 0x2E, 0x56, 0x67, 0x11, 0xE9, 0x92, 0x30, 0x0D, 0xC0,
-      0xB1, 0x5A, 0xB9, 0x47, 0x3D, 0xAF, 0xDE, 0xF8, 0xC8, 0x4D, 0x0C,
-      0xEF, 0x7D, 0x33, 0x17, 0xB4, 0xC1, 0x82, 0x1D, 0x14, 0x36}},
-    // C=NL, O=Staat der Nederlanden, CN=Staat der Nederlanden Root CA - G3
-    {{0x3C, 0x4F, 0xB0, 0xB9, 0x5A, 0xB8, 0xB3, 0x00, 0x32, 0xF4, 0x32,
-      0xB8, 0x6F, 0x53, 0x5F, 0xE1, 0x72, 0xC1, 0x85, 0xD0, 0xFD, 0x39,
-      0x86, 0x58, 0x37, 0xCF, 0x36, 0x18, 0x7F, 0xA6, 0xF4, 0x28}},
-    // C=HU, L=Budapest, O=Microsec Ltd., CN=Microsec e-Szigno Root CA
-    // 2009/emailAddress=info@e-szigno.hu
-    {{0x3C, 0x5F, 0x81, 0xFE, 0xA5, 0xFA, 0xB8, 0x2C, 0x64, 0xBF, 0xA2,
-      0xEA, 0xEC, 0xAF, 0xCD, 0xE8, 0xE0, 0x77, 0xFC, 0x86, 0x20, 0xA7,
-      0xCA, 0xE5, 0x37, 0x16, 0x3D, 0xF3, 0x6E, 0xDB, 0xF3, 0x78}},
-    // CN=ComSign Advanced Security CA
-    {{0x3C, 0xCC, 0x3C, 0xCF, 0xE4, 0x54, 0x96, 0xD0, 0x7B, 0x62, 0x0D,
-      0xBF, 0x13, 0x28, 0xE8, 0xA1, 0x49, 0x00, 0x18, 0xF4, 0x86, 0x33,
-      0xC8, 0xA2, 0x8A, 0x99, 0x5C, 0xA6, 0x04, 0x08, 0xB0, 0xBE}},
-    // C=AT, O=A-Trust Ges. f\xFCr Sicherheitssysteme im elektr. Datenverkehr
-    // GmbH, OU=A-Trust-Qual-01, CN=A-Trust-Qual-01
-    {{0x3D, 0xEA, 0xE6, 0xAE, 0x97, 0x52, 0x84, 0xE0, 0xE6, 0xFA, 0x2E,
-      0xB7, 0x6C, 0xE4, 0x6E, 0x12, 0x44, 0x18, 0x69, 0xA2, 0xA7, 0xD4,
-      0xE6, 0x7D, 0xC7, 0xAB, 0x86, 0x64, 0xFE, 0xFD, 0xBB, 0xB0}},
-    // C=EE, O=AS Sertifitseerimiskeskus, CN=EE Certification Centre Root
-    // CA/emailAddress=pki@sk.ee
-    {{0x3E, 0x84, 0xBA, 0x43, 0x42, 0x90, 0x85, 0x16, 0xE7, 0x75, 0x73,
-      0xC0, 0x99, 0x2F, 0x09, 0x79, 0xCA, 0x08, 0x4E, 0x46, 0x85, 0x68,
-      0x1F, 0xF1, 0x95, 0xCC, 0xBA, 0x8A, 0x22, 0x9B, 0x8A, 0x76}},
-    // C=US, O=DigiCert Inc, OU=www.digicert.com, CN=DigiCert Assured ID Root CA
-    {{0x3E, 0x90, 0x99, 0xB5, 0x01, 0x5E, 0x8F, 0x48, 0x6C, 0x00, 0xBC,
-      0xEA, 0x9D, 0x11, 0x1E, 0xE7, 0x21, 0xFA, 0xBA, 0x35, 0x5A, 0x89,
-      0xBC, 0xF1, 0xDF, 0x69, 0x56, 0x1E, 0x3D, 0xC6, 0x32, 0x5C}},
-    // C=GB, ST=Greater Manchester, L=Salford, O=Comodo CA Limited, CN=Trusted
-    // Certificate Services
-    {{0x3F, 0x06, 0xE5, 0x56, 0x81, 0xD4, 0x96, 0xF5, 0xBE, 0x16, 0x9E,
-      0xB5, 0x38, 0x9F, 0x9F, 0x2B, 0x8F, 0xF6, 0x1E, 0x17, 0x08, 0xDF,
-      0x68, 0x81, 0x72, 0x48, 0x49, 0xCD, 0x5D, 0x27, 0xCB, 0x69}},
-    // C=GB, O=Trustis Limited, OU=Trustis EVS Root CA
-    {{0x3F, 0x9D, 0xA4, 0x74, 0x4E, 0xC9, 0x67, 0x6C, 0xD3, 0x8B, 0x53,
-      0x0E, 0x50, 0x0A, 0x46, 0x3F, 0xBC, 0xB1, 0x81, 0x65, 0x97, 0x7F,
-      0xF0, 0xDA, 0x6D, 0x59, 0x93, 0xC3, 0xFE, 0x5F, 0xAB, 0x7C}},
-    // C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting cc,
-    // OU=Certification Services Division, CN=Thawte Premium Server
-    // CA/emailAddress=premium-server@thawte.com
-    {{0x3F, 0x9F, 0x27, 0xD5, 0x83, 0x20, 0x4B, 0x9E, 0x09, 0xC8, 0xA3,
-      0xD2, 0x06, 0x6C, 0x4B, 0x57, 0xD3, 0xA2, 0x47, 0x9C, 0x36, 0x93,
-      0x65, 0x08, 0x80, 0x50, 0x56, 0x98, 0x10, 0x5D, 0xBC, 0xE9}},
-    // C=KR, O=Government of Korea, OU=GPKI, CN=GPKIRootCA1
-    {{0x40, 0x7C, 0x27, 0x6B, 0xEA, 0xD2, 0xE4, 0xAF, 0x06, 0x61, 0xEF,
-      0x66, 0x97, 0x34, 0x1D, 0xEC, 0x0A, 0x1F, 0x94, 0x34, 0xE4, 0xEA,
-      0xFB, 0x2D, 0x3D, 0x32, 0xA9, 0x05, 0x49, 0xD9, 0xDE, 0x4A}},
-    // C=NL, O=Digidentity B.V., CN=Digidentity L3 Root CA - G2
-    {{0x41, 0x7D, 0xCF, 0x31, 0x80, 0xF4, 0xED, 0x1A, 0x37, 0x47, 0xAC,
-      0xF1, 0x17, 0x93, 0x16, 0xCD, 0x48, 0xCB, 0x05, 0xC5, 0x78, 0x84,
-      0x35, 0x16, 0x8A, 0xED, 0x98, 0xC9, 0x8C, 0xDC, 0xB6, 0x15}},
-    // C=CH, O=WISeKey, OU=Copyright (c) 2005, OU=OISTE Foundation Endorsed,
-    // CN=OISTE WISeKey Global Root GA CA
-    {{0x41, 0xC9, 0x23, 0x86, 0x6A, 0xB4, 0xCA, 0xD6, 0xB7, 0xAD, 0x57,
-      0x80, 0x81, 0x58, 0x2E, 0x02, 0x07, 0x97, 0xA6, 0xCB, 0xDF, 0x4F,
-      0xFF, 0x78, 0xCE, 0x83, 0x96, 0xB3, 0x89, 0x37, 0xD7, 0xF5}},
-    // C=US, O=SecureTrust Corporation, CN=Secure Global CA
-    {{0x42, 0x00, 0xF5, 0x04, 0x3A, 0xC8, 0x59, 0x0E, 0xBB, 0x52, 0x7D,
-      0x20, 0x9E, 0xD1, 0x50, 0x30, 0x29, 0xFB, 0xCB, 0xD4, 0x1C, 0xA1,
-      0xB5, 0x06, 0xEC, 0x27, 0xF1, 0x5A, 0xDE, 0x7D, 0xAC, 0x69}},
-    // C=FR, O=KEYNECTIS, OU=ROOT, CN=KEYNECTIS ROOT CA
-    {{0x42, 0x10, 0xF1, 0x99, 0x49, 0x9A, 0x9A, 0xC3, 0x3C, 0x8D, 0xE0,
-      0x2B, 0xA6, 0xDB, 0xAA, 0x14, 0x40, 0x8B, 0xDD, 0x8A, 0x6E, 0x32,
-      0x46, 0x89, 0xC1, 0x92, 0x2D, 0x06, 0x97, 0x15, 0xA3, 0x32}},
-    // C=FR, O=Certeurope, OU=0002 434202180, CN=Certeurope Root CA 2
-    {{0x42, 0x14, 0x3A, 0x51, 0x1A, 0x3A, 0xFC, 0xDD, 0x80, 0xD5, 0x55,
-      0xDE, 0xBB, 0x41, 0x91, 0xEC, 0x6B, 0xB2, 0x85, 0xEE, 0x66, 0xE6,
-      0x2E, 0xC6, 0x57, 0xED, 0x20, 0xAD, 0xF7, 0xD5, 0x5F, 0xAA}},
-    // C=US, O=DigiCert Inc, OU=www.digicert.com, CN=DigiCert Global Root CA
-    {{0x43, 0x48, 0xA0, 0xE9, 0x44, 0x4C, 0x78, 0xCB, 0x26, 0x5E, 0x05,
-      0x8D, 0x5E, 0x89, 0x44, 0xB4, 0xD8, 0x4F, 0x96, 0x62, 0xBD, 0x26,
-      0xDB, 0x25, 0x7F, 0x89, 0x34, 0xA4, 0x43, 0xC7, 0x01, 0x61}},
-    // C=US, O=Entrust, Inc., OU=See www.entrust.net/legal-terms, OU=(c) 2009
-    // Entrust, Inc. - for authorized use only, CN=Entrust Root Certification
-    // Authority - G2
-    {{0x43, 0xDF, 0x57, 0x74, 0xB0, 0x3E, 0x7F, 0xEF, 0x5F, 0xE4, 0x0D,
-      0x93, 0x1A, 0x7B, 0xED, 0xF1, 0xBB, 0x2E, 0x6B, 0x42, 0x73, 0x8C,
-      0x4E, 0x6D, 0x38, 0x41, 0x10, 0x3D, 0x3A, 0xA7, 0xF3, 0x39}},
-    // CN=T\xC3\x9CRKTRUST Elektronik Sertifika Hizmet
-    // Sa\xC4\x9Flay\xC4\xB1c\xC4\xB1s\xC4\xB1, C=TR, L=ANKARA, O=(c) 2005
-    // T\xC3\x9CRKTRUST Bilgi \xC4\xB0leti\xC5\x9Fim ve Bili\xC5\x9Fim
-    // G\xC3\xBCvenli\xC4\x9Fi Hizmetleri A.\xC5\x9E.
-    {{0x44, 0x04, 0xE3, 0x3B, 0x5E, 0x14, 0x0D, 0xCF, 0x99, 0x80, 0x51,
-      0xFD, 0xFC, 0x80, 0x28, 0xC7, 0xC8, 0x16, 0x15, 0xC5, 0xEE, 0x73,
-      0x7B, 0x11, 0x1B, 0x58, 0x82, 0x33, 0xA9, 0xB5, 0x35, 0xA0}},
-    // C=US, O=VeriSign, Inc., OU=Class 4 Public Primary Certification Authority
-    // - G2, OU=(c) 1998 VeriSign, Inc. - For authorized use only, OU=VeriSign
-    // Trust Network
-    {{0x44, 0x64, 0x0A, 0x0A, 0x0E, 0x4D, 0x00, 0x0F, 0xBD, 0x57, 0x4D,
-      0x2B, 0x8A, 0x07, 0xBD, 0xB4, 0xD1, 0xDF, 0xED, 0x3B, 0x45, 0xBA,
-      0xAB, 0xA7, 0x6F, 0x78, 0x57, 0x78, 0xC7, 0x01, 0x19, 0x61}},
-    // C=GR, L=Athens, O=Hellenic Academic and Research Institutions Cert.
-    // Authority, CN=Hellenic Academic and Research Institutions ECC RootCA 2015
-    {{0x44, 0xB5, 0x45, 0xAA, 0x8A, 0x25, 0xE6, 0x5A, 0x73, 0xCA, 0x15,
-      0xDC, 0x27, 0xFC, 0x36, 0xD2, 0x4C, 0x1C, 0xB9, 0x95, 0x3A, 0x06,
-      0x65, 0x39, 0xB1, 0x15, 0x82, 0xDC, 0x48, 0x7B, 0x48, 0x33}},
-    // C=US, ST=Arizona, L=Scottsdale, O=GoDaddy.com, Inc., CN=Go Daddy Root
-    // Certificate Authority - G2
-    {{0x45, 0x14, 0x0B, 0x32, 0x47, 0xEB, 0x9C, 0xC8, 0xC5, 0xB4, 0xF0,
-      0xD7, 0xB5, 0x30, 0x91, 0xF7, 0x32, 0x92, 0x08, 0x9E, 0x6E, 0x5A,
-      0x63, 0xE2, 0x74, 0x9D, 0xD3, 0xAC, 0xA9, 0x19, 0x8E, 0xDA}},
-    // C=UY, O=ADMINISTRACION NACIONAL DE CORREOS, OU=SERVICIOS ELECTRONICOS,
-    // CN=Correo Uruguayo - Root CA
-    {{0x46, 0x27, 0x32, 0x85, 0x61, 0x5D, 0x96, 0xE5, 0x2D, 0xA9, 0xFC,
-      0x2E, 0xD8, 0xC0, 0x36, 0xF1, 0x0A, 0xF3, 0xD9, 0xF6, 0x28, 0x0F,
-      0x8D, 0x28, 0x87, 0x06, 0xC5, 0x2B, 0x20, 0x11, 0xB4, 0xDA}},
-    // C=TR, L=Gebze - Kocaeli, O=Turkiye Bilimsel ve Teknolojik Arastirma
-    // Kurumu - TUBITAK, OU=Kamu Sertifikasyon Merkezi - Kamu SM, CN=TUBITAK
-    // Kamu SM SSL Kok Sertifikasi - Surum 1
-    {{0x46, 0xED, 0xC3, 0x68, 0x90, 0x46, 0xD5, 0x3A, 0x45, 0x3F, 0xB3,
-      0x10, 0x4A, 0xB8, 0x0D, 0xCA, 0xEC, 0x65, 0x8B, 0x26, 0x60, 0xEA,
-      0x16, 0x29, 0xDD, 0x7E, 0x86, 0x79, 0x90, 0x64, 0x87, 0x16}},
-    // C=PT, O=SCEE, CN=ECRaizEstado
-    {{0x48, 0x8E, 0x13, 0x4F, 0x30, 0xC5, 0xDB, 0x56, 0xB7, 0x64, 0x73,
-      0xE6, 0x08, 0x08, 0x68, 0x42, 0xBF, 0x21, 0xAF, 0x8A, 0xB3, 0xCD,
-      0x7A, 0xC6, 0x7E, 0xBD, 0xF1, 0x25, 0xD5, 0x31, 0x83, 0x4E}},
-    // C=PA, ST=Panama, L=Panama City, O=TrustCor Systems S. de R.L.,
-    // OU=TrustCor Certificate Authority, CN=TrustCor RootCert CA-1
-    {{0x48, 0x8F, 0xCA, 0x18, 0x9E, 0xAA, 0xDF, 0x54, 0xA3, 0xF9, 0x20,
-      0xED, 0x39, 0xE5, 0x87, 0x18, 0x3B, 0xA5, 0x12, 0x23, 0x29, 0x99,
-      0xFA, 0xE3, 0xE4, 0xA2, 0x85, 0xFE, 0x98, 0xE2, 0x98, 0xD1}},
-    // C=DK, O=TDC Internet, OU=TDC Internet Root CA
-    {{0x48, 0x98, 0xC6, 0x88, 0x8C, 0x0C, 0xFF, 0xB0, 0xD3, 0xE3, 0x1A,
-      0xCA, 0x8A, 0x37, 0xD4, 0xE3, 0x51, 0x5F, 0xF7, 0x46, 0xD0, 0x26,
-      0x35, 0xD8, 0x66, 0x46, 0xCF, 0xA0, 0xA3, 0x18, 0x5A, 0xE7}},
-    // C=TR, L=Ankara, O=T\xC3\x9CRKTRUST Bilgi \xC4\xB0leti\xC5\x9Fim ve
-    // Bili\xC5\x9Fim G\xC3\xBCvenli\xC4\x9Fi Hizmetleri A.\xC5\x9E.,
-    // CN=T\xC3\x9CRKTRUST Elektronik Sertifika Hizmet
-    // Sa\xC4\x9Flay\xC4\xB1c\xC4\xB1s\xC4\xB1 H5
-    {{0x49, 0x35, 0x1B, 0x90, 0x34, 0x44, 0xC1, 0x85, 0xCC, 0xDC, 0x5C,
-      0x69, 0x3D, 0x24, 0xD8, 0x55, 0x5C, 0xB2, 0x08, 0xD6, 0xA8, 0x14,
-      0x13, 0x07, 0x69, 0x9F, 0x4A, 0xF0, 0x63, 0x19, 0x9D, 0x78}},
-    // C=us, ST=Utah, L=Salt Lake City, O=Digital Signature Trust Co.,
-    // OU=National Retail Federation, CN=DST (NRF)
-    // RootCA/emailAddress=ca@digsigtrust.com
-    {{0x49, 0xC8, 0x17, 0x5A, 0x98, 0x15, 0xE0, 0x8B, 0xEF, 0x12, 0x9A,
-      0x92, 0x9D, 0xE1, 0xBA, 0xCA, 0xD0, 0x4E, 0x4D, 0xB6, 0x7A, 0x8C,
-      0x83, 0x92, 0x93, 0x95, 0x3E, 0x50, 0x31, 0xC8, 0x1C, 0xA0}},
-    // C=DE, O=D-Trust GmbH, CN=D-TRUST Root Class 3 CA 2 2009
-    {{0x49, 0xE7, 0xA4, 0x42, 0xAC, 0xF0, 0xEA, 0x62, 0x87, 0x05, 0x00,
-      0x54, 0xB5, 0x25, 0x64, 0xB6, 0x50, 0xE4, 0xF4, 0x9E, 0x42, 0xE3,
-      0x48, 0xD6, 0xAA, 0x38, 0xE0, 0x39, 0xE9, 0x57, 0xB1, 0xC1}},
-    // C=US, O=Digital Signature Trust Co., CN=Baltimore EZ by
-    // DST/mail=ca@digsigtrust.com
-    {{0x49, 0xF7, 0x4F, 0x82, 0x4F, 0x2E, 0x05, 0x9F, 0xE9, 0x9C, 0x98,
-      0xAF, 0x32, 0x19, 0xEC, 0x0D, 0x9A, 0x00, 0x4D, 0x1B, 0x64, 0xDD,
-      0x2F, 0xD1, 0x45, 0x26, 0x16, 0x31, 0x8A, 0xB8, 0x06, 0xC0}},
-    // C=US, O=thawte, Inc., OU=Certification Services Division, OU=(c) 2008
-    // thawte, Inc. - For authorized use only, CN=thawte Primary Root CA - G3
-    {{0x4B, 0x03, 0xF4, 0x58, 0x07, 0xAD, 0x70, 0xF2, 0x1B, 0xFC, 0x2C,
-      0xAE, 0x71, 0xC9, 0xFD, 0xE4, 0x60, 0x4C, 0x06, 0x4C, 0xF5, 0xFF,
-      0xB6, 0x86, 0xBA, 0xE5, 0xDB, 0xAA, 0xD7, 0xFD, 0xD3, 0x4C}},
-    // C=CN, O=WoSign CA Limited, CN=Certification Authority of WoSign
-    {{0x4B, 0x22, 0xD5, 0xA6, 0xAE, 0xC9, 0x9F, 0x3C, 0xDB, 0x79, 0xAA,
-      0x5E, 0xC0, 0x68, 0x38, 0x47, 0x9C, 0xD5, 0xEC, 0xBA, 0x71, 0x64,
-      0xF7, 0xF2, 0x2D, 0xC1, 0xD6, 0x5F, 0x63, 0xD8, 0x57, 0x08}},
-    // C=BR, O=Certisign Certificadora Digital Ltda., OU=Certisign - Autoridade
-    // Certificadora - AC4
-    {{0x4B, 0xDB, 0x74, 0x18, 0xBD, 0xF7, 0xFF, 0xE3, 0x3B, 0xA0, 0x88,
-      0x4A, 0xFA, 0x7C, 0x0C, 0x61, 0xFD, 0x85, 0xA1, 0x53, 0x97, 0x2F,
-      0x65, 0xF7, 0xD0, 0x1C, 0xB3, 0xEC, 0x7E, 0xB4, 0x07, 0x3C}},
-    // C=ES, O=Agencia Notarial de Certificacion S.L.U. - CIF B83395988,
-    // CN=ANCERT Certificados Notariales V2
-    {{0x4B, 0xE8, 0xB5, 0xA1, 0xC7, 0x6C, 0x6A, 0xEA, 0xD0, 0x61, 0x19,
-      0x18, 0xFC, 0xCF, 0x9D, 0xBD, 0x39, 0x8B, 0x67, 0xFB, 0x12, 0x29,
-      0x47, 0x58, 0xBD, 0xF9, 0x94, 0xD0, 0xF9, 0x68, 0x2F, 0x60}},
-    // C=NL, O=Staat der Nederlanden, CN=Staat der Nederlanden EV Root CA
-    {{0x4D, 0x24, 0x91, 0x41, 0x4C, 0xFE, 0x95, 0x67, 0x46, 0xEC, 0x4C,
-      0xEF, 0xA6, 0xCF, 0x6F, 0x72, 0xE2, 0x8A, 0x13, 0x29, 0x43, 0x2F,
-      0x9D, 0x8A, 0x90, 0x7A, 0xC4, 0xCB, 0x5D, 0xAD, 0xC1, 0x5A}},
-    // C=ES, O=FNMT-RCM, OU=AC RAIZ FNMT-RCM
-    {{0x4D, 0x9E, 0xBB, 0x28, 0x82, 0x5C, 0x96, 0x43, 0xAB, 0x15, 0xD5,
-      0x4E, 0x5F, 0x96, 0x14, 0xF1, 0x3C, 0xB3, 0xE9, 0x5D, 0xE3, 0xCF,
-      0x4E, 0xAC, 0x97, 0x13, 0x01, 0xF3, 0x20, 0xF9, 0x22, 0x6E}},
-    // C=AT, O=Telekom-Control-Kommission, CN=Telekom-Control-Kommission Top 1
-    {{0x4D, 0xBB, 0x01, 0x57, 0xA6, 0x91, 0xFA, 0x73, 0x82, 0x28, 0x9D,
-      0x65, 0xC0, 0x33, 0x2D, 0xDB, 0x1D, 0xCB, 0x64, 0x0B, 0x40, 0xAD,
-      0x10, 0xF0, 0x10, 0xA4, 0x3E, 0x20, 0xF3, 0xAF, 0xED, 0x1E}},
-    // C=AT, ST=Austria, L=Vienna, O=Arge Daten Oesterreichische Gesellschaft
-    // fuer Datenschutz/emailAddress=a-cert@argedaten.at
-    {{0x4E, 0x74, 0x80, 0xAD, 0x70, 0x2A, 0x37, 0x9D, 0xC5, 0x89, 0xAD,
-      0xB4, 0xFA, 0xA6, 0x25, 0xE6, 0xA5, 0x99, 0x3F, 0x87, 0xEF, 0x23,
-      0x75, 0xD5, 0x43, 0x7F, 0xFE, 0x3B, 0x79, 0xBE, 0x4E, 0x96}},
-    // C=US, ST=New Jersey, L=Jersey City, O=The USERTRUST Network, CN=USERTrust
-    // ECC Certification Authority
-    {{0x4F, 0xF4, 0x60, 0xD5, 0x4B, 0x9C, 0x86, 0xDA, 0xBF, 0xBC, 0xFC,
-      0x57, 0x12, 0xE0, 0x40, 0x0D, 0x2B, 0xED, 0x3F, 0xBC, 0x4D, 0x4F,
-      0xBD, 0xAA, 0x86, 0xE0, 0x6A, 0xDC, 0xD2, 0xA9, 0xAD, 0x7A}},
-    // CN=ComSign Secured CA, O=ComSign, C=IL
-    {{0x50, 0x79, 0x41, 0xC7, 0x44, 0x60, 0xA0, 0xB4, 0x70, 0x86, 0x22,
-      0x0D, 0x4E, 0x99, 0x32, 0x57, 0x2A, 0xB5, 0xD1, 0xB5, 0xBB, 0xCB,
-      0x89, 0x80, 0xAB, 0x1C, 0xB1, 0x76, 0x51, 0xA8, 0x44, 0xD2}},
-    // C=JP, O=SECOM Trust Systems CO.,LTD., OU=Security Communication RootCA2
-    {{0x51, 0x3B, 0x2C, 0xEC, 0xB8, 0x10, 0xD4, 0xCD, 0xE5, 0xDD, 0x85,
-      0x39, 0x1A, 0xDF, 0xC6, 0xC2, 0xDD, 0x60, 0xD8, 0x7B, 0xB7, 0x36,
-      0xD2, 0xB5, 0x21, 0x48, 0x4A, 0xA4, 0x7A, 0x0E, 0xBE, 0xF6}},
-    // O=eSign Australia, OU=Public Secure Services, CN=eSign Imperito Primary
-    // Root CA
-    {{0x52, 0x7A, 0x42, 0x26, 0x7D, 0xAE, 0xA8, 0xD8, 0xF5, 0x4E, 0x91,
-      0xD2, 0x82, 0xD5, 0xC2, 0x5B, 0x61, 0x5B, 0xC0, 0xDC, 0x73, 0xDC,
-      0x63, 0xA5, 0x8F, 0x91, 0x6C, 0x4E, 0xD5, 0xBF, 0x59, 0xAC}},
-    // C=US, O=GTE Corporation, CN=GTE CyberTrust Root
-    {{0x52, 0x7B, 0x05, 0x05, 0x27, 0xDF, 0x52, 0x9C, 0x0F, 0x7A, 0xD0,
-      0x0C, 0xEF, 0x1E, 0x7B, 0xA4, 0x21, 0x78, 0x81, 0x82, 0x61, 0x5C,
-      0x32, 0x6C, 0x8B, 0x6D, 0x1A, 0x20, 0x61, 0xA0, 0xBD, 0x7C}},
-    // C=GB, ST=Greater Manchester, L=Salford, O=COMODO CA Limited, CN=COMODO
-    // RSA Certification Authority
-    {{0x52, 0xF0, 0xE1, 0xC4, 0xE5, 0x8E, 0xC6, 0x29, 0x29, 0x1B, 0x60,
-      0x31, 0x7F, 0x07, 0x46, 0x71, 0xB8, 0x5D, 0x7E, 0xA8, 0x0D, 0x5B,
-      0x07, 0x27, 0x34, 0x63, 0x53, 0x4B, 0x32, 0xB4, 0x02, 0x34}},
-    // C=US, O=Symantec Corporation, OU=Symantec Trust Network, CN=Symantec
-    // Class 3 Public Primary Certification Authority - G4
-    {{0x53, 0xDF, 0xDF, 0xA4, 0xE2, 0x97, 0xFC, 0xFE, 0x07, 0x59, 0x4E,
-      0x8C, 0x62, 0xD5, 0xB8, 0xAB, 0x06, 0xB3, 0x2C, 0x75, 0x49, 0xF3,
-      0x8A, 0x16, 0x30, 0x94, 0xFD, 0x64, 0x29, 0xD5, 0xDA, 0x43}},
-    // C=LU, O=LuxTrust S.A., CN=LuxTrust Global Root 2
-    {{0x54, 0x45, 0x5F, 0x71, 0x29, 0xC2, 0x0B, 0x14, 0x47, 0xC4, 0x18,
-      0xF9, 0x97, 0x16, 0x8F, 0x24, 0xC5, 0x8F, 0xC5, 0x02, 0x3B, 0xF5,
-      0xDA, 0x5B, 0xE2, 0xEB, 0x6E, 0x1D, 0xD8, 0x90, 0x2E, 0xD5}},
-    // C=JP, O=LGPKI, CN=Application CA G3 Root
-    {{0x54, 0xB4, 0xFC, 0x43, 0xD4, 0x4A, 0xA4, 0xCA, 0x9F, 0xC0, 0x3C,
-      0xA7, 0xE9, 0x94, 0x9F, 0xBA, 0xE2, 0x67, 0xA0, 0x64, 0xD0, 0x2D,
-      0xA2, 0x18, 0x52, 0x41, 0x2A, 0x38, 0x1B, 0x5D, 0x15, 0x37}},
-    // C=US, O=DigiCert Inc, OU=www.digicert.com, CN=DigiCert Trusted Root G4
-    {{0x55, 0x2F, 0x7B, 0xDC, 0xF1, 0xA7, 0xAF, 0x9E, 0x6C, 0xE6, 0x72,
-      0x01, 0x7F, 0x4F, 0x12, 0xAB, 0xF7, 0x72, 0x40, 0xC7, 0x8E, 0x76,
-      0x1A, 0xC2, 0x03, 0xD1, 0xD9, 0xD2, 0x0A, 0xC8, 0x99, 0x88}},
-    // CN=Autoridad Certificadora Ra\xC3\xADz Nacional de Uruguay, O=AGESIC,
-    // C=UY
-    {{0x55, 0x33, 0xA0, 0x40, 0x1F, 0x61, 0x2C, 0x68, 0x8E, 0xBC, 0xE5,
-      0xBF, 0x53, 0xF2, 0xEC, 0x14, 0xA7, 0x34, 0xEB, 0x17, 0x8B, 0xFA,
-      0xE0, 0x0E, 0x50, 0xE8, 0x5D, 0xAE, 0x67, 0x23, 0x07, 0x8A}},
-    // C=IT, L=Milan, O=Actalis S.p.A./03358520967, CN=Actalis Authentication
-    // Root CA
-    {{0x55, 0x92, 0x60, 0x84, 0xEC, 0x96, 0x3A, 0x64, 0xB9, 0x6E, 0x2A,
-      0xBE, 0x01, 0xCE, 0x0B, 0xA8, 0x6A, 0x64, 0xFB, 0xFE, 0xBC, 0xC7,
-      0xAA, 0xB5, 0xAF, 0xC1, 0x55, 0xB3, 0x7F, 0xD7, 0x60, 0x66}},
-    // C=ES, O=Consejo General de la Abogacia NIF:Q-2863006I, CN=Autoridad de
-    // Certificacion de la Abogacia
-    {{0x56, 0x07, 0xE2, 0x60, 0x16, 0x3F, 0x49, 0xC8, 0xEA, 0x41, 0x75,
-      0xA1, 0xC0, 0xA5, 0x3B, 0x13, 0x19, 0x5C, 0xB7, 0xD0, 0x78, 0x45,
-      0x61, 0x1E, 0x94, 0x3A, 0x2F, 0xF5, 0x07, 0x03, 0x68, 0x34}},
-    // C=US, ST=Arizona, L=Scottsdale, O=Starfield Technologies, Inc.,
-    // CN=Starfield Services Root Certificate Authority - G2
-    {{0x56, 0x8D, 0x69, 0x05, 0xA2, 0xC8, 0x87, 0x08, 0xA4, 0xB3, 0x02,
-      0x51, 0x90, 0xED, 0xCF, 0xED, 0xB1, 0x97, 0x4A, 0x60, 0x6A, 0x13,
-      0xC6, 0xE5, 0x29, 0x0F, 0xCB, 0x2A, 0xE6, 0x3E, 0xDA, 0xB5}},
-    // C=FR, O=OpenTrust, CN=OpenTrust Root CA G1
-    {{0x56, 0xC7, 0x71, 0x28, 0xD9, 0x8C, 0x18, 0xD9, 0x1B, 0x4C, 0xFD,
-      0xFF, 0xBC, 0x25, 0xEE, 0x91, 0x03, 0xD4, 0x75, 0x8E, 0xA2, 0xAB,
-      0xAD, 0x82, 0x6A, 0x90, 0xF3, 0x45, 0x7D, 0x46, 0x0E, 0xB4}},
-    // CN=T\xC3\x9CRKTRUST Elektronik \xC4\xB0\xC5\x9Flem Hizmetleri, C=TR,
-    // L=Ankara, O=T\xC3\x9CRKTRUST Bilgi \xC4\xB0leti\xC5\x9Fim ve
-    // Bili\xC5\x9Fim G\xC3\xBCvenli\xC4\x9Fi Hizmetleri A.\xC5\x9E. (c)
-    // Kas\xC4\xB1m 2005
-    {{0x56, 0xCE, 0x34, 0x7C, 0xC6, 0xDF, 0x4C, 0x35, 0x94, 0x3D, 0xFD,
-      0xEA, 0xEE, 0x02, 0x3F, 0x97, 0x39, 0xA3, 0xF1, 0xCE, 0xDE, 0xEE,
-      0x0C, 0xD8, 0x8D, 0xC2, 0x38, 0x6B, 0xC8, 0xA9, 0x1E, 0xAF}},
-    // L=ValiCert Validation Network, O=ValiCert, Inc., OU=ValiCert Class 2
-    // Policy Validation Authority,
-    // CN=http://www.valicert.com//emailAddress=info@valicert.com
-    {{0x58, 0xD0, 0x17, 0x27, 0x9C, 0xD4, 0xDC, 0x63, 0xAB, 0xDD, 0xB1,
-      0x96, 0xA6, 0xC9, 0x90, 0x6C, 0x30, 0xC4, 0xE0, 0x87, 0x83, 0xEA,
-      0xE8, 0xC1, 0x60, 0x99, 0x54, 0xD6, 0x93, 0x55, 0x59, 0x6B}},
-    // C=TW, O=TAIWAN-CA, OU=Root CA, CN=TWCA Global Root CA
-    {{0x59, 0x76, 0x90, 0x07, 0xF7, 0x68, 0x5D, 0x0F, 0xCD, 0x50, 0x87,
-      0x2F, 0x9F, 0x95, 0xD5, 0x75, 0x5A, 0x5B, 0x2B, 0x45, 0x7D, 0x81,
-      0xF3, 0x69, 0x2B, 0x61, 0x0A, 0x98, 0x67, 0x2F, 0x0E, 0x1B}},
-    // C=CH, O=SwissSign AG, CN=SwissSign Platinum Root CA - G3
-    {{0x59, 0xB3, 0x82, 0x9F, 0x1F, 0xF4, 0x43, 0x34, 0x49, 0x58, 0xFA,
-      0xE8, 0xBF, 0xF6, 0x21, 0xB6, 0x84, 0xC8, 0x48, 0xCF, 0xBF, 0x7E,
-      0xAD, 0x6B, 0x63, 0xA6, 0xCA, 0x50, 0xF2, 0x79, 0x4F, 0x89}},
-    // C=PA, ST=Panama, L=Panama City, O=TrustCor Systems S. de R.L.,
-    // OU=TrustCor Certificate Authority, CN=TrustCor ECA-1
-    {{0x5A, 0x88, 0x5D, 0xB1, 0x9C, 0x01, 0xD9, 0x12, 0xC5, 0x75, 0x93,
-      0x88, 0x93, 0x8C, 0xAF, 0xBB, 0xDF, 0x03, 0x1A, 0xB2, 0xD4, 0x8E,
-      0x91, 0xEE, 0x15, 0x58, 0x9B, 0x42, 0x97, 0x1D, 0x03, 0x9C}},
-    // C=SI, O=Halcom, CN=Halcom CA FO
-    {{0x5A, 0x1B, 0x5D, 0x6B, 0xC6, 0x55, 0x23, 0xB4, 0x0A, 0x6D, 0xEF,
-      0xFA, 0x45, 0xB4, 0x8E, 0x42, 0x88, 0xAE, 0x8D, 0xD8, 0x6D, 0xD7,
-      0x0A, 0x5B, 0x85, 0x8D, 0x4A, 0x5A, 0xFF, 0xC9, 0x4F, 0x71}},
-    // C=US, ST=Texas, L=Houston, O=SSL Corporation, CN=SSL.com EV Root
-    // Certification Authority RSA
-    {{0x5A, 0xDF, 0xA2, 0x50, 0x13, 0xBE, 0xD3, 0x71, 0x08, 0x31, 0x57,
-      0x2D, 0xE5, 0x1C, 0x4B, 0x9A, 0x21, 0x17, 0x1C, 0x00, 0x31, 0x32,
-      0x49, 0xC4, 0xCB, 0x47, 0x19, 0xD3, 0x7F, 0xBB, 0x8D, 0x20}},
-    // CN=AC1 RAIZ MTIN/serialNumber=S2819001E, OU=PRESTADOR DE SERVICIOS DE
-    // CERTIFICACION MTIN, OU=SUBDIRECCION GENERAL DE PROCESO DE DATOS,
-    // O=MINISTERIO DE TRABAJO E INMIGRACION, L=MADRID, C=ES
-    {{0x5B, 0x1D, 0x9D, 0x24, 0xDE, 0x0A, 0xFE, 0xA8, 0xB3, 0x5B, 0xA0,
-      0x4A, 0x1C, 0x3E, 0x25, 0xD0, 0x81, 0x2C, 0xDF, 0x7C, 0x46, 0x25,
-      0xDE, 0x0A, 0x89, 0xAF, 0x9F, 0xE4, 0xBB, 0xD1, 0xBB, 0x15}},
-    // C=PL, O=Unizeto Technologies S.A., OU=Certum Certification Authority,
-    // CN=Certum Trusted Network CA
-    {{0x5C, 0x58, 0x46, 0x8D, 0x55, 0xF5, 0x8E, 0x49, 0x7E, 0x74, 0x39,
-      0x82, 0xD2, 0xB5, 0x00, 0x10, 0xB6, 0xD1, 0x65, 0x37, 0x4A, 0xCF,
-      0x83, 0xA7, 0xD4, 0xA3, 0x2D, 0xB7, 0x68, 0xC4, 0x40, 0x8E}},
-    // C=CN, O=China Financial Certification Authority, CN=CFCA EV ROOT
-    {{0x5C, 0xC3, 0xD7, 0x8E, 0x4E, 0x1D, 0x5E, 0x45, 0x54, 0x7A, 0x04,
-      0xE6, 0x87, 0x3E, 0x64, 0xF9, 0x0C, 0xF9, 0x53, 0x6D, 0x1C, 0xCC,
-      0x2E, 0xF8, 0x00, 0xF3, 0x55, 0xC4, 0xC5, 0xFD, 0x70, 0xFD}},
-    // C=US, O=IdenTrust, CN=IdenTrust Commercial Root CA 1
-    {{0x5D, 0x56, 0x49, 0x9B, 0xE4, 0xD2, 0xE0, 0x8B, 0xCF, 0xCA, 0xD0,
-      0x8A, 0x3E, 0x38, 0x72, 0x3D, 0x50, 0x50, 0x3B, 0xDE, 0x70, 0x69,
-      0x48, 0xE4, 0x2F, 0x55, 0x60, 0x30, 0x19, 0xE5, 0x28, 0xAE}},
-    // C=AT, L=Vienna, ST=Austria, O=ARGE DATEN - Austrian Society for Data
-    // Protection, OU=GLOBALTRUST Certification Service,
-    // CN=GLOBALTRUST/emailAddress=info@globaltrust.info
-    {{0x5E, 0x35, 0x71, 0xF3, 0x3F, 0x45, 0xA7, 0xDF, 0x15, 0x37, 0xA6,
-      0x8B, 0x5F, 0xFB, 0x9E, 0x03, 0x6A, 0xF9, 0xD2, 0xF5, 0xBC, 0x4C,
-      0x97, 0x17, 0x13, 0x0D, 0xC4, 0x3D, 0x71, 0x75, 0xAA, 0xC7}},
-    // C=US, O=GeoTrust Inc., OU=(c) 2007 GeoTrust Inc. - For authorized use
-    // only, CN=GeoTrust Primary Certification Authority - G2
-    {{0x5E, 0xDB, 0x7A, 0xC4, 0x3B, 0x82, 0xA0, 0x6A, 0x87, 0x61, 0xE8,
-      0xD7, 0xBE, 0x49, 0x79, 0xEB, 0xF2, 0x61, 0x1F, 0x7D, 0xD7, 0x9B,
-      0xF9, 0x1C, 0x1C, 0x6B, 0x56, 0x6A, 0x21, 0x9E, 0xD7, 0x66}},
-    // C=US, O=Equifax Secure Inc., CN=Equifax Secure Global eBusiness CA-1
-    {{0x5F, 0x0B, 0x62, 0xEA, 0xB5, 0xE3, 0x53, 0xEA, 0x65, 0x21, 0x65,
-      0x16, 0x58, 0xFB, 0xB6, 0x53, 0x59, 0xF4, 0x43, 0x28, 0x0A, 0x4A,
-      0xFB, 0xD1, 0x04, 0xD7, 0x7D, 0x10, 0xF9, 0xF0, 0x4C, 0x07}},
-    // C=JP, O=Japan Certification Services, Inc., CN=SecureSign RootCA1
-    {{0x5F, 0x96, 0x0E, 0xEB, 0xD7, 0x16, 0xDB, 0xCB, 0x4D, 0x8A, 0x78,
-      0xB9, 0x96, 0xE6, 0x80, 0xEC, 0x25, 0x47, 0x44, 0x1E, 0x69, 0xB4,
-      0xE4, 0x4E, 0x98, 0xA5, 0x95, 0x50, 0x2E, 0x28, 0xA0, 0x02}},
-    // C=PT, O=MULTICERT - Servi\xC3\xA7os de Certifica\xC3\xA7\xC3\xA3o
-    // Electr\xC3\xB3nica S.A., CN=MULTICERT Root Certification Authority 01
-    {{0x60, 0x4D, 0x32, 0xD0, 0x36, 0x89, 0x5A, 0xED, 0x3B, 0xFE, 0xFA,
-      0xEB, 0x72, 0x7C, 0x00, 0x9E, 0xC0, 0xF2, 0xB3, 0xCD, 0xFA, 0x42,
-      0xA1, 0xC7, 0x17, 0x30, 0xE6, 0xA7, 0x2C, 0x3B, 0xE9, 0xD4}},
-    // C=KR, O=Government of Korea, OU=GPKI, CN=GPKIRootCA
-    {{0x60, 0x62, 0x23, 0xD9, 0xDB, 0x80, 0xDF, 0x39, 0x39, 0x60, 0x1E,
-      0x74, 0xB7, 0xE8, 0x28, 0xE2, 0x80, 0x0C, 0xCE, 0x42, 0x73, 0xF7,
-      0x6F, 0x27, 0x6A, 0xA6, 0x2D, 0xB0, 0xA8, 0xE3, 0xB6, 0xC1}},
-    // C=DE, ST=Hamburg, L=Hamburg, O=TC TrustCenter for Security in Data
-    // Networks GmbH, OU=TC TrustCenter Class 1
-    // CA/emailAddress=certificate@trustcenter.de
-    {{0x61, 0x4F, 0xD1, 0x8D, 0xA1, 0x49, 0x05, 0x60, 0xCD, 0xAD, 0x11,
-      0x96, 0xE2, 0x49, 0x2A, 0xB7, 0x06, 0x2E, 0xAB, 0x1A, 0x67, 0xB3,
-      0xA3, 0x0F, 0x1D, 0x05, 0x85, 0xA7, 0xD6, 0xBA, 0x68, 0x24}},
-    // C=US, O=VeriSign, Inc., OU=Class 4 Public Primary Certification Authority
-    // - G2, OU=(c) 1998 VeriSign, Inc. - For authorized use only, OU=VeriSign
-    // Trust Network
-    {{0x61, 0xDC, 0x0C, 0x03, 0x91, 0x69, 0x4C, 0x65, 0x52, 0x00, 0xC1,
-      0x50, 0x5E, 0xBC, 0xC9, 0xE4, 0xE2, 0x16, 0xBC, 0x31, 0xA5, 0xC5,
-      0x1A, 0x36, 0x11, 0x28, 0x34, 0x23, 0xC1, 0xD8, 0x9E, 0x37}},
-    // C=ES, O=FNMT, OU=FNMT Clase 2 CA
-    {{0x62, 0xB9, 0x26, 0x72, 0x66, 0x21, 0x28, 0x32, 0xA8, 0xE2, 0x2D,
-      0xAB, 0x93, 0x3D, 0x91, 0xC7, 0x01, 0x12, 0x74, 0xAC, 0xF7, 0x17,
-      0x03, 0xF9, 0xCC, 0x97, 0x83, 0x37, 0x51, 0xA6, 0xE9, 0x4F}},
-    // C=CH, O=SwissSign AG, CN=SwissSign Gold CA - G2
-    {{0x62, 0xDD, 0x0B, 0xE9, 0xB9, 0xF5, 0x0A, 0x16, 0x3E, 0xA0, 0xF8,
-      0xE7, 0x5C, 0x05, 0x3B, 0x1E, 0xCA, 0x57, 0xEA, 0x55, 0xC8, 0x68,
-      0x8F, 0x64, 0x7C, 0x68, 0x81, 0xF2, 0xC8, 0x35, 0x7B, 0x95}},
-    // C=US, O=Entrust.net, OU=www.entrust.net/CPS incorp. by ref. (limits
-    // liab.), OU=(c) 1999 Entrust.net Limited, CN=Entrust.net Secure Server
-    // Certification Authority
-    {{0x62, 0xF2, 0x40, 0x27, 0x8C, 0x56, 0x4C, 0x4D, 0xD8, 0xBF, 0x7D,
-      0x9D, 0x4F, 0x6F, 0x36, 0x6E, 0xA8, 0x94, 0xD2, 0x2F, 0x5F, 0x34,
-      0xD9, 0x89, 0xA9, 0x83, 0xAC, 0xEC, 0x2F, 0xFF, 0xED, 0x50}},
-    // C=US, O=Digital Signature Trust Co., OU=DSTCA E1
-    {{0x63, 0x04, 0x19, 0xAE, 0xC4, 0x78, 0xCB, 0xB4, 0xBB, 0x80, 0x83,
-      0xDE, 0x9D, 0x9C, 0xF2, 0x79, 0x75, 0x2F, 0x03, 0x9D, 0xEF, 0x16,
-      0xE4, 0x64, 0x71, 0xB6, 0x79, 0xCA, 0x93, 0x00, 0x2D, 0xB0}},
-    // C=TW, O=TAIWAN-CA, OU=Root CA, CN=TWCA Root Certification Authority
-    {{0x63, 0x2D, 0x80, 0xBB, 0x09, 0x6D, 0x20, 0x96, 0x77, 0xD1, 0x73,
-      0x4E, 0x5B, 0x35, 0xEA, 0x9D, 0x30, 0x19, 0xB9, 0xC4, 0x4F, 0x8F,
-      0xCB, 0x26, 0x40, 0xC8, 0x79, 0x03, 0x9A, 0xC9, 0x4E, 0xE8}},
-    // C=NL, O=Staat der Nederlanden, CN=Staat der Nederlanden Root CA - G2
-    {{0x66, 0x8C, 0x83, 0x94, 0x7D, 0xA6, 0x3B, 0x72, 0x4B, 0xEC, 0xE1,
-      0x74, 0x3C, 0x31, 0xA0, 0xE6, 0xAE, 0xD0, 0xDB, 0x8E, 0xC5, 0xB3,
-      0x1B, 0xE3, 0x77, 0xBB, 0x78, 0x4F, 0x91, 0xB6, 0x71, 0x6F}},
-    // O=eSign Australia, OU=Gatekeeper PKI, CN=Gatekeeper Root CA
-    {{0x67, 0xEC, 0x20, 0x59, 0xFB, 0xF5, 0x2D, 0x2E, 0x6A, 0xB5, 0x1A,
-      0x5A, 0x9B, 0x3F, 0xC2, 0xE1, 0xDC, 0xD6, 0x58, 0xA1, 0xEF, 0x3A,
-      0x8F, 0x31, 0x10, 0x7B, 0xC9, 0x80, 0x28, 0xB4, 0x94, 0xA2}},
-    // C=US, O=VeriSign, Inc., OU=Class 3 Public Primary Certification Authority
-    {{0x68, 0x72, 0x58, 0x62, 0x19, 0xC3, 0x49, 0xD8, 0x5A, 0xAA, 0x45,
-      0x86, 0xA1, 0x44, 0x51, 0xF2, 0x45, 0x1A, 0xE3, 0xB6, 0x09, 0x2D,
-      0xBB, 0x1E, 0xFF, 0xB0, 0x14, 0x7C, 0x33, 0xBF, 0x0F, 0xD4}},
-    // C=BR, O=ICP-Brasil, OU=Instituto Nacional de Tecnologia da Informacao -
-    // ITI, L=Brasilia, ST=DF, CN=Autoridade Certificadora Raiz Brasileira
-    {{0x68, 0x7E, 0xA8, 0x90, 0x89, 0x30, 0x9D, 0x2C, 0xFE, 0x10, 0x7D,
-      0xB0, 0x59, 0xFB, 0x10, 0xD6, 0x76, 0xF4, 0x5D, 0x32, 0x83, 0xAE,
-      0xE0, 0x56, 0x90, 0x3E, 0xEA, 0x0C, 0xF3, 0xC1, 0x88, 0xF8}},
-    // C=SE, O=AddTrust AB, OU=AddTrust External TTP Network, CN=AddTrust
-    // External CA Root
-    {{0x68, 0x7F, 0xA4, 0x51, 0x38, 0x22, 0x78, 0xFF, 0xF0, 0xC8, 0xB1,
-      0x1F, 0x8D, 0x43, 0xD5, 0x76, 0x67, 0x1C, 0x6E, 0xB2, 0xBC, 0xEA,
-      0xB4, 0x13, 0xFB, 0x83, 0xD9, 0x65, 0xD0, 0x6D, 0x2F, 0xF2}},
-    // C=US, O=Verizon Business, OU=OmniRoot, CN=Verizon Global Root CA
-    {{0x68, 0xAD, 0x50, 0x90, 0x9B, 0x04, 0x36, 0x3C, 0x60, 0x5E, 0xF1,
-      0x35, 0x81, 0xA9, 0x39, 0xFF, 0x2C, 0x96, 0x37, 0x2E, 0x3F, 0x12,
-      0x32, 0x5B, 0x0A, 0x68, 0x61, 0xE1, 0xD5, 0x9F, 0x66, 0x03}},
-    // C=US, O=VeriSign, Inc., OU=VeriSign Trust Network, OU=(c) 2007 VeriSign,
-    // Inc. - For authorized use only, CN=VeriSign Class 3 Public Primary
-    // Certification Authority - G4
-    {{0x69, 0xDD, 0xD7, 0xEA, 0x90, 0xBB, 0x57, 0xC9, 0x3E, 0x13, 0x5D,
-      0xC8, 0x5E, 0xA6, 0xFC, 0xD5, 0x48, 0x0B, 0x60, 0x32, 0x39, 0xBD,
-      0xC4, 0x54, 0xFC, 0x75, 0x8B, 0x2A, 0x26, 0xCF, 0x7F, 0x79}},
-    // C=US, O=VISA, OU=Visa International Service Association, CN=Visa
-    // eCommerce Root
-    {{0x69, 0xFA, 0xC9, 0xBD, 0x55, 0xFB, 0x0A, 0xC7, 0x8D, 0x53, 0xBB,
-      0xEE, 0x5C, 0xF1, 0xD5, 0x97, 0x98, 0x9F, 0xD0, 0xAA, 0xAB, 0x20,
-      0xA2, 0x51, 0x51, 0xBD, 0xF1, 0x73, 0x3E, 0xE7, 0xD1, 0x22}},
-    // C=CH, O=WISeKey, OU=OISTE Foundation Endorsed, CN=OISTE WISeKey Global
-    // Root GB CA
-    {{0x6B, 0x9C, 0x08, 0xE8, 0x6E, 0xB0, 0xF7, 0x67, 0xCF, 0xAD, 0x65,
-      0xCD, 0x98, 0xB6, 0x21, 0x49, 0xE5, 0x49, 0x4A, 0x67, 0xF5, 0x84,
-      0x5E, 0x7B, 0xD1, 0xED, 0x01, 0x9F, 0x27, 0xB8, 0x6B, 0xD6}},
-    // C=AT, O=A-Trust Ges. f. Sicherheitssysteme im elektr. Datenverkehr GmbH,
-    // OU=A-Trust-Qual-03, CN=A-Trust-Qual-03
-    {{0x6B, 0xAF, 0x50, 0xAE, 0x34, 0x67, 0xEF, 0xF3, 0xC3, 0x5F, 0xEF,
-      0xDC, 0x76, 0xA0, 0x2A, 0x97, 0xFA, 0xB6, 0x26, 0x77, 0x23, 0xED,
-      0xA9, 0x1E, 0x99, 0xF1, 0xB3, 0xDC, 0x2B, 0x28, 0xF8, 0x2E}},
-    // C=HU, L=Budapest, O=NetLock Kft.,
-    // OU=Tan\xC3\xBAs\xC3\xADtv\xC3\xA1nykiad\xC3\xB3k (Certification
-    // Services), CN=NetLock Arany (Class Gold)
-    // F\xC5\x91tan\xC3\xBAs\xC3\xADtv\xC3\xA1ny
-    {{0x6C, 0x61, 0xDA, 0xC3, 0xA2, 0xDE, 0xF0, 0x31, 0x50, 0x6B, 0xE0,
-      0x36, 0xD2, 0xA6, 0xFE, 0x40, 0x19, 0x94, 0xFB, 0xD1, 0x3D, 0xF9,
-      0xC8, 0xD4, 0x66, 0x59, 0x92, 0x74, 0xC4, 0x46, 0xEC, 0x98}},
-    // C=FR, O=Certplus, CN=Certplus Root CA G2
-    {{0x6C, 0xC0, 0x50, 0x41, 0xE6, 0x44, 0x5E, 0x74, 0x69, 0x6C, 0x4C,
-      0xFB, 0xC9, 0xF8, 0x0F, 0x54, 0x3B, 0x7E, 0xAB, 0xBB, 0x44, 0xB4,
-      0xCE, 0x6F, 0x78, 0x7C, 0x6A, 0x99, 0x71, 0xC4, 0x2F, 0x17}},
-    // C=AU, O=GOV, OU=DoD, OU=PKI, OU=CAs, CN=ADOCA02
-    {{0x6C, 0xCF, 0xD3, 0x02, 0xFC, 0x44, 0xBF, 0x45, 0x99, 0x32, 0x9B,
-      0x97, 0x50, 0x87, 0x8E, 0xA4, 0x4E, 0x7E, 0x85, 0x66, 0x56, 0x4B,
-      0xCB, 0xD5, 0x86, 0x16, 0x97, 0x62, 0xDD, 0x10, 0xC7, 0x4E}},
-    // O=Entrust.net, OU=www.entrust.net/CPS_2048 incorp. by ref. (limits
-    // liab.), OU=(c) 1999 Entrust.net Limited, CN=Entrust.net Certification
-    // Authority (2048)
-    {{0x6D, 0xC4, 0x71, 0x72, 0xE0, 0x1C, 0xBC, 0xB0, 0xBF, 0x62, 0x58,
-      0x0D, 0x89, 0x5F, 0xE2, 0xB8, 0xAC, 0x9A, 0xD4, 0xF8, 0x73, 0x80,
-      0x1E, 0x0C, 0x10, 0xB9, 0xC8, 0x37, 0xD2, 0x1E, 0xB1, 0x77}},
-    // C=ES, ST=Madrid, L=Madrid, O=IPS Certification Authority s.l. ipsCA,
-    // OU=ipsCA, CN=ipsCA Global CA Root/emailAddress=global01@ipsca.com
-    {{0x6D, 0xEA, 0x86, 0xA1, 0xE6, 0x66, 0x20, 0xA0, 0x40, 0xC3, 0xC5,
-      0x94, 0x3C, 0xB2, 0x15, 0xD2, 0xCA, 0x87, 0xFB, 0x6A, 0xC0, 0x9B,
-      0x59, 0x70, 0x7E, 0x29, 0xD2, 0xFA, 0xCB, 0xD6, 0x6B, 0x4E}},
-    // C=us, O=U.S. Government, OU=FBCA, CN=Common Policy
-    {{0x6E, 0x5E, 0x93, 0xAE, 0x86, 0x7F, 0xD3, 0xE3, 0xE7, 0x83, 0x04,
-      0xE0, 0x54, 0xD1, 0xA6, 0xAE, 0xAE, 0xD0, 0x29, 0x5D, 0x58, 0xC0,
-      0xE3, 0xFC, 0x4C, 0x9F, 0xFE, 0x31, 0x0A, 0x34, 0x88, 0xCC}},
-    // C=US, ST=UT, L=Salt Lake City, O=The USERTRUST Network,
-    // OU=http://www.usertrust.com, CN=UTN-USERFirst-Hardware
-    {{0x6E, 0xA5, 0x47, 0x41, 0xD0, 0x04, 0x66, 0x7E, 0xED, 0x1B, 0x48,
-      0x16, 0x63, 0x4A, 0xA3, 0xA7, 0x9E, 0x6E, 0x4B, 0x96, 0x95, 0x0F,
-      0x82, 0x79, 0xDA, 0xFC, 0x8D, 0x9B, 0xD8, 0x81, 0x21, 0x37}},
-    // C=CH, O=The Federal Authorities of the Swiss Confederation, OU=Services,
-    // OU=Certification Authorities, CN=Swiss Government Root CA I
-    {{0x6E, 0xC6, 0x61, 0x4E, 0x9A, 0x8E, 0xFD, 0x47, 0xD6, 0x31, 0x8F,
-      0xFD, 0xFD, 0x0B, 0xF6, 0x5B, 0x49, 0x3A, 0x14, 0x1F, 0x77, 0xC3,
-      0x8D, 0x0B, 0x31, 0x9B, 0xE1, 0xBB, 0xBC, 0x05, 0x3D, 0xD2}},
-    // C=KR, O=KISA, OU=Korea Certification Authority Central, CN=KISA RootCA 1
-    {{0x6F, 0xDB, 0x3F, 0x76, 0xC8, 0xB8, 0x01, 0xA7, 0x53, 0x38, 0xD8,
-      0xA5, 0x0A, 0x7C, 0x02, 0x87, 0x9F, 0x61, 0x98, 0xB5, 0x7E, 0x59,
-      0x4D, 0x31, 0x8D, 0x38, 0x32, 0x90, 0x0F, 0xED, 0xCD, 0x79}},
-    // C=US, O=AffirmTrust, CN=AffirmTrust Premium
-    {{0x70, 0xA7, 0x3F, 0x7F, 0x37, 0x6B, 0x60, 0x07, 0x42, 0x48, 0x90,
-      0x45, 0x34, 0xB1, 0x14, 0x82, 0xD5, 0xBF, 0x0E, 0x69, 0x8E, 0xCC,
-      0x49, 0x8D, 0xF5, 0x25, 0x77, 0xEB, 0xF2, 0xE9, 0x3B, 0x9A}},
-    // C=TW, O=Government Root Certification Authority
-    {{0x70, 0xB9, 0x22, 0xBF, 0xDA, 0x0E, 0x3F, 0x4A, 0x34, 0x2E, 0x4E,
-      0xE2, 0x2D, 0x57, 0x9A, 0xE5, 0x98, 0xD0, 0x71, 0xCC, 0x5E, 0xC9,
-      0xC3, 0x0F, 0x12, 0x36, 0x80, 0x34, 0x03, 0x88, 0xAE, 0xA5}},
-    // C=PL, O=Telekomunikacja Polska S.A., OU=Signet Certification Authority,
-    // CN=Signet Root CA
-    {{0x72, 0x86, 0xCE, 0x24, 0x9F, 0xE9, 0xE3, 0x2B, 0xD4, 0x75, 0x22,
-      0x57, 0xC1, 0x7C, 0xD8, 0xF6, 0x99, 0x1A, 0x9C, 0x1E, 0x6F, 0x1A,
-      0x3C, 0xC7, 0x33, 0x04, 0xED, 0x02, 0x3E, 0x6A, 0xE4, 0xEB}},
-    // C=NL, O=PTT Post, OU=KeyMail, CN=PTT Post Root CA/mail=ca@ptt-post.nl
-    {{0x73, 0x0B, 0x61, 0x9E, 0xAA, 0x75, 0x98, 0x63, 0xC6, 0x53, 0x60,
-      0xB7, 0x41, 0x2E, 0x14, 0x57, 0xEC, 0xA9, 0x68, 0x44, 0xEF, 0x2F,
-      0x16, 0xD9, 0x1F, 0xCF, 0x2E, 0xFE, 0x46, 0xA6, 0x47, 0xE9}},
-    // C=TR, O=Elektronik Bilgi Guvenligi A.S., CN=E-GUVEN Kok Elektronik
-    // Sertifika Hizmet Saglayicisi S2
-    {{0x73, 0x2F, 0xF5, 0xBC, 0x47, 0x3C, 0x33, 0xEF, 0xAA, 0xD9, 0xB1,
-      0x87, 0xFB, 0x45, 0x9A, 0x73, 0x2F, 0xFB, 0xEE, 0xA5, 0x9D, 0xF0,
-      0xFD, 0xFB, 0x8E, 0x2F, 0xB5, 0xDE, 0xF4, 0x03, 0x2A, 0xFE}},
-    // C=ES, O=DIRECCION GENERAL DE LA POLICIA, OU=DNIE, CN=AC RAIZ DNIE
-    {{0x73, 0x97, 0x10, 0xC5, 0x24, 0x5E, 0x33, 0xEC, 0x8A, 0x24, 0x3A,
-      0x1B, 0x20, 0x04, 0x8F, 0xC9, 0xD5, 0xF4, 0x52, 0x85, 0x99, 0x21,
-      0x38, 0x45, 0xC1, 0x64, 0xD0, 0x04, 0xB8, 0xB6, 0x67, 0xF9}},
-    // C=US, O=Entrust, Inc., OU=www.entrust.net/CPS is incorporated by
-    // reference, OU=(c) 2006 Entrust, Inc., CN=Entrust Root Certification
-    // Authority
-    {{0x73, 0xC1, 0x76, 0x43, 0x4F, 0x1B, 0xC6, 0xD5, 0xAD, 0xF4, 0x5B,
-      0x0E, 0x76, 0xE7, 0x27, 0x28, 0x7C, 0x8D, 0xE5, 0x76, 0x16, 0xC1,
-      0xE6, 0xE6, 0x14, 0x1A, 0x2B, 0x2C, 0xBC, 0x7D, 0x8E, 0x4C}},
-    // C=US, O=DigiCert Inc, OU=www.digicert.com, CN=DigiCert High Assurance EV
-    // Root CA
-    {{0x74, 0x31, 0xE5, 0xF4, 0xC3, 0xC1, 0xCE, 0x46, 0x90, 0x77, 0x4F,
-      0x0B, 0x61, 0xE0, 0x54, 0x40, 0x88, 0x3B, 0xA9, 0xA0, 0x1E, 0xD0,
-      0x0B, 0xA6, 0xAB, 0xD7, 0x80, 0x6E, 0xD3, 0xB1, 0x18, 0xCF}},
-    // C=PA, ST=Panama, L=Panama City, O=TrustCor Systems S. de R.L.,
-    // OU=TrustCor Certificate Authority, CN=TrustCor ECA-1
-    {{0x74, 0x4B, 0x11, 0x47, 0xB4, 0xA9, 0xA6, 0x9C, 0x32, 0x78, 0x5E,
-      0x9E, 0x37, 0xC3, 0x32, 0x32, 0x41, 0xEF, 0x29, 0xF6, 0x3E, 0x76,
-      0xF1, 0x60, 0x3D, 0x67, 0x61, 0xA7, 0x83, 0xD8, 0xA0, 0xFE}},
-    // C=si, O=state-institutions, OU=sigov-ca
-    {{0x74, 0xCB, 0x3A, 0x4E, 0xA7, 0x91, 0xAF, 0xB0, 0xA2, 0xD1, 0xA0,
-      0xB1, 0x33, 0x01, 0xB3, 0xBE, 0xE0, 0xE5, 0x0A, 0xD5, 0xC7, 0x9A,
-      0x1A, 0x6F, 0x2C, 0x66, 0x3E, 0x6F, 0x4E, 0xE7, 0xA4, 0x84}},
-    // C=AT, O=A-Trust Ges. f. Sicherheitssysteme im elektr. Datenverkehr GmbH,
-    // OU=A-Trust-Qual-02, CN=A-Trust-Qual-02
-    {{0x75, 0xC9, 0xD4, 0x36, 0x1C, 0xB9, 0x6E, 0x99, 0x3A, 0xBD, 0x96,
-      0x20, 0xCF, 0x04, 0x3B, 0xE9, 0x40, 0x7A, 0x46, 0x33, 0xF2, 0x02,
-      0xF0, 0xF4, 0xC0, 0xE1, 0x78, 0x51, 0xCC, 0x60, 0x89, 0xCD}},
-    // C=TW, O=Government Root Certification Authority
-    {{0x76, 0x00, 0x29, 0x5E, 0xEF, 0xE8, 0x5B, 0x9E, 0x1F, 0xD6, 0x24,
-      0xDB, 0x76, 0x06, 0x2A, 0xAA, 0xAE, 0x59, 0x81, 0x8A, 0x54, 0xD2,
-      0x77, 0x4C, 0xD4, 0xC0, 0xB2, 0xC0, 0x11, 0x31, 0xE1, 0xB3}},
-    // C=US, O=Digital Signature Trust, OU=DST ACES, CN=DST ACES CA X6
-    {{0x76, 0x7C, 0x95, 0x5A, 0x76, 0x41, 0x2C, 0x89, 0xAF, 0x68, 0x8E,
-      0x90, 0xA1, 0xC7, 0x0F, 0x55, 0x6C, 0xFD, 0x6B, 0x60, 0x25, 0xDB,
-      0xEA, 0x10, 0x41, 0x6D, 0x7E, 0xB6, 0x83, 0x1F, 0x8C, 0x40}},
-    // C=DE, ST=Hamburg, L=Hamburg, O=TC TrustCenter for Security in Data
-    // Networks GmbH, OU=TC TrustCenter Class 3
-    // CA/emailAddress=certificate@trustcenter.de
-    {{0x76, 0xEF, 0x47, 0x62, 0xE5, 0x73, 0x20, 0x60, 0x06, 0xCB, 0xC3,
-      0x38, 0xB1, 0x7C, 0xA4, 0xBC, 0x20, 0x05, 0x74, 0xA1, 0x19, 0x28,
-      0xD9, 0x0C, 0x3E, 0xF3, 0x1C, 0x5E, 0x80, 0x3E, 0x6C, 0x6F}},
-    // L=Alvaro Obregon, ST=Distrito Federal,
-    // C=MX/postalCode=01030/street=Insurgentes Sur 1940, CN=Autoridad
-    // Certificadora Raiz de la Secretaria de Economia, OU=Direccion General de
-    // Normatividad Mercantil, O=Secretaria de
-    // Economia/emailAddress=acrse@economia.gob.mx
-    {{0x77, 0xE0, 0x4C, 0x9A, 0x75, 0x1C, 0x73, 0xF2, 0x3E, 0x2A, 0x13,
-      0x36, 0x11, 0x2E, 0xC8, 0xD5, 0x15, 0x3D, 0x38, 0x2A, 0x15, 0x2F,
-      0xED, 0x89, 0xD7, 0x53, 0x2C, 0x31, 0x02, 0x77, 0x1F, 0x3C}},
-    // C=SG, O=Netrust Certificate Authority 1, OU=Netrust CA1
-    {{0x78, 0x1D, 0x64, 0xDF, 0xA7, 0x7B, 0x00, 0xF2, 0xC0, 0x06, 0x70,
-      0x0B, 0x1F, 0xDA, 0x86, 0xBF, 0x68, 0xB8, 0x65, 0xA6, 0x03, 0xC7,
-      0xA6, 0x56, 0xF9, 0x2E, 0x90, 0xC0, 0x42, 0xCA, 0x28, 0x73}},
-    // C=FI, O=Sonera, CN=Sonera Class2 CA
-    {{0x79, 0x08, 0xB4, 0x03, 0x14, 0xC1, 0x38, 0x10, 0x0B, 0x51, 0x8D,
-      0x07, 0x35, 0x80, 0x7F, 0xFB, 0xFC, 0xF8, 0x51, 0x8A, 0x00, 0x95,
-      0x33, 0x71, 0x05, 0xBA, 0x38, 0x6B, 0x15, 0x3D, 0xD9, 0x27}},
-    // C=AT, O=A-Trust Ges. f. Sicherheitssysteme im elektr. Datenverkehr GmbH,
-    // OU=A-Trust-nQual-03, CN=A-Trust-nQual-03
-    {{0x79, 0x3C, 0xBF, 0x45, 0x59, 0xB9, 0xFD, 0xE3, 0x8A, 0xB2, 0x2D,
-      0xF1, 0x68, 0x69, 0xF6, 0x98, 0x81, 0xAE, 0x14, 0xC4, 0xB0, 0x13,
-      0x9A, 0xC7, 0x88, 0xA7, 0x8A, 0x1A, 0xFC, 0xCA, 0x02, 0xFB}},
-    // C=ZA, ST=Western Cape, L=Somerset West, O=South African Post Office
-    // Limited, OU=SAPO Trust Centre, CN=SAPO Class 3 Root
-    // CA/emailAddress=pkiadmin@trustcentre.co.za
-    {{0x79, 0x6B, 0x93, 0xD0, 0xA3, 0xBA, 0x22, 0xE1, 0x91, 0xF2, 0x49,
-      0x5F, 0x15, 0x0A, 0x5F, 0x9B, 0xFE, 0xE2, 0xCE, 0x15, 0x03, 0xDA,
-      0x21, 0x7B, 0x74, 0xB8, 0xA9, 0x84, 0x68, 0x51, 0x10, 0xF1}},
-    // C=US, O=VeriSign, Inc., OU=Class 3 Public Primary Certification Authority
-    // - G2, OU=(c) 1998 VeriSign, Inc. - For authorized use only, OU=VeriSign
-    // Trust Network
-    {{0x79, 0x7E, 0x51, 0xF8, 0x83, 0xE8, 0x55, 0xD0, 0x21, 0xE5, 0xC7,
-      0x70, 0x56, 0x66, 0x92, 0x99, 0x94, 0x07, 0x89, 0x55, 0x93, 0x23,
-      0x5D, 0xEF, 0x52, 0xA0, 0x11, 0xF7, 0x16, 0xF8, 0xB6, 0xBF}},
-    // C=US, ST=MN, L=Minneapolis, O=Open Access Technology International Inc,
-    // CN=OATI WebCARES Root CA
-    {{0x7A, 0x77, 0xC6, 0xC6, 0x1E, 0xEE, 0xB9, 0xAA, 0x65, 0xC4, 0xEA,
-      0x41, 0x0D, 0x65, 0xD8, 0x95, 0xB2, 0x6A, 0x81, 0x12, 0x32, 0x83,
-      0x00, 0x9D, 0xB1, 0x04, 0xB4, 0x8D, 0xE8, 0x0B, 0x24, 0x79}},
-    // C=CH, O=SwissSign AG, CN=SwissSign Gold Root CA - G3
-    {{0x7A, 0xF6, 0xEA, 0x9F, 0x75, 0x3A, 0x1E, 0x70, 0x9B, 0xD6, 0x4D,
-      0x0B, 0xEB, 0x86, 0x7C, 0x11, 0xE8, 0xC2, 0x95, 0xA5, 0x6E, 0x24,
-      0xA6, 0xE0, 0x47, 0x14, 0x59, 0xDC, 0xCD, 0xAA, 0x15, 0x58}},
-    // C=us, ST=Utah, L=Salt Lake City, O=Digital Signature Trust Co., OU=DSTCA
-    // X1, CN=DST RootCA X1/emailAddress=ca@digsigtrust.com
-    {{0x7B, 0x1A, 0x15, 0xD7, 0xE5, 0xE1, 0x30, 0xC5, 0x79, 0xE6, 0x8F,
-      0xCA, 0x18, 0x92, 0x57, 0xF8, 0x37, 0xB5, 0xC1, 0x88, 0xF1, 0xB2,
-      0xB2, 0xA7, 0x91, 0xE9, 0x67, 0xCC, 0x88, 0xCC, 0x65, 0x28}},
-    // C=AT, O=A-Trust, OU=A-Trust-nQual-01, CN=A-Trust-nQual-01
-    {{0x7B, 0x1F, 0x8D, 0x8E, 0xFF, 0x5D, 0x73, 0x49, 0xFE, 0xDB, 0x7E,
-      0xAE, 0x89, 0xC2, 0x9A, 0xAC, 0xC4, 0x17, 0x04, 0xF1, 0x50, 0x3A,
-      0xE3, 0xC8, 0xC2, 0xEB, 0xA1, 0x02, 0x25, 0xD0, 0xF5, 0x68}},
-    // C=US, O=DigiCert Inc, OU=www.digicert.com, CN=DigiCert Assured ID Root G2
-    {{0x7D, 0x05, 0xEB, 0xB6, 0x82, 0x33, 0x9F, 0x8C, 0x94, 0x51, 0xEE,
-      0x09, 0x4E, 0xEB, 0xFE, 0xFA, 0x79, 0x53, 0xA1, 0x14, 0xED, 0xB2,
-      0xF4, 0x49, 0x49, 0x45, 0x2F, 0xAB, 0x7D, 0x2F, 0xC1, 0x85}},
-    // C=ES, O=Colegio de Registradores de la Propiedad y Mercantiles de
-    // Espa\xC3\xB1a, OU=Certificado Propio, CN=Registradores de Espa\xC3\xB1a -
-    // CA Ra\xC3\xADz
-    {{0x7D, 0x2B, 0xF3, 0x48, 0x9E, 0xBC, 0x9A, 0xD3, 0x44, 0x8B, 0x8B,
-      0x08, 0x27, 0x71, 0x5A, 0x3C, 0xBF, 0xE3, 0xD5, 0x23, 0xE3, 0xB5,
-      0x6A, 0x9B, 0x5F, 0xC1, 0xD2, 0xA2, 0xDA, 0x2F, 0x20, 0xFE}},
-    // C=US, O=America Online Inc., CN=America Online Root Certification
-    // Authority 2
-    {{0x7D, 0x3B, 0x46, 0x5A, 0x60, 0x14, 0xE5, 0x26, 0xC0, 0xAF, 0xFC,
-      0xEE, 0x21, 0x27, 0xD2, 0x31, 0x17, 0x27, 0xAD, 0x81, 0x1C, 0x26,
-      0x84, 0x2D, 0x00, 0x6A, 0xF3, 0x73, 0x06, 0xCC, 0x80, 0xBD}},
-    // C=FR, O=Certplus, CN=Class 1 Primary CA
-    {{0x7D, 0x8C, 0xE8, 0x22, 0x22, 0x2B, 0x90, 0xC0, 0xB1, 0x43, 0x42,
-      0xC7, 0xA8, 0x14, 0x5D, 0x1F, 0x24, 0x35, 0x1F, 0x4D, 0x1A, 0x1F,
-      0xE0, 0xED, 0xFD, 0x31, 0x2E, 0xE7, 0x3F, 0xB0, 0x01, 0x49}},
-    // C=US, O=DigiCert Inc, OU=www.digicert.com, CN=DigiCert Assured ID Root G3
-    {{0x7E, 0x37, 0xCB, 0x8B, 0x4C, 0x47, 0x09, 0x0C, 0xAB, 0x36, 0x55,
-      0x1B, 0xA6, 0xF4, 0x5D, 0xB8, 0x40, 0x68, 0x0F, 0xBA, 0x16, 0x6A,
-      0x95, 0x2D, 0xB1, 0x00, 0x71, 0x7F, 0x43, 0x05, 0x3F, 0xC2}},
-    // C=HU, ST=Hungary, L=Budapest, O=NetLock Halozatbiztonsagi Kft.,
-    // OU=Tanusitvanykiadok, CN=NetLock Kozjegyzoi (Class A) Tanusitvanykiado
-    {{0x7F, 0x12, 0xCD, 0x5F, 0x7E, 0x5E, 0x29, 0x0E, 0xC7, 0xD8, 0x51,
-      0x79, 0xD5, 0xB7, 0x2C, 0x20, 0xA5, 0xBE, 0x75, 0x08, 0xFF, 0xDB,
-      0x5B, 0xF8, 0x1A, 0xB9, 0x68, 0x4A, 0x7F, 0xC9, 0xF6, 0x67}},
-    // C=ES, O=Agencia Notarial de Certificacion S.L. Unipersonal - CIF
-    // B83395988, CN=ANCERT Certificados CGN
-    {{0x81, 0x77, 0xD1, 0xA8, 0x2B, 0xA5, 0x01, 0xAF, 0xDD, 0x1E, 0x94,
-      0x83, 0xAD, 0x7D, 0xA9, 0x12, 0xEE, 0x1E, 0x9F, 0xCB, 0x2A, 0x5A,
-      0x06, 0x1F, 0xA3, 0xC4, 0x79, 0xFA, 0x80, 0x4C, 0xE6, 0xBA}},
-    // C=TR, O=Elektronik Bilgi Guvenligi A.S., CN=E-GUVEN Kok Elektronik
-    // Sertifika Hizmet Saglayicisi S3
-    {{0x82, 0xD4, 0x2D, 0xB3, 0xD6, 0x57, 0xF1, 0x94, 0x4E, 0x65, 0xC1,
-      0x92, 0xB1, 0xDD, 0x58, 0xDB, 0x8D, 0xF8, 0x41, 0x7B, 0x89, 0x16,
-      0x5B, 0x04, 0x5F, 0x5C, 0x6A, 0x70, 0xC5, 0xF8, 0x93, 0x9E}},
-    // O=Cisco Systems, CN=Cisco Root CA 2048
-    {{0x83, 0x27, 0xBC, 0x8C, 0x9D, 0x69, 0x94, 0x7B, 0x3D, 0xE3, 0xC2,
-      0x75, 0x11, 0x53, 0x72, 0x67, 0xF5, 0x9C, 0x21, 0xB9, 0xFA, 0x7B,
-      0x61, 0x3F, 0xAF, 0xBC, 0xCD, 0x53, 0xB7, 0x02, 0x40, 0x00}},
-    // C=US, O=VeriSign, Inc., OU=Class 3 Public Primary Certification Authority
-    // - G2, OU=(c) 1998 VeriSign, Inc. - For authorized use only, OU=VeriSign
-    // Trust Network
-    {{0x83, 0xCE, 0x3C, 0x12, 0x29, 0x68, 0x8A, 0x59, 0x3D, 0x48, 0x5F,
-      0x81, 0x97, 0x3C, 0x0F, 0x91, 0x95, 0x43, 0x1E, 0xDA, 0x37, 0xCC,
-      0x5E, 0x36, 0x43, 0x0E, 0x79, 0xC7, 0xA8, 0x88, 0x63, 0x8B}},
-    // C=US, ST=Washington, L=Redmond, O=Microsoft Corporation, CN=Microsoft
-    // Root Certificate Authority 2011
-    {{0x84, 0x7D, 0xF6, 0xA7, 0x84, 0x97, 0x94, 0x3F, 0x27, 0xFC, 0x72,
-      0xEB, 0x93, 0xF9, 0xA6, 0x37, 0x32, 0x0A, 0x02, 0xB5, 0x61, 0xD0,
-      0xA9, 0x1B, 0x09, 0xE8, 0x7A, 0x78, 0x07, 0xED, 0x7C, 0x61}},
-    // C=US, ST=Texas, L=Houston, O=SSL Corporation, CN=SSL.com Root
-    // Certification Authority RSA
-    {{0x85, 0x66, 0x6A, 0x56, 0x2E, 0xE0, 0xBE, 0x5C, 0xE9, 0x25, 0xC1,
-      0xD8, 0x89, 0x0A, 0x6F, 0x76, 0xA8, 0x7E, 0xC1, 0x6D, 0x4D, 0x7D,
-      0x5F, 0x29, 0xEA, 0x74, 0x19, 0xCF, 0x20, 0x12, 0x3B, 0x69}},
-    // C=BM, O=QuoVadis Limited, CN=QuoVadis Root CA 2
-    {{0x85, 0xA0, 0xDD, 0x7D, 0xD7, 0x20, 0xAD, 0xB7, 0xFF, 0x05, 0xF8,
-      0x3D, 0x54, 0x2B, 0x20, 0x9D, 0xC7, 0xFF, 0x45, 0x28, 0xF7, 0xD6,
-      0x77, 0xB1, 0x83, 0x89, 0xFE, 0xA5, 0xE5, 0xC4, 0x9E, 0x86}},
-    // C=BR, O=Certisign Certificadora Digital Ltda., OU=Certisign Autoridade
-    // Certificadora AC1S
-    {{0x85, 0xE0, 0xDF, 0xAE, 0x3E, 0x55, 0xA8, 0x43, 0x19, 0x5F, 0x8B,
-      0x08, 0xC8, 0x34, 0x90, 0x50, 0xE4, 0x68, 0x93, 0x72, 0xF6, 0xE1,
-      0x33, 0xAD, 0x0D, 0x19, 0x9A, 0xF9, 0x6E, 0x95, 0xCC, 0x08}},
-    // C=US, ST=UT, L=Salt Lake City, O=The USERTRUST Network,
-    // OU=http://www.usertrust.com, CN=UTN - DATACorp SGC
-    {{0x85, 0xFB, 0x2F, 0x91, 0xDD, 0x12, 0x27, 0x5A, 0x01, 0x45, 0xB6,
-      0x36, 0x53, 0x4F, 0x84, 0x02, 0x4A, 0xD6, 0x8B, 0x69, 0xB8, 0xEE,
-      0x88, 0x68, 0x4F, 0xF7, 0x11, 0x37, 0x58, 0x05, 0xB3, 0x48}},
-    // C=AT, O=A-Trust Ges. f. Sicherheitssysteme im elektr. Datenverkehr GmbH,
-    // OU=A-Trust-nQual-03, CN=A-Trust-nQual-03
-    {{0x86, 0x88, 0xE5, 0x8F, 0x4C, 0x7A, 0x94, 0x5F, 0xAD, 0xCE, 0x7F,
-      0x62, 0xBF, 0xEF, 0x52, 0x1B, 0x82, 0xDA, 0x7D, 0xC3, 0x8B, 0xFD,
-      0xB0, 0x16, 0x34, 0x78, 0xA5, 0xFE, 0x42, 0xE5, 0x78, 0x70}},
-    // C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting cc,
-    // OU=Certification Services Division, CN=Thawte Server
-    // CA/emailAddress=server-certs@thawte.com
-    {{0x87, 0xC6, 0x78, 0xBF, 0xB8, 0xB2, 0x5F, 0x38, 0xF7, 0xE9, 0x7B,
-      0x33, 0x69, 0x56, 0xBB, 0xCF, 0x14, 0x4B, 0xBA, 0xCA, 0xA5, 0x36,
-      0x47, 0xE6, 0x1A, 0x23, 0x25, 0xBC, 0x10, 0x55, 0x31, 0x6B}},
-    // C=ES, O=Agencia Catalana de Certificacio (NIF Q-0801176-I), OU=Serveis
-    // Publics de Certificacio, OU=Vegeu https://www.catcert.net/verarrel (c)03,
-    // OU=Jerarquia Entitats de Certificacio Catalanes, CN=EC-ACC
-    {{0x88, 0x49, 0x7F, 0x01, 0x60, 0x2F, 0x31, 0x54, 0x24, 0x6A, 0xE2,
-      0x8C, 0x4D, 0x5A, 0xEF, 0x10, 0xF1, 0xD8, 0x7E, 0xBB, 0x76, 0x62,
-      0x6F, 0x4A, 0xE0, 0xB7, 0xF9, 0x5B, 0xA7, 0x96, 0x87, 0x99}},
-    // DC=com, DC=microsoft, CN=Microsoft Root Certificate Authority
-    {{0x88, 0x5D, 0xE6, 0x4C, 0x34, 0x0E, 0x3E, 0xA7, 0x06, 0x58, 0xF0,
-      0x1E, 0x11, 0x45, 0xF9, 0x57, 0xFC, 0xDA, 0x27, 0xAA, 0xBE, 0xEA,
-      0x1A, 0xB9, 0xFA, 0xA9, 0xFD, 0xB0, 0x10, 0x2D, 0x40, 0x77}},
-    // C=BM, O=QuoVadis Limited, CN=QuoVadis Root CA 3 G3
-    {{0x88, 0xEF, 0x81, 0xDE, 0x20, 0x2E, 0xB0, 0x18, 0x45, 0x2E, 0x43,
-      0xF8, 0x64, 0x72, 0x5C, 0xEA, 0x5F, 0xBD, 0x1F, 0xC2, 0xD9, 0xD2,
-      0x05, 0x73, 0x07, 0x09, 0xC5, 0xD8, 0xB8, 0x69, 0x0F, 0x46}},
-    // C=SI, O=ACNLB
-    {{0x89, 0x4C, 0xE6, 0xDD, 0xB0, 0x12, 0xCB, 0x3F, 0x73, 0x69, 0x54,
-      0x66, 0x8D, 0xE6, 0x3F, 0x43, 0x60, 0x80, 0xE9, 0x5F, 0x17, 0xB7,
-      0xA8, 0x1B, 0xD9, 0x24, 0xEB, 0x21, 0xBE, 0xE9, 0xE4, 0x40}},
-    // C=US, O=U.S. Government, OU=FPKI, CN=Federal Common Policy CA
-    {{0x89, 0x4E, 0xBC, 0x0B, 0x23, 0xDA, 0x2A, 0x50, 0xC0, 0x18, 0x6B,
-      0x7F, 0x8F, 0x25, 0xEF, 0x1F, 0x6B, 0x29, 0x35, 0xAF, 0x32, 0xA9,
-      0x45, 0x84, 0xEF, 0x80, 0xAA, 0xF8, 0x77, 0xA3, 0xA0, 0x6E}},
-    // C=BM, O=QuoVadis Limited, CN=QuoVadis Root CA 1 G3
-    {{0x8A, 0x86, 0x6F, 0xD1, 0xB2, 0x76, 0xB5, 0x7E, 0x57, 0x8E, 0x92,
-      0x1C, 0x65, 0x82, 0x8A, 0x2B, 0xED, 0x58, 0xE9, 0xF2, 0xF2, 0x88,
-      0x05, 0x41, 0x34, 0xB7, 0xF1, 0xF4, 0xBF, 0xC9, 0xCC, 0x74}},
-    // C=SI, O=Halcom, CN=Halcom Root CA
-    {{0x8B, 0x3F, 0xDB, 0x15, 0x1A, 0xF7, 0x59, 0xC5, 0x66, 0x14, 0x3E,
-      0x07, 0xC9, 0x50, 0xED, 0xE4, 0xF9, 0xE8, 0xC7, 0xCF, 0x80, 0x84,
-      0x53, 0xD3, 0x3B, 0xCB, 0x78, 0xE5, 0x2A, 0x40, 0x0A, 0xF9}},
-    // C=CN, O=WoSign CA Limited, CN=CA WoSign ECC Root
-    {{0x8B, 0x45, 0xDA, 0x1C, 0x06, 0xF7, 0x91, 0xEB, 0x0C, 0xAB, 0xF2,
-      0x6B, 0xE5, 0x88, 0xF5, 0xFB, 0x23, 0x16, 0x5C, 0x2E, 0x61, 0x4B,
-      0xF8, 0x85, 0x56, 0x2D, 0x0D, 0xCE, 0x50, 0xB2, 0x9B, 0x02}},
-    // C=ES, O=Generalitat Valenciana, OU=PKIGVA, CN=Root CA Generalitat
-    // Valenciana
-    {{0x8C, 0x4E, 0xDF, 0xD0, 0x43, 0x48, 0xF3, 0x22, 0x96, 0x9E, 0x7E,
-      0x29, 0xA4, 0xCD, 0x4D, 0xCA, 0x00, 0x46, 0x55, 0x06, 0x1C, 0x16,
-      0xE1, 0xB0, 0x76, 0x42, 0x2E, 0xF3, 0x42, 0xAD, 0x63, 0x0E}},
-    // C=US, O=thawte, Inc., OU=Certification Services Division, OU=(c) 2006
-    // thawte, Inc. - For authorized use only, CN=thawte Primary Root CA
-    {{0x8D, 0x72, 0x2F, 0x81, 0xA9, 0xC1, 0x13, 0xC0, 0x79, 0x1D, 0xF1,
-      0x36, 0xA2, 0x96, 0x6D, 0xB2, 0x6C, 0x95, 0x0A, 0x97, 0x1D, 0xB4,
-      0x6B, 0x41, 0x99, 0xF4, 0xEA, 0x54, 0xB7, 0x8B, 0xFB, 0x9F}},
-    // C=DE, O=D-Trust GmbH, CN=D-TRUST Root Class 2 CA 2007
-    {{0x8D, 0xA7, 0x5F, 0x13, 0x27, 0x21, 0x7C, 0x88, 0x06, 0x0F, 0xD2,
-      0x52, 0x9E, 0xFF, 0x28, 0x16, 0xE5, 0x0B, 0x0C, 0x74, 0x54, 0x1E,
-      0xA4, 0xEA, 0x3D, 0xFC, 0xEE, 0x66, 0xA7, 0x1E, 0xFE, 0x09}},
-    // C=DE, ST=Hamburg, L=Hamburg, O=TC TrustCenter for Security in Data
-    // Networks GmbH, OU=TC TrustCenter Class 4
-    // CA/emailAddress=certificate@trustcenter.de
-    {{0x8D, 0xBB, 0x5A, 0x7C, 0x06, 0xC2, 0x0E, 0xF6, 0x2D, 0xD9, 0x12,
-      0xA3, 0x67, 0x40, 0x99, 0x2F, 0xF6, 0xE1, 0xE8, 0x58, 0x3D, 0x42,
-      0xED, 0xE2, 0x57, 0xC3, 0xAF, 0xFD, 0x7C, 0x76, 0x93, 0x99}},
-    // C=TR, L=Ankara, O=T\xC3\x9CRKTRUST Bilgi \xC4\xB0leti\xC5\x9Fim ve
-    // Bili\xC5\x9Fim G\xC3\xBCvenli\xC4\x9Fi Hizmetleri A.\xC5\x9E.,
-    // CN=T\xC3\x9CRKTRUST Elektronik Sertifika Hizmet
-    // Sa\xC4\x9Flay\xC4\xB1c\xC4\xB1s\xC4\xB1 H6
-    {{0x8D, 0xE7, 0x86, 0x55, 0xE1, 0xBE, 0x7F, 0x78, 0x47, 0x80, 0x0B,
-      0x93, 0xF6, 0x94, 0xD2, 0x1D, 0x36, 0x8C, 0xC0, 0x6E, 0x03, 0x3E,
-      0x7F, 0xAB, 0x04, 0xBB, 0x5E, 0xB9, 0x9D, 0xA6, 0xB7, 0x00}},
-    // C=HU, L=Budapest, O=Microsec Ltd., CN=Microsec e-Szigno Root CA
-    // 2009/emailAddress=info@e-szigno.hu
-    {{0x8E, 0x8C, 0x6E, 0xBF, 0x77, 0xDC, 0x73, 0xDB, 0x3E, 0x38, 0xE9,
-      0x3F, 0x48, 0x03, 0xE6, 0x2B, 0x6B, 0x59, 0x33, 0xBE, 0xB5, 0x1E,
-      0xE4, 0x15, 0x2F, 0x68, 0xD7, 0xAA, 0x14, 0x42, 0x6B, 0x31}},
-    // C=US, O=Amazon, CN=Amazon Root CA 1
-    {{0x8E, 0xCD, 0xE6, 0x88, 0x4F, 0x3D, 0x87, 0xB1, 0x12, 0x5B, 0xA3,
-      0x1A, 0xC3, 0xFC, 0xB1, 0x3D, 0x70, 0x16, 0xDE, 0x7F, 0x57, 0xCC,
-      0x90, 0x4F, 0xE1, 0xCB, 0x97, 0xC6, 0xAE, 0x98, 0x19, 0x6E}},
-    // CN=SG TRUST SERVICES RACINE, OU=0002 43525289500022, O=SG TRUST SERVICES,
-    // C=FR
-    {{0x8F, 0x1E, 0xCD, 0xAF, 0x29, 0xBC, 0xD5, 0x6E, 0xDD, 0xD6, 0xB5,
-      0xD5, 0x6A, 0x07, 0xFC, 0xAC, 0x2B, 0x74, 0xD4, 0xBC, 0xD1, 0x79,
-      0x17, 0x91, 0x44, 0xA0, 0x36, 0x5C, 0x27, 0xDC, 0xF1, 0x4B}},
-    // C=US, O=Digital Signature Trust Co., OU=DSTCA E2
-    {{0x8F, 0x62, 0xD7, 0x73, 0x6F, 0x99, 0xDB, 0xD3, 0x3E, 0xE0, 0x0E,
-      0x10, 0xC7, 0xE3, 0x29, 0x33, 0x9C, 0x98, 0x8A, 0x5B, 0x47, 0xEF,
-      0x25, 0xF4, 0x08, 0x29, 0x3C, 0xF2, 0x42, 0x6B, 0x4D, 0x44}},
-    // C=US, O=First Data Digital Certificates Inc., CN=First Data Digital
-    // Certificates Inc. Certification Authority
-    {{0x8F, 0x63, 0x3D, 0xF0, 0x19, 0x1A, 0x41, 0x7D, 0xCD, 0x4F, 0x63,
-      0x31, 0xF0, 0xE9, 0x0E, 0xB9, 0x47, 0x15, 0x8C, 0x8A, 0x3E, 0xA5,
-      0x9B, 0xFE, 0x81, 0x42, 0x00, 0x41, 0x31, 0x5E, 0xAC, 0x6C}},
-    // C=SE, O=Swedish Social Insurance Agency, CN=Swedish Government Root
-    // Authority v3
-    {{0x8F, 0x9A, 0xDB, 0x6D, 0x89, 0x5D, 0xAB, 0x5A, 0xDF, 0x5C, 0x3D,
-      0x3F, 0xAB, 0x83, 0x92, 0x7B, 0xE0, 0xFB, 0x64, 0xEF, 0x82, 0x48,
-      0x5C, 0x62, 0x28, 0x0D, 0x58, 0x4E, 0x8B, 0xD5, 0x5D, 0x22}},
-    // C=DE, ST=Hamburg, L=Hamburg, O=TC TrustCenter for Security in Data
-    // Networks GmbH, OU=TC TrustCenter Class 2
-    // CA/emailAddress=certificate@trustcenter.de
-    {{0x8F, 0x9E, 0x27, 0x51, 0xDC, 0xD5, 0x74, 0xE9, 0xBA, 0x90, 0xE7,
-      0x44, 0xEA, 0x92, 0x58, 0x1F, 0xD0, 0xAF, 0x64, 0x0A, 0xE8, 0x6A,
-      0xC1, 0xCE, 0x21, 0x98, 0xC9, 0x0F, 0x96, 0xB4, 0x48, 0x23}},
-    // C=KR, O=KISA, OU=Korea Certification Authority Central, CN=KISA RootCA 3
-    {{0x8F, 0xDD, 0x29, 0x8D, 0x1C, 0x93, 0xB2, 0x2B, 0xFC, 0x42, 0xAA,
-      0xB1, 0xC3, 0xA1, 0x5F, 0x0D, 0x01, 0x83, 0x2C, 0xA0, 0xA1, 0xAE,
-      0xF2, 0x8D, 0x56, 0x80, 0xF0, 0x6E, 0x6C, 0x7F, 0xD4, 0xEF}},
-    // C=BM, O=QuoVadis Limited, CN=QuoVadis Root CA 2 G3
-    {{0x8F, 0xE4, 0xFB, 0x0A, 0xF9, 0x3A, 0x4D, 0x0D, 0x67, 0xDB, 0x0B,
-      0xEB, 0xB2, 0x3E, 0x37, 0xC7, 0x1B, 0xF3, 0x25, 0xDC, 0xBC, 0xDD,
-      0x24, 0x0E, 0xA0, 0x4D, 0xAF, 0x58, 0xB4, 0x7E, 0x18, 0x40}},
-    // C=DE, O=D-Trust GmbH, CN=D-TRUST Root Class 3 CA 2007
-    {{0x90, 0xF3, 0xE0, 0x53, 0x96, 0x99, 0x5F, 0xF2, 0x09, 0x22, 0xC4,
-      0x45, 0x92, 0xDB, 0x62, 0xD7, 0x84, 0x5E, 0x1B, 0xF6, 0x4A, 0xEF,
-      0x51, 0x2C, 0xCA, 0x75, 0xBC, 0x66, 0x9C, 0xAA, 0x24, 0x79}},
-    // C=PA, ST=Panama, L=Panama City, O=TrustCor Systems S. de R.L.,
-    // OU=TrustCor Certificate Authority, CN=TrustCor RootCert CA-2
-    {{0x91, 0x11, 0x24, 0x07, 0x47, 0xE1, 0xF6, 0x52, 0xF6, 0x6D, 0x1F,
-      0x71, 0x2A, 0x11, 0xF6, 0x98, 0x96, 0x3B, 0x49, 0x17, 0x02, 0xE3,
-      0x12, 0xF7, 0x51, 0x3D, 0xA3, 0xD0, 0xFC, 0x1E, 0x5A, 0x28}},
-    // C=DE, O=T-Systems Enterprise Services GmbH, OU=T-Systems Trust Center,
-    // CN=T-TeleSec GlobalRoot Class 2
-    {{0x91, 0xE2, 0xF5, 0x78, 0x8D, 0x58, 0x10, 0xEB, 0xA7, 0xBA, 0x58,
-      0x73, 0x7D, 0xE1, 0x54, 0x8A, 0x8E, 0xCA, 0xCD, 0x01, 0x45, 0x98,
-      0xBC, 0x0B, 0x14, 0x3E, 0x04, 0x1B, 0x17, 0x05, 0x25, 0x52}},
-    // C=SK, L=Bratislava, O=Disig a.s., CN=CA Disig
-    {{0x92, 0xBF, 0x51, 0x19, 0xAB, 0xEC, 0xCA, 0xD0, 0xB1, 0x33, 0x2D,
-      0xC4, 0xE1, 0xD0, 0x5F, 0xBA, 0x75, 0xB5, 0x67, 0x90, 0x44, 0xEE,
-      0x0C, 0xA2, 0x6E, 0x93, 0x1F, 0x74, 0x4F, 0x2F, 0x33, 0xCF}},
-    // C=CN, O=UniTrust, CN=UCA Root
-    {{0x93, 0xE6, 0x5E, 0xC7, 0x62, 0xF0, 0x55, 0xDC, 0x71, 0x8A, 0x33,
-      0x25, 0x82, 0xC4, 0x1A, 0x04, 0x43, 0x0D, 0x72, 0xE3, 0xCB, 0x87,
-      0xE8, 0xB8, 0x97, 0xB6, 0x75, 0x16, 0xF0, 0xD1, 0xAA, 0x39}},
-    // C=KR, O=KISA, OU=ROOTCA, CN=CertRSA01
-    {{0x95, 0x60, 0x57, 0x51, 0x7F, 0xF3, 0xBB, 0x35, 0x04, 0x93, 0x42,
-      0x28, 0x8C, 0x1C, 0x9D, 0xCE, 0x85, 0x2D, 0xAC, 0xA6, 0x52, 0xB4,
-      0x65, 0xE9, 0x74, 0x72, 0x53, 0xB5, 0xF9, 0x3B, 0x1F, 0x5E}},
-    // C=CH, O=Swiss Government PKI, OU=www.pki.admin.ch, CN=Swiss Government
-    // Root CA III
-    {{0x95, 0x8A, 0xBB, 0xAE, 0xFF, 0x76, 0x0F, 0x4F, 0xBF, 0x66, 0xFF,
-      0x0F, 0x2C, 0x27, 0x08, 0xF4, 0x73, 0x9B, 0x2C, 0x68, 0x61, 0x27,
-      0x23, 0x9A, 0x2C, 0x4E, 0xC8, 0x7A, 0x68, 0xA9, 0x84, 0xC8}},
-    // O=Cybertrust, Inc, CN=Cybertrust Global Root
-    {{0x96, 0x0A, 0xDF, 0x00, 0x63, 0xE9, 0x63, 0x56, 0x75, 0x0C, 0x29,
-      0x65, 0xDD, 0x0A, 0x08, 0x67, 0xDA, 0x0B, 0x9C, 0xBD, 0x6E, 0x77,
-      0x71, 0x4A, 0xEA, 0xFB, 0x23, 0x49, 0xAB, 0x39, 0x3D, 0xA3}},
-    // CN=T\xC3\x9CRKTRUST Elektronik Sertifika Hizmet
-    // Sa\xC4\x9Flay\xC4\xB1c\xC4\xB1s\xC4\xB1, C=TR, L=Ankara,
-    // O=T\xC3\x9CRKTRUST Bilgi \xC4\xB0leti\xC5\x9Fim ve Bili\xC5\x9Fim
-    // G\xC3\xBCvenli\xC4\x9Fi Hizmetleri A.\xC5\x9E. (c) Aral\xC4\xB1k 2007
-    {{0x97, 0x8C, 0xD9, 0x66, 0xF2, 0xFA, 0xA0, 0x7B, 0xA7, 0xAA, 0x95,
-      0x00, 0xD9, 0xC0, 0x2E, 0x9D, 0x77, 0xF2, 0xCD, 0xAD, 0xA6, 0xAD,
-      0x6B, 0xA7, 0x4A, 0xF4, 0xB9, 0x1C, 0x66, 0x59, 0x3C, 0x50}},
-    // C=ES/serialNumber=Q2863006I, O=CONSEJO GENERAL DE LA ABOGACIA, CN=ACA
-    // ROOT
-    {{0x97, 0xF6, 0x54, 0x85, 0x9C, 0xBD, 0xE5, 0x86, 0xFD, 0x90, 0x31,
-      0x1E, 0x82, 0xEC, 0x79, 0x02, 0xC2, 0x38, 0xCB, 0xA0, 0xD6, 0xE5,
-      0x29, 0x56, 0x4C, 0x9C, 0x88, 0xF4, 0x48, 0x95, 0xEC, 0x50}},
-    // C=DE, O=Deutsche Telekom AG, OU=T-TeleSec Trust Center, CN=Deutsche
-    // Telekom Root CA 1
-    {{0x98, 0x06, 0xAB, 0x85, 0x09, 0xE2, 0xF3, 0x5E, 0x19, 0x2F, 0x27,
-      0x5F, 0x0C, 0x30, 0x8B, 0x94, 0x09, 0xB4, 0x25, 0x12, 0xF9, 0x0C,
-      0x65, 0x95, 0x98, 0xC2, 0x2B, 0xE6, 0x13, 0x96, 0x22, 0x72}},
-    // C=NO, O=Buypass AS-983163327, CN=Buypass Class 2 Root CA
-    {{0x9A, 0x11, 0x40, 0x25, 0x19, 0x7C, 0x5B, 0xB9, 0x5D, 0x94, 0xE6,
-      0x3D, 0x55, 0xCD, 0x43, 0x79, 0x08, 0x47, 0xB6, 0x46, 0xB2, 0x3C,
-      0xDF, 0x11, 0xAD, 0xA4, 0xA0, 0x0E, 0xFF, 0x15, 0xFB, 0x48}},
-    // CN=ACCVRAIZ1, OU=PKIACCV, O=ACCV, C=ES
-    {{0x9A, 0x6E, 0xC0, 0x12, 0xE1, 0xA7, 0xDA, 0x9D, 0xBE, 0x34, 0x19,
-      0x4D, 0x47, 0x8A, 0xD7, 0xC0, 0xDB, 0x18, 0x22, 0xFB, 0x07, 0x1D,
-      0xF1, 0x29, 0x81, 0x49, 0x6E, 0xD1, 0x04, 0x38, 0x41, 0x13}},
-    // C=US, O=VeriSign, Inc., OU=VeriSign Trust Network, OU=(c) 2006 VeriSign,
-    // Inc. - For authorized use only, CN=VeriSign Class 3 Public Primary
-    // Certification Authority - G5
-    {{0x9A, 0xCF, 0xAB, 0x7E, 0x43, 0xC8, 0xD8, 0x80, 0xD0, 0x6B, 0x26,
-      0x2A, 0x94, 0xDE, 0xEE, 0xE4, 0xB4, 0x65, 0x99, 0x89, 0xC3, 0xD0,
-      0xCA, 0xF1, 0x9B, 0xAF, 0x64, 0x05, 0xE4, 0x1A, 0xB7, 0xDF}},
-    // C=CN, O=UniTrust, CN=UCA Global G2 Root
-    {{0x9B, 0xEA, 0x11, 0xC9, 0x76, 0xFE, 0x01, 0x47, 0x64, 0xC1, 0xBE,
-      0x56, 0xA6, 0xF9, 0x14, 0xB5, 0xA5, 0x60, 0x31, 0x7A, 0xBD, 0x99,
-      0x88, 0x39, 0x33, 0x82, 0xE5, 0x16, 0x1A, 0xA0, 0x49, 0x3C}},
-    // C=SE, O=Swedish Social Insurance Agency, CN=Swedish Government Root
-    // Authority v2
-    {{0x9C, 0xEF, 0xB0, 0xCB, 0x7B, 0x74, 0xE6, 0x42, 0x93, 0x25, 0x32,
-      0x83, 0x1E, 0x0D, 0xC8, 0xF4, 0xD6, 0x8A, 0xD4, 0x14, 0x26, 0x1F,
-      0xC3, 0xF4, 0x74, 0xB7, 0x95, 0xE7, 0x2A, 0x16, 0x4E, 0x57}},
-    // C=EU, O=AC Camerfirma SA CIF A82743287, OU=http://www.chambersign.org,
-    // CN=Public Notary Root
-    {{0x9D, 0xB9, 0x30, 0xA7, 0xBC, 0xED, 0x5A, 0x59, 0x9D, 0xA6, 0x73,
-      0xD0, 0xBB, 0x12, 0xC4, 0xC6, 0xC7, 0xAB, 0x5B, 0x3F, 0x88, 0xF3,
-      0x9C, 0x24, 0xEE, 0x20, 0xA2, 0x47, 0x16, 0xB3, 0x79, 0xDF}},
-    // C=US, O=Digital Signature Trust Co., OU=DST (ANX Network) CA
-    {{0x9D, 0xF0, 0xEC, 0x44, 0xF5, 0x5B, 0x36, 0xD7, 0x9D, 0x4B, 0x53,
-      0xC2, 0x08, 0xBE, 0xF8, 0xCB, 0x63, 0xD7, 0x8D, 0xCC, 0x8F, 0xCA,
-      0xFD, 0xE1, 0x66, 0x23, 0x12, 0xF2, 0x12, 0x20, 0x4A, 0x37}},
-    // C=PL, O=Unizeto Technologies S.A., OU=Certum Certification Authority,
-    // CN=Certum Trusted Network CA 2
-    {{0x9F, 0x8B, 0x05, 0x13, 0x7F, 0x20, 0xAC, 0xDE, 0x9B, 0x99, 0x64,
-      0x10, 0xF4, 0xD0, 0xBF, 0x79, 0x71, 0xA1, 0x00, 0x6D, 0xC9, 0x9E,
-      0x09, 0x4C, 0x34, 0x6D, 0x27, 0x9B, 0x93, 0xCF, 0xF7, 0xAE}},
-    // C=US, O=GeoTrust Inc., CN=GeoTrust Universal CA 2
-    {{0xA0, 0x23, 0x4F, 0x3B, 0xC8, 0x52, 0x7C, 0xA5, 0x62, 0x8E, 0xEC,
-      0x81, 0xAD, 0x5D, 0x69, 0x89, 0x5D, 0xA5, 0x68, 0x0D, 0xC9, 0x1D,
-      0x1C, 0xB8, 0x47, 0x7F, 0x33, 0xF8, 0x78, 0xB9, 0x5B, 0x0B}},
-    // C=GR, L=Athens, O=Hellenic Academic and Research Institutions Cert.
-    // Authority, CN=Hellenic Academic and Research Institutions RootCA 2015
-    {{0xA0, 0x40, 0x92, 0x9A, 0x02, 0xCE, 0x53, 0xB4, 0xAC, 0xF4, 0xF2,
-      0xFF, 0xC6, 0x98, 0x1C, 0xE4, 0x49, 0x6F, 0x75, 0x5E, 0x6D, 0x45,
-      0xFE, 0x0B, 0x2A, 0x69, 0x2B, 0xCD, 0x52, 0x52, 0x3F, 0x36}},
-    // C=US, O=GeoTrust Inc., CN=GeoTrust Universal CA
-    {{0xA0, 0x45, 0x9B, 0x9F, 0x63, 0xB2, 0x25, 0x59, 0xF5, 0xFA, 0x5D,
-      0x4C, 0x6D, 0xB3, 0xF9, 0xF7, 0x2F, 0xF1, 0x93, 0x42, 0x03, 0x35,
-      0x78, 0xF0, 0x73, 0xBF, 0x1D, 0x1B, 0x46, 0xCB, 0xB9, 0x12}},
-    // C=PL, O=Krajowa Izba Rozliczeniowa S.A., CN=SZAFIR ROOT CA2
-    {{0xA1, 0x33, 0x9D, 0x33, 0x28, 0x1A, 0x0B, 0x56, 0xE5, 0x57, 0xD3,
-      0xD3, 0x2B, 0x1C, 0xE7, 0xF9, 0x36, 0x7E, 0xB0, 0x94, 0xBD, 0x5F,
-      0xA7, 0x2A, 0x7E, 0x50, 0x04, 0xC8, 0xDE, 0xD7, 0xCA, 0xFE}},
-    // C=LU, O=LuxTrust s.a., CN=LuxTrust Global Root
-    {{0xA1, 0xB2, 0xDB, 0xEB, 0x64, 0xE7, 0x06, 0xC6, 0x16, 0x9E, 0x3C,
-      0x41, 0x18, 0xB2, 0x3B, 0xAA, 0x09, 0x01, 0x8A, 0x84, 0x27, 0x66,
-      0x6D, 0x8B, 0xF0, 0xE2, 0x88, 0x91, 0xEC, 0x05, 0x19, 0x50}},
-    // C=CN, O=UniTrust, CN=UCA Global Root
-    {{0xA1, 0xF0, 0x5C, 0xCB, 0x80, 0xC2, 0xD7, 0x10, 0xEC, 0x7D, 0x47,
-      0x9A, 0xBD, 0xCB, 0xB8, 0x79, 0xE5, 0x8D, 0x7E, 0xDB, 0x71, 0x49,
-      0xFE, 0x78, 0xA8, 0x78, 0x84, 0xE3, 0xD0, 0xBA, 0xD0, 0xF9}},
-    // C=JP, O=SECOM Trust Systems CO.,LTD., OU=Security Communication EV
-    // RootCA1
-    {{0xA2, 0x2D, 0xBA, 0x68, 0x1E, 0x97, 0x37, 0x6E, 0x2D, 0x39, 0x7D,
-      0x72, 0x8A, 0xAE, 0x3A, 0x9B, 0x62, 0x96, 0xB9, 0xFD, 0xBA, 0x60,
-      0xBC, 0x2E, 0x11, 0xF6, 0x47, 0xF2, 0xC6, 0x75, 0xFB, 0x37}},
-    // C=ch, O=admin, OU=Services, OU=Certification Authorities,
-    // CN=Admin-Root-CA
-    {{0xA3, 0x1F, 0x09, 0x30, 0x53, 0xBD, 0x12, 0xC1, 0xF5, 0xC3, 0xC6,
-      0xEF, 0xD4, 0x98, 0x02, 0x3F, 0xD2, 0x91, 0x4D, 0x77, 0x58, 0xD0,
-      0x5D, 0x69, 0x8C, 0xE0, 0x84, 0xB5, 0x06, 0x26, 0xE0, 0xE5}},
-    // C=US, O=WFA Hotspot 2.0, CN=Hotspot 2.0 Trust Root CA - 03
-    {{0xA3, 0xCC, 0x68, 0x59, 0x5D, 0xFE, 0x7E, 0x86, 0xD8, 0xAD, 0x17,
-      0x72, 0xA8, 0xB5, 0x28, 0x4A, 0xDD, 0x54, 0xAC, 0xE3, 0xB8, 0xA7,
-      0x98, 0xDF, 0x47, 0xBC, 0xCA, 0xFB, 0x1F, 0xDB, 0x84, 0xDF}},
-    // C=CH, O=The Federal Authorities of the Swiss Confederation, OU=Services,
-    // OU=Certification Authorities, CN=Swiss Government Root CA II
-    {{0xA3, 0xD7, 0x43, 0x5A, 0x18, 0xC4, 0x6B, 0x23, 0xB6, 0xA4, 0xF8,
-      0x92, 0x9C, 0xD5, 0x90, 0x50, 0xC9, 0x16, 0x8B, 0x03, 0xA7, 0xFA,
-      0xD5, 0x32, 0x62, 0x6F, 0x29, 0x7C, 0xAC, 0x53, 0x56, 0xE4}},
-    // C=US, O=thawte, Inc., OU=(c) 2007 thawte, Inc. - For authorized use only,
-    // CN=thawte Primary Root CA - G2
-    {{0xA4, 0x31, 0x0D, 0x50, 0xAF, 0x18, 0xA6, 0x44, 0x71, 0x90, 0x37,
-      0x2A, 0x86, 0xAF, 0xAF, 0x8B, 0x95, 0x1F, 0xFB, 0x43, 0x1D, 0x83,
-      0x7F, 0x1E, 0x56, 0x88, 0xB4, 0x59, 0x71, 0xED, 0x15, 0x57}},
-    // C=BM, O=QuoVadis Limited, OU=Root Certification Authority, CN=QuoVadis
-    // Root Certification Authority
-    {{0xA4, 0x5E, 0xDE, 0x3B, 0xBB, 0xF0, 0x9C, 0x8A, 0xE1, 0x5C, 0x72,
-      0xEF, 0xC0, 0x72, 0x68, 0xD6, 0x93, 0xA2, 0x1C, 0x99, 0x6F, 0xD5,
-      0x1E, 0x67, 0xCA, 0x07, 0x94, 0x60, 0xFD, 0x6D, 0x88, 0x73}},
-    // C=US, O=VeriSign, Inc., OU=Class 3 Public Primary Certification Authority
-    {{0xA4, 0xB6, 0xB3, 0x99, 0x6F, 0xC2, 0xF3, 0x06, 0xB3, 0xFD, 0x86,
-      0x81, 0xBD, 0x63, 0x41, 0x3D, 0x8C, 0x50, 0x09, 0xCC, 0x4F, 0xA3,
-      0x29, 0xC2, 0xCC, 0xF0, 0xE2, 0xFA, 0x1B, 0x14, 0x03, 0x05}},
-    // C=US, O=GTE Corporation, OU=GTE CyberTrust Solutions, Inc., CN=GTE
-    // CyberTrust Global Root
-    {{0xA5, 0x31, 0x25, 0x18, 0x8D, 0x21, 0x10, 0xAA, 0x96, 0x4B, 0x02,
-      0xC7, 0xB7, 0xC6, 0xDA, 0x32, 0x03, 0x17, 0x08, 0x94, 0xE5, 0xFB,
-      0x71, 0xFF, 0xFB, 0x66, 0x67, 0xD5, 0xE6, 0x81, 0x0A, 0x36}},
-    // C=US, O=Wells Fargo WellsSecure, OU=Wells Fargo Bank NA, CN=WellsSecure
-    // Public Root Certificate Authority
-    {{0xA7, 0x12, 0x72, 0xAE, 0xAA, 0xA3, 0xCF, 0xE8, 0x72, 0x7F, 0x7F,
-      0xB3, 0x9F, 0x0F, 0xB3, 0xD1, 0xE5, 0x42, 0x6E, 0x90, 0x60, 0xB0,
-      0x6E, 0xE6, 0xF1, 0x3E, 0x9A, 0x3C, 0x58, 0x33, 0xCD, 0x43}},
-    // C=GR, O=Athens Exchange S.A., CN=ATHEX Root CA
-    {{0xA7, 0x35, 0x63, 0xE8, 0x59, 0xCB, 0xCF, 0xA1, 0x73, 0xCF, 0x32,
-      0x85, 0xDE, 0xBF, 0x25, 0x78, 0xED, 0xE1, 0x5D, 0x47, 0xA3, 0xBE,
-      0xE3, 0x85, 0x86, 0x1A, 0xB7, 0xA4, 0xFB, 0x6D, 0x7B, 0x6E}},
-    // C=TN, O=ANCE, OU=ANCE WEB, CN=Agence Nationale de Certification
-    // Electronique/emailAddress=ance@certification.tn
-    {{0xA7, 0x98, 0xA1, 0xC7, 0x0E, 0x9B, 0x6D, 0x50, 0xEA, 0xA5, 0x72,
-      0x4A, 0x26, 0xFA, 0xC7, 0x99, 0x18, 0x48, 0xED, 0xC6, 0x1B, 0xF4,
-      0x8D, 0x79, 0x81, 0x6B, 0xCA, 0xFB, 0x66, 0x97, 0x21, 0x28}},
-    // C=US, ST=DC, L=Washington, O=ABA.ECOM, INC., CN=ABA.ECOM Root
-    // CA/emailAddress=admin@digsigtrust.com
-    {{0xA9, 0xA9, 0xCA, 0x22, 0x89, 0x0D, 0x69, 0x49, 0x19, 0xC0, 0x95,
-      0xBB, 0x80, 0x64, 0xCB, 0xC4, 0xA5, 0x25, 0xA5, 0xDB, 0xFA, 0xF8,
-      0x01, 0xEC, 0x93, 0x5D, 0xBC, 0xCC, 0x07, 0xC8, 0xBA, 0xEE}},
-    // C=my, O=TM, OU=TM Applied Business Certification Authority, CN=TM Applied
-    // Business Root Certificate
-    {{0xA9, 0xC7, 0x7A, 0xF1, 0xBC, 0xDF, 0xAA, 0x37, 0x39, 0x44, 0x2B,
-      0x0B, 0x27, 0x34, 0xC6, 0x8E, 0xAF, 0x2E, 0x98, 0x33, 0xF0, 0xD7,
-      0x66, 0xFB, 0xCA, 0xA6, 0xF2, 0xAE, 0xB4, 0x2D, 0xEC, 0x02}},
-    // C=LV, O=VAS Latvijas Pasts - Vien.reg.Nr.40003052790, OU=Sertifikacijas
-    // pakalpojumi, CN=VAS Latvijas Pasts SSI(RCA)
-    {{0xAA, 0xD9, 0xCE, 0xED, 0x5A, 0xA6, 0xB1, 0xCE, 0xA2, 0x85, 0x96,
-      0xA8, 0xE4, 0xE1, 0xAB, 0xED, 0x93, 0x86, 0xD6, 0xEB, 0xC9, 0xD4,
-      0xAA, 0xD9, 0xAC, 0xDE, 0x0F, 0xA3, 0x6B, 0xA0, 0x69, 0xD0}},
-    // C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting cc,
-    // OU=Certification Services Division, CN=Thawte Premium Server
-    // CA/emailAddress=premium-server@thawte.com
-    {{0xAB, 0x70, 0x36, 0x36, 0x5C, 0x71, 0x54, 0xAA, 0x29, 0xC2, 0xC2,
-      0x9F, 0x5D, 0x41, 0x91, 0x16, 0x3B, 0x16, 0x2A, 0x22, 0x25, 0x01,
-      0x13, 0x57, 0xD5, 0x6D, 0x07, 0xFF, 0xA7, 0xBC, 0x1F, 0x72}},
-    // C=CZ, O=\xC4\x8Cesk\xC3\xA1 po\xC5\xA1ta, s.p. [I\xC4\x8C 47114983],
-    // CN=PostSignum Root QCA 2
-    {{0xAD, 0x01, 0x6F, 0x95, 0x80, 0x50, 0xE0, 0xE7, 0xE4, 0x6F, 0xAE,
-      0x7D, 0xCC, 0x50, 0x19, 0x7E, 0xD8, 0xE3, 0xFF, 0x0A, 0x4B, 0x26,
-      0x2E, 0x5D, 0xDC, 0xDB, 0x3E, 0xDD, 0xDC, 0x7D, 0x65, 0x78}},
-    // C=US, O=Wells Fargo WellsSecure, OU=Wells Fargo Bank NA, CN=WellsSecure
-    // Public Root Certification Authority 01 G2
-    {{0xAD, 0x75, 0x39, 0xE5, 0xCD, 0xC9, 0x85, 0xFA, 0x95, 0x24, 0x40,
-      0x55, 0xA9, 0x20, 0x2D, 0x63, 0x46, 0x0E, 0xC9, 0x21, 0x46, 0x7D,
-      0x03, 0x4C, 0xFD, 0xBE, 0x87, 0xEC, 0x6D, 0x00, 0xFE, 0xDC}},
-    // C=AT, O=A-Trust, OU=A-Trust-nQual-01, CN=A-Trust-nQual-01
-    {{0xAE, 0x2F, 0xEC, 0x82, 0x91, 0x18, 0xA2, 0x45, 0x5A, 0xD6, 0xA4,
-      0x15, 0xE7, 0x18, 0x23, 0xEB, 0x9B, 0x7B, 0x6E, 0x35, 0x78, 0xA5,
-      0x1A, 0xC8, 0xA5, 0x14, 0x46, 0xEA, 0xDB, 0xB0, 0x97, 0x9C}},
-    // CN=ComSign CA, O=ComSign, C=IL
-    {{0xAE, 0x44, 0x57, 0xB4, 0x0D, 0x9E, 0xDA, 0x96, 0x67, 0x7B, 0x0D,
-      0x3C, 0x92, 0xD5, 0x7B, 0x51, 0x77, 0xAB, 0xD7, 0xAC, 0x10, 0x37,
-      0x95, 0x83, 0x56, 0xD1, 0xE0, 0x94, 0x51, 0x8B, 0xE5, 0xF2}},
-    // C=JP, O=Japan Certification Services, Inc., CN=SecureSign RootCA3
-    {{0xAE, 0x92, 0xE9, 0x00, 0x00, 0x54, 0x1A, 0x9E, 0xBC, 0x10, 0x1B,
-      0x70, 0xB6, 0xC3, 0x3A, 0x62, 0xF5, 0xA5, 0x3A, 0x55, 0xBA, 0x81,
-      0x5E, 0x81, 0xD3, 0x1A, 0xBD, 0xDF, 0x03, 0x50, 0x7F, 0x5D}},
-    // C=JP, O=Japan Certification Services, Inc., CN=SecureSign RootCA2
-    {{0xAF, 0x6D, 0x08, 0xEE, 0xF3, 0xCA, 0xC4, 0xE1, 0x58, 0x4A, 0xBC,
-      0x63, 0xC8, 0xA9, 0x47, 0x2A, 0xC5, 0x29, 0xAF, 0x99, 0xF3, 0xF7,
-      0x91, 0x31, 0x9A, 0x43, 0x77, 0x60, 0x63, 0xF5, 0x8D, 0xCA}},
-    // L=Bogota AV Calle 26 N 68D-35, C=CO, O=Entidad de Certificacion Digital
-    // Abierta Certicamara S.A., CN=CERTICAMARA S.A.
-    {{0xAF, 0x71, 0xA3, 0xBC, 0xA3, 0x22, 0xE5, 0x22, 0x4D, 0xF5, 0x46,
-      0x89, 0x56, 0x96, 0xCE, 0x44, 0x9A, 0x8B, 0xD2, 0xBD, 0x13, 0x0F,
-      0x7A, 0x7A, 0xE4, 0x57, 0x76, 0x7F, 0x5C, 0x23, 0xD8, 0xF8}},
-    // O=RSA Security Inc, OU=RSA Security 2048 V3
-    {{0xAF, 0x8B, 0x67, 0x62, 0xA1, 0xE5, 0x28, 0x22, 0x81, 0x61, 0xA9,
-      0x5D, 0x5C, 0x55, 0x9E, 0xE2, 0x66, 0x27, 0x8F, 0x75, 0xD7, 0x9E,
-      0x83, 0x01, 0x89, 0xA5, 0x03, 0x50, 0x6A, 0xBD, 0x6B, 0x4C}},
-    // C=IT, L=Milano, O=Actalis S.p.A./03358520967, CN=Actalis Authentication
-    // CA G1
-    {{0xAF, 0xE8, 0x0A, 0x97, 0xEA, 0x11, 0x15, 0x91, 0x90, 0xE9, 0x27,
-      0xE0, 0x8E, 0xC2, 0xE6, 0x0C, 0x59, 0xA4, 0x05, 0x59, 0x48, 0x3A,
-      0x3F, 0xEE, 0x83, 0x8A, 0x85, 0x32, 0x1B, 0x3A, 0xEA, 0xAD}},
-    // O=eSign Australia, OU=Public Secure Services, CN=Primary Utility Root CA
-    {{0xB0, 0x4D, 0x70, 0x8F, 0x1A, 0xE0, 0x45, 0x62, 0x65, 0xDD, 0x1B,
-      0x66, 0x90, 0x7A, 0x26, 0x91, 0xA2, 0x86, 0x80, 0xB8, 0x53, 0xE0,
-      0x31, 0xDF, 0x3D, 0xF9, 0x08, 0x3A, 0xF7, 0x16, 0x14, 0xD7}},
-    // C=ES, O=IZENPE S.A. - CIF A-01337260-RMerc.Vitoria-Gasteiz T1055 F62 S8,
-    // L=Avda del Mediterraneo Etorbidea 3 - 01010 Vitoria-Gasteiz,
-    // CN=Izenpe.com/emailAddress=Info@izenpe.com
-    {{0xB0, 0x87, 0x7A, 0xEE, 0x2D, 0x39, 0x27, 0x4D, 0xF8, 0x31, 0xF6,
-      0x6F, 0xDE, 0xEB, 0x77, 0x17, 0x55, 0x7C, 0x25, 0x8F, 0xC9, 0xEB,
-      0x55, 0x23, 0x1A, 0x9F, 0x8A, 0x64, 0x7A, 0x75, 0x43, 0x3F}},
-    // C=TR, L=Ankara, O=E-Tu\xC4\x9Fra EBG Bili\xC5\x9Fim Teknolojileri ve
-    // Hizmetleri A.\xC5\x9E., OU=E-Tugra Sertifikasyon Merkezi, CN=E-Tugra
-    // Certification Authority
-    {{0xB0, 0xBF, 0xD5, 0x2B, 0xB0, 0xD7, 0xD9, 0xBD, 0x92, 0xBF, 0x5D,
-      0x4D, 0xC1, 0x3D, 0xA2, 0x55, 0xC0, 0x2C, 0x54, 0x2F, 0x37, 0x83,
-      0x65, 0xEA, 0x89, 0x39, 0x11, 0xF5, 0x5E, 0x55, 0xF2, 0x3C}},
-    // C=FR, O=NATIXIS, OU=0002 542044524, CN=CESAM
-    {{0xB2, 0x25, 0x99, 0x96, 0xFF, 0xF7, 0x35, 0xAB, 0x35, 0x01, 0x4E,
-      0xF6, 0x3F, 0x3D, 0x41, 0x31, 0x90, 0x07, 0x9D, 0xD0, 0x3A, 0x09,
-      0x62, 0x43, 0x26, 0x35, 0xA8, 0x69, 0x5F, 0x99, 0x53, 0x05}},
-    // C=SE, O=Carelink, CN=SITHS CA v3
-    {{0xB2, 0xF3, 0xC4, 0x21, 0x6A, 0xF7, 0xAF, 0xF7, 0x24, 0x62, 0x46,
-      0x6D, 0xC1, 0x3C, 0xD2, 0x81, 0x0D, 0xB8, 0xEE, 0xD8, 0x53, 0xEA,
-      0xBB, 0x9A, 0x06, 0x3A, 0x60, 0x8E, 0xFC, 0x18, 0xFB, 0xE8}},
-    // C=US, O=Symantec Corporation, OU=Symantec Trust Network, CN=Symantec
-    // Class 3 Public Primary Certification Authority - G6
-    {{0xB3, 0x23, 0x96, 0x74, 0x64, 0x53, 0x44, 0x2F, 0x35, 0x3E, 0x61,
-      0x62, 0x92, 0xBB, 0x20, 0xBB, 0xAA, 0x5D, 0x23, 0xB5, 0x46, 0x45,
-      0x0F, 0xDB, 0x9C, 0x54, 0xB8, 0x38, 0x61, 0x67, 0xD5, 0x29}},
-    // C=au, O=SecureNet CA Class B
-    {{0xB3, 0xC9, 0x62, 0xD3, 0x40, 0x19, 0xFB, 0x38, 0xAB, 0x9F, 0xE9,
-      0xC6, 0x23, 0x99, 0x74, 0x2A, 0xB2, 0x6C, 0x43, 0xC2, 0xD1, 0x8C,
-      0xE3, 0xF2, 0xB1, 0x3C, 0x14, 0x32, 0x1E, 0x52, 0x96, 0x4B}},
-    // x500UniqueIdentifier=SEC-830101-9V9, L=Alvaro Obregon, ST=Distrito
-    // Federal, C=MX/postalCode=01030/street=Insurgentes Sur 1940, CN=Autoridad
-    // Certificadora Raiz de la Secretaria de Economia, OU=Direccion General de
-    // Normatividad Mercantil, O=Secretaria de
-    // Economia/emailAddress=acrse@economia.gob.mx
-    {{0xB4, 0x1D, 0x51, 0x6A, 0x53, 0x51, 0xD4, 0x2D, 0xEE, 0xA1, 0x91,
-      0xFA, 0x6E, 0xDF, 0x2A, 0x67, 0xDE, 0xE2, 0xF3, 0x6D, 0xC9, 0x69,
-      0x01, 0x2C, 0x76, 0x66, 0x9E, 0x61, 0x6B, 0x90, 0x0D, 0xDF}},
-    // C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting cc,
-    // OU=Certification Services Division, CN=Thawte Server
-    // CA/emailAddress=server-certs@thawte.com
-    {{0xB4, 0x41, 0x0B, 0x73, 0xE2, 0xE6, 0xEA, 0xCA, 0x47, 0xFB, 0xC4,
-      0x2F, 0x8F, 0xA4, 0x01, 0x8A, 0xF4, 0x38, 0x1D, 0xC5, 0x4C, 0xFA,
-      0xA8, 0x44, 0x50, 0x46, 0x1E, 0xED, 0x09, 0x45, 0x4D, 0xE9}},
-    // C=US, O=GeoTrust Inc., OU=(c) 2008 GeoTrust Inc. - For authorized use
-    // only, CN=GeoTrust Primary Certification Authority - G3
-    {{0xB4, 0x78, 0xB8, 0x12, 0x25, 0x0D, 0xF8, 0x78, 0x63, 0x5C, 0x2A,
-      0xA7, 0xEC, 0x7D, 0x15, 0x5E, 0xAA, 0x62, 0x5E, 0xE8, 0x29, 0x16,
-      0xE2, 0xCD, 0x29, 0x43, 0x61, 0x88, 0x6C, 0xD1, 0xFB, 0xD4}},
-    // C=US, ST=Arizona, L=Scottsdale, O=Starfield Technologies, Inc.,
-    // OU=http://certificates.starfieldtech.com/repository/, CN=Starfield
-    // Services Root Certificate Authority
-    {{0xB5, 0xBD, 0x2C, 0xB7, 0x9C, 0xBD, 0x19, 0x07, 0x29, 0x8D, 0x6B,
-      0xDF, 0x48, 0x42, 0xE5, 0x16, 0xD8, 0xC7, 0x8F, 0xA6, 0xFC, 0x96,
-      0xD2, 0x5F, 0x71, 0xAF, 0x81, 0x4E, 0x16, 0xCC, 0x24, 0x5E}},
-    // C=DE, O=Deutsche Telekom AG, OU=T-TeleSec Trust Center, CN=Deutsche
-    // Telekom Root CA 2
-    {{0xB6, 0x19, 0x1A, 0x50, 0xD0, 0xC3, 0x97, 0x7F, 0x7D, 0xA9, 0x9B,
-      0xCD, 0xAA, 0xC8, 0x6A, 0x22, 0x7D, 0xAE, 0xB9, 0x67, 0x9E, 0xC7,
-      0x0B, 0xA3, 0xB0, 0xC9, 0xD9, 0x22, 0x71, 0xC1, 0x70, 0xD3}},
-    // C=ES, ST=Barcelona, L=Barcelona (see current address at
-    // https://www.anf.es/address/), O=ANF Autoridad de Certificaci\xC3\xB3n,
-    // OU=ANF Clase 1 CA/serialNumber=G63287510, CN=ANF Server CA
-    {{0xB6, 0x44, 0xD9, 0x55, 0xFF, 0xF2, 0x9B, 0x74, 0xE3, 0xB5, 0x68,
-      0x7E, 0x90, 0x8E, 0xE7, 0xC3, 0xC9, 0x19, 0x7B, 0xA3, 0x33, 0x6C,
-      0xC6, 0x32, 0x85, 0x31, 0xF6, 0xC0, 0x57, 0xD6, 0x77, 0xFD}},
-    // C=PL, O=Unizeto Technologies S.A., OU=Certum Certification Authority,
-    // CN=Certum Trusted Network CA 2
-    {{0xB6, 0x76, 0xF2, 0xED, 0xDA, 0xE8, 0x77, 0x5C, 0xD3, 0x6C, 0xB0,
-      0xF6, 0x3C, 0xD1, 0xD4, 0x60, 0x39, 0x61, 0xF4, 0x9E, 0x62, 0x65,
-      0xBA, 0x01, 0x3A, 0x2F, 0x03, 0x07, 0xB6, 0xD0, 0xB8, 0x04}},
-    // C=NO, O=Buypass AS-983163327, CN=Buypass Class 3 CA 1
-    {{0xB7, 0xB1, 0x2B, 0x17, 0x1F, 0x82, 0x1D, 0xAA, 0x99, 0x0C, 0xD0,
-      0xFE, 0x50, 0x87, 0xB1, 0x28, 0x44, 0x8B, 0xA8, 0xE5, 0x18, 0x4F,
-      0x84, 0xC5, 0x1E, 0x02, 0xB5, 0xC8, 0xFB, 0x96, 0x2B, 0x24}},
-    // C=FR, O=OpenTrust, CN=OpenTrust Root CA G3
-    {{0xB7, 0xC3, 0x62, 0x31, 0x70, 0x6E, 0x81, 0x07, 0x8C, 0x36, 0x7C,
-      0xB8, 0x96, 0x19, 0x8F, 0x1E, 0x32, 0x08, 0xDD, 0x92, 0x69, 0x49,
-      0xDD, 0x8F, 0x57, 0x09, 0xA4, 0x10, 0xF7, 0x5B, 0x62, 0x92}},
-    // C=MO, O=Macao Post, CN=Macao Post eSignTrust Root Certification Authority
-    {{0xB8, 0xBB, 0xE5, 0x23, 0xBF, 0xCA, 0x3B, 0x11, 0xD5, 0x0F, 0x73,
-      0xF7, 0xF1, 0x0B, 0x3E, 0xC8, 0xEC, 0x95, 0x8A, 0xA1, 0xDC, 0x86,
-      0xF6, 0x6D, 0x95, 0x41, 0x90, 0x7F, 0xF1, 0xA1, 0x10, 0xEF}},
-    // C=FR, ST=France, L=Paris, O=PM/SGDN, OU=DCSSI,
-    // CN=IGC/A/emailAddress=igca@sgdn.pm.gouv.fr
-    {{0xB9, 0xBE, 0xA7, 0x86, 0x0A, 0x96, 0x2E, 0xA3, 0x61, 0x1D, 0xAB,
-      0x97, 0xAB, 0x6D, 0xA3, 0xE2, 0x1C, 0x10, 0x68, 0xB9, 0x7D, 0x55,
-      0x57, 0x5E, 0xD0, 0xE1, 0x12, 0x79, 0xC1, 0x1C, 0x89, 0x32}},
-    // C=GR, O=Hellenic Academic and Research Institutions Cert. Authority,
-    // CN=Hellenic Academic and Research Institutions RootCA 2011
-    {{0xBC, 0x10, 0x4F, 0x15, 0xA4, 0x8B, 0xE7, 0x09, 0xDC, 0xA5, 0x42,
-      0xA7, 0xE1, 0xD4, 0xB9, 0xDF, 0x6F, 0x05, 0x45, 0x27, 0xE8, 0x02,
-      0xEA, 0xA9, 0x2D, 0x59, 0x54, 0x44, 0x25, 0x8A, 0xFE, 0x71}},
-    // L=ValiCert Validation Network, O=ValiCert, Inc., OU=ValiCert Class 3
-    // Policy Validation Authority,
-    // CN=http://www.valicert.com//emailAddress=info@valicert.com
-    {{0xBC, 0x23, 0xF9, 0x8A, 0x31, 0x3C, 0xB9, 0x2D, 0xE3, 0xBB, 0xFC,
-      0x3A, 0x5A, 0x9F, 0x44, 0x61, 0xAC, 0x39, 0x49, 0x4C, 0x4A, 0xE1,
-      0x5A, 0x9E, 0x9D, 0xF1, 0x31, 0xE9, 0x9B, 0x73, 0x01, 0x9A}},
-    // C=HK, O=Hongkong Post, CN=Hongkong Post Root CA
-    {{0xBC, 0xDD, 0x8D, 0xF4, 0x27, 0x63, 0x66, 0xD7, 0xFF, 0x4B, 0x68,
-      0x8D, 0xC8, 0x15, 0x00, 0xD8, 0xE9, 0x82, 0x52, 0xC0, 0x49, 0xC8,
-      0xFF, 0x1E, 0x8C, 0x82, 0xF2, 0xBA, 0xEC, 0x9D, 0x5C, 0x16}},
-    // C=US, O=AffirmTrust, CN=AffirmTrust Premium ECC
-    {{0xBD, 0x71, 0xFD, 0xF6, 0xDA, 0x97, 0xE4, 0xCF, 0x62, 0xD1, 0x64,
-      0x7A, 0xDD, 0x25, 0x81, 0xB0, 0x7D, 0x79, 0xAD, 0xF8, 0x39, 0x7E,
-      0xB4, 0xEC, 0xBA, 0x9C, 0x5E, 0x84, 0x88, 0x82, 0x14, 0x23}},
-    // C=CH, O=SwissSign AG, CN=SwissSign Silver CA - G2
-    {{0xBE, 0x6C, 0x4D, 0xA2, 0xBB, 0xB9, 0xBA, 0x59, 0xB6, 0xF3, 0x93,
-      0x97, 0x68, 0x37, 0x42, 0x46, 0xC3, 0xC0, 0x05, 0x99, 0x3F, 0xA9,
-      0x8F, 0x02, 0x0D, 0x1D, 0xED, 0xBE, 0xD4, 0x8A, 0x81, 0xD5}},
-    // C=TW, O=Chunghwa Telecom Co., Ltd., CN=ePKI EV SSL Certification
-    // Authority - G1
-    {{0xBE, 0xBC, 0xE5, 0x7D, 0xCB, 0x85, 0xF6, 0x0A, 0x93, 0xBF, 0xA5,
-      0x01, 0x9E, 0xDB, 0x1A, 0x29, 0x4B, 0xF6, 0xD8, 0x1F, 0x82, 0xD9,
-      0xB4, 0xE7, 0x1F, 0x50, 0x2F, 0x0B, 0x15, 0xA1, 0xFC, 0x08}},
-    // OU=GlobalSign ECC Root CA - R4, O=GlobalSign, CN=GlobalSign
-    {{0xBE, 0xC9, 0x49, 0x11, 0xC2, 0x95, 0x56, 0x76, 0xDB, 0x6C, 0x0A,
-      0x55, 0x09, 0x86, 0xD7, 0x6E, 0x3B, 0xA0, 0x05, 0x66, 0x7C, 0x44,
-      0x2C, 0x97, 0x62, 0xB4, 0xFB, 0xB7, 0x73, 0xDE, 0x22, 0x8C}},
-    // C=JP, O=Japan Certification Services, Inc., CN=SecureSign RootCA11
-    {{0xBF, 0x0F, 0xEE, 0xFB, 0x9E, 0x3A, 0x58, 0x1A, 0xD5, 0xF9, 0xE9,
-      0xDB, 0x75, 0x89, 0x98, 0x57, 0x43, 0xD2, 0x61, 0x08, 0x5C, 0x4D,
-      0x31, 0x4F, 0x6F, 0x5D, 0x72, 0x59, 0xAA, 0x42, 0x16, 0x12}},
-    // C=TW, O=TAIWAN-CA, OU=Root CA, CN=TWCA Root Certification Authority
-    {{0xBF, 0xD8, 0x8F, 0xE1, 0x10, 0x1C, 0x41, 0xAE, 0x3E, 0x80, 0x1B,
-      0xF8, 0xBE, 0x56, 0x35, 0x0E, 0xE9, 0xBA, 0xD1, 0xA6, 0xB9, 0xBD,
-      0x51, 0x5E, 0xDC, 0x5C, 0x6D, 0x5B, 0x87, 0x11, 0xAC, 0x44}},
-    // C=CN, O=GUANG DONG CERTIFICATE AUTHORITY CO.,LTD., CN=GDCA TrustAUTH R5
-    // ROOT
-    {{0xBF, 0xFF, 0x8F, 0xD0, 0x44, 0x33, 0x48, 0x7D, 0x6A, 0x8A, 0xA6,
-      0x0C, 0x1A, 0x29, 0x76, 0x7A, 0x9F, 0xC2, 0xBB, 0xB0, 0x5E, 0x42,
-      0x0F, 0x71, 0x3A, 0x13, 0xB9, 0x92, 0x89, 0x1D, 0x38, 0x93}},
-    // C=TW, O=Chunghwa Telecom Co., Ltd., OU=ePKI Root Certification Authority
-    {{0xC0, 0xA6, 0xF4, 0xDC, 0x63, 0xA2, 0x4B, 0xFD, 0xCF, 0x54, 0xEF,
-      0x2A, 0x6A, 0x08, 0x2A, 0x0A, 0x72, 0xDE, 0x35, 0x80, 0x3E, 0x2F,
-      0xF5, 0xFF, 0x52, 0x7A, 0xE5, 0xD8, 0x72, 0x06, 0xDF, 0xD5}},
-    // C=CL, ST=Region Metropolitana, L=Santiago, O=E-CERTCHILE, OU=Autoridad
-    // Certificadora/emailAddress=sclientes@ccs.cl, CN=E-CERT ROOT CA
-    {{0xC1, 0x09, 0xE0, 0xD1, 0xB6, 0x40, 0x00, 0xB0, 0x1E, 0x89, 0x4B,
-      0xDA, 0xA9, 0x55, 0xE1, 0xFF, 0x91, 0xB6, 0xD0, 0x84, 0xA8, 0x38,
-      0xD9, 0x0E, 0x04, 0x4B, 0x9E, 0x3F, 0xCD, 0x2A, 0x8B, 0xFA}},
-    // C=FR, O=Certplus, CN=Class 3 Primary CA
-    {{0xC1, 0xB1, 0x2F, 0x48, 0x00, 0x20, 0x33, 0x6E, 0x5B, 0x04, 0xF5,
-      0x20, 0xBC, 0x19, 0xC2, 0xE2, 0xE1, 0x0A, 0xB4, 0x2C, 0x9D, 0x92,
-      0x35, 0xF0, 0x5C, 0xBE, 0xC3, 0x3F, 0xFA, 0x4D, 0x4D, 0xEA}},
-    // C=GB, O=Trustis Limited, OU=Trustis FPS Root CA
-    {{0xC1, 0xB4, 0x82, 0x99, 0xAB, 0xA5, 0x20, 0x8F, 0xE9, 0x63, 0x0A,
-      0xCE, 0x55, 0xCA, 0x68, 0xA0, 0x3E, 0xDA, 0x5A, 0x51, 0x9C, 0x88,
-      0x02, 0xA0, 0xD3, 0xA6, 0x73, 0xBE, 0x8F, 0x8E, 0x55, 0x7D}},
-    // C=ES, L=C/ Muntaner 244 Barcelona, CN=Autoridad de Certificacion
-    // Firmaprofesional CIF A62634068/emailAddress=ca@firmaprofesional.com
-    {{0xC1, 0xCF, 0x0B, 0x52, 0x09, 0x64, 0x35, 0xE3, 0xF1, 0xB7, 0x1D,
-      0xAA, 0xEC, 0x45, 0x5A, 0x23, 0x11, 0xC8, 0x40, 0x4F, 0x55, 0x83,
-      0xA9, 0xE2, 0x13, 0xC6, 0x9D, 0x85, 0x7D, 0x94, 0x33, 0x05}},
-    // C=ES, ST=MADRID, L=MADRID, OU=see current address at
-    // www.camerfirma.com/address, OU=GLOBAL CHAMBERSIGN ROOT -
-    // 2016/serialNumber=A82743287/2.5.4.97=VATES-A82743287, O=AC CAMERFIRMA
-    // S.A., CN=GLOBAL CHAMBERSIGN ROOT - 2016
-    {{0xC1, 0xD8, 0x0C, 0xE4, 0x74, 0xA5, 0x11, 0x28, 0xB7, 0x7E, 0x79,
-      0x4A, 0x98, 0xAA, 0x2D, 0x62, 0xA0, 0x22, 0x5D, 0xA3, 0xF4, 0x19,
-      0xE5, 0xC7, 0xED, 0x73, 0xDF, 0xBF, 0x66, 0x0E, 0x71, 0x09}},
-    // C=HU, L=Budapest, O=NISZ Nemzeti Infokommunik\xC3\xA1ci\xC3\xB3s
-    // Szolg\xC3\xA1ltat\xC3\xB3 Zrt.,
-    // CN=F\xC5\x91tan\xC3\xBAs\xC3\xADtv\xC3\xA1nykiad\xC3\xB3 -
-    // Korm\xC3\xA1nyzati Hiteles\xC3\xADt\xC3\xA9s Szolg\xC3\xA1ltat\xC3\xB3
-    {{0xC2, 0x15, 0x73, 0x09, 0xD9, 0xAE, 0xE1, 0x7B, 0xF3, 0x4F, 0x4D,
-      0xF5, 0xE8, 0x8D, 0xBA, 0xEB, 0xA5, 0x7E, 0x03, 0x61, 0xEB, 0x81,
-      0x4C, 0xBC, 0x23, 0x9F, 0x4D, 0x54, 0xD3, 0x29, 0xA3, 0x8D}},
-    // C=CO, L=Carrera 9 16-21 Bogota, O=Certicamara S.A. Entidad de
-    // Certificacion, CN=Certificado Empresarial Clase-A
-    {{0xC2, 0x95, 0x9D, 0xB8, 0x33, 0x9E, 0x8D, 0xBC, 0xF6, 0x40, 0x9C,
-      0xA9, 0x2A, 0x66, 0xC4, 0x9F, 0xD2, 0xE3, 0x24, 0x94, 0x94, 0x0A,
-      0x90, 0x11, 0x43, 0xBD, 0x7E, 0xB7, 0x28, 0x27, 0xDE, 0xC2}},
-    // C=LT, O=Skaitmeninio sertifikavimo centras, OU=CA ROOT Services, CN=SSC
-    // GDL CA Root B
-    {{0xC3, 0x1E, 0xEF, 0x56, 0x82, 0xAB, 0xB5, 0x51, 0xEB, 0xC8, 0x28,
-      0xDE, 0xD8, 0x40, 0x98, 0x51, 0x8A, 0x67, 0x68, 0x52, 0x6D, 0x15,
-      0x2E, 0xE1, 0x64, 0xCF, 0xB9, 0x72, 0xA1, 0x42, 0x5D, 0x53}},
-    // C=IN, O=India PKI, CN=CCA India 2015 SPL
-    {{0xC3, 0x4C, 0x5D, 0xF5, 0x30, 0x80, 0x07, 0x8F, 0xFE, 0x45, 0xB2,
-      0x1A, 0x7F, 0x60, 0x04, 0x69, 0x91, 0x72, 0x04, 0xF4, 0xF0, 0x29,
-      0x3F, 0x1D, 0x72, 0x09, 0x39, 0x3E, 0x52, 0x65, 0xC0, 0x4F}},
-    // C=US, O=The Go Daddy Group, Inc., OU=Go Daddy Class 2 Certification
-    // Authority
-    {{0xC3, 0x84, 0x6B, 0xF2, 0x4B, 0x9E, 0x93, 0xCA, 0x64, 0x27, 0x4C,
-      0x0E, 0xC6, 0x7C, 0x1E, 0xCC, 0x5E, 0x02, 0x4F, 0xFC, 0xAC, 0xD2,
-      0xD7, 0x40, 0x19, 0x35, 0x0E, 0x81, 0xFE, 0x54, 0x6A, 0xE4}},
-    // C=US, ST=UT, L=Salt Lake City, O=The USERTRUST Network,
-    // OU=http://www.usertrust.com, CN=UTN-USERFirst-Network Applications
-    {{0xC3, 0x8D, 0xCB, 0x38, 0x95, 0x93, 0x93, 0x35, 0x86, 0x91, 0xEA,
-      0x4D, 0x4F, 0x3C, 0xE4, 0x95, 0xCE, 0x74, 0x89, 0x96, 0xE6, 0x4E,
-      0xD1, 0x89, 0x1D, 0x89, 0x7A, 0x0F, 0xC4, 0xDD, 0x55, 0xC6}},
-    // CN=T\xC3\x9CRKTRUST Elektronik Sertifika Hizmet
-    // Sa\xC4\x9Flay\xC4\xB1c\xC4\xB1s\xC4\xB1, C=TR, L=Ankara,
-    // O=T\xC3\x9CRKTRUST Bilgi \xC4\xB0leti\xC5\x9Fim ve Bili\xC5\x9Fim
-    // G\xC3\xBCvenli\xC4\x9Fi Hizmetleri A.\xC5\x9E. (c) Kas\xC4\xB1m 2005
-    {{0xC4, 0x70, 0xCF, 0x54, 0x7E, 0x23, 0x02, 0xB9, 0x77, 0xFB, 0x29,
-      0xDD, 0x71, 0xA8, 0x9A, 0x7B, 0x6C, 0x1F, 0x60, 0x77, 0x7B, 0x03,
-      0x29, 0xF5, 0x60, 0x17, 0xF3, 0x28, 0xBF, 0x4F, 0x6B, 0xE6}},
-    // CN=T\xC3\x9CRKTRUST Elektronik \xC4\xB0\xC5\x9Flem Hizmetleri, C=TR,
-    // L=ANKARA, O=(c) 2005 T\xC3\x9CRKTRUST Bilgi \xC4\xB0leti\xC5\x9Fim ve
-    // Bili\xC5\x9Fim G\xC3\xBCvenli\xC4\x9Fi Hizmetleri A.\xC5\x9E.
-    {{0xC4, 0x99, 0xF6, 0xCE, 0xCC, 0x5D, 0xA4, 0xD6, 0x1F, 0x14, 0xED,
-      0x04, 0x05, 0x27, 0x0C, 0x52, 0x49, 0xD0, 0xE7, 0x96, 0x15, 0xB0,
-      0xDA, 0x42, 0x65, 0x9E, 0xD2, 0xD7, 0xFF, 0xEF, 0x8A, 0x40}},
-    // C=US, O=VISA, OU=Visa International Service Association, CN=Visa
-    // Information Delivery Root CA
-    {{0xC5, 0x7A, 0x3A, 0xCB, 0xE8, 0xC0, 0x6B, 0xA1, 0x98, 0x8A, 0x83,
-      0x48, 0x5B, 0xF3, 0x26, 0xF2, 0x44, 0x87, 0x75, 0x37, 0x98, 0x49,
-      0xDE, 0x01, 0xCA, 0x43, 0x57, 0x1A, 0xF3, 0x57, 0xE7, 0x4B}},
-    // C=IL, O=StartCom Ltd., OU=Secure Digital Certificate Signing, CN=StartCom
-    // Certification Authority
-    {{0xC7, 0x66, 0xA9, 0xBE, 0xF2, 0xD4, 0x07, 0x1C, 0x86, 0x3A, 0x31,
-      0xAA, 0x49, 0x20, 0xE8, 0x13, 0xB2, 0xD1, 0x98, 0x60, 0x8C, 0xB7,
-      0xB7, 0xCF, 0xE2, 0x11, 0x43, 0xB8, 0x36, 0xDF, 0x09, 0xEA}},
-    // C=TN, CN=Tunisian Root Certificate Authority - TunRootCA2, O=National
-    // Digital Certification Agency
-    {{0xC7, 0x95, 0xFF, 0x8F, 0xF2, 0x0C, 0x96, 0x66, 0x88, 0xF0, 0x64,
-      0xA1, 0xE0, 0x91, 0x42, 0x1D, 0x31, 0x10, 0xA3, 0x45, 0x6C, 0x17,
-      0xEC, 0x24, 0x04, 0xB9, 0x98, 0x73, 0x87, 0x41, 0xF6, 0x22}},
-    // C=IL, O=StartCom Ltd., CN=StartCom Certification Authority G2
-    {{0xC7, 0xBA, 0x65, 0x67, 0xDE, 0x93, 0xA7, 0x98, 0xAE, 0x1F, 0xAA,
-      0x79, 0x1E, 0x71, 0x2D, 0x37, 0x8F, 0xAE, 0x1F, 0x93, 0xC4, 0x39,
-      0x7F, 0xEA, 0x44, 0x1B, 0xB7, 0xCB, 0xE6, 0xFD, 0x59, 0x95}},
-    // C=US, O=GeoTrust Inc., CN=GeoTrust Global CA 2
-    {{0xCA, 0x2D, 0x82, 0xA0, 0x86, 0x77, 0x07, 0x2F, 0x8A, 0xB6, 0x76,
-      0x4F, 0xF0, 0x35, 0x67, 0x6C, 0xFE, 0x3E, 0x5E, 0x32, 0x5E, 0x01,
-      0x21, 0x72, 0xDF, 0x3F, 0x92, 0x09, 0x6D, 0xB7, 0x9B, 0x85}},
-    // OU=GlobalSign Root CA - R2, O=GlobalSign, CN=GlobalSign
-    {{0xCA, 0x42, 0xDD, 0x41, 0x74, 0x5F, 0xD0, 0xB8, 0x1E, 0xB9, 0x02,
-      0x36, 0x2C, 0xF9, 0xD8, 0xBF, 0x71, 0x9D, 0xA1, 0xBD, 0x1B, 0x1E,
-      0xFC, 0x94, 0x6F, 0x5B, 0x4C, 0x99, 0xF4, 0x2C, 0x1B, 0x9E}},
-    // CN=Autoridad de Certificacion Raiz del Estado Venezolano, C=VE,
-    // L=Caracas, ST=Distrito Capital, O=Sistema Nacional de Certificacion
-    // Electronica, OU=Superintendencia de Servicios de Certificacion
-    // Electronica/emailAddress=acraiz@suscerte.gob.ve
-    {{0xCA, 0x7A, 0x5E, 0x68, 0xC5, 0x3D, 0x2C, 0x51, 0xF7, 0x2F, 0x6B,
-      0x46, 0x5D, 0x3E, 0xD7, 0x53, 0xF5, 0x90, 0x3E, 0xC7, 0x90, 0x1C,
-      0x8D, 0x0F, 0x55, 0xD8, 0x68, 0x33, 0x7C, 0x81, 0x97, 0x5A}},
-    // C=US, O=DigiCert Inc, OU=www.digicert.com, CN=DigiCert Global Root G2
-    {{0xCB, 0x3C, 0xCB, 0xB7, 0x60, 0x31, 0xE5, 0xE0, 0x13, 0x8F, 0x8D,
-      0xD3, 0x9A, 0x23, 0xF9, 0xDE, 0x47, 0xFF, 0xC3, 0x5E, 0x43, 0xC1,
-      0x14, 0x4C, 0xEA, 0x27, 0xD4, 0x6A, 0x5A, 0xB1, 0xCB, 0x5F}},
-    // OU=GlobalSign Root CA - R3, O=GlobalSign, CN=GlobalSign
-    {{0xCB, 0xB5, 0x22, 0xD7, 0xB7, 0xF1, 0x27, 0xAD, 0x6A, 0x01, 0x13,
-      0x86, 0x5B, 0xDF, 0x1C, 0xD4, 0x10, 0x2E, 0x7D, 0x07, 0x59, 0xAF,
-      0x63, 0x5A, 0x7C, 0xF4, 0x72, 0x0D, 0xC9, 0x63, 0xC5, 0x3B}},
-    // C=BR, O=ICP-Brasil, OU=Instituto Nacional de Tecnologia da Informacao -
-    // ITI, CN=Autoridade Certificadora Raiz Brasileira v1
-    {{0xCB, 0xD8, 0xED, 0x38, 0xD4, 0xA2, 0xD6, 0x77, 0xD4, 0x53, 0xD7,
-      0x0D, 0xD8, 0x89, 0x0A, 0xF4, 0xF6, 0x37, 0x4C, 0xBA, 0x62, 0x99,
-      0x94, 0x3F, 0x1A, 0xB3, 0xA6, 0x93, 0x6C, 0x6F, 0xD7, 0x95}},
-    // C=FR, O=Certplus, CN=Class 3P Primary CA
-    {{0xCC, 0xC8, 0x94, 0x89, 0x37, 0x1B, 0xAD, 0x11, 0x1C, 0x90, 0x61,
-      0x9B, 0xEA, 0x24, 0x0A, 0x2E, 0x6D, 0xAD, 0xD9, 0x9F, 0x9F, 0x6E,
-      0x1D, 0x4D, 0x41, 0xE5, 0x8E, 0xD6, 0xDE, 0x3D, 0x02, 0x85}},
-    // C=LV, OU=Sertifikacijas pakalpojumu dala, CN=E-ME SSI (RCA)
-    {{0xCD, 0x0B, 0x3B, 0x2A, 0xA1, 0x74, 0xB5, 0x5F, 0x18, 0xC7, 0x50,
-      0x2F, 0x3C, 0x3A, 0x76, 0xF2, 0x19, 0x81, 0x75, 0xCE, 0x45, 0x63,
-      0x73, 0x70, 0xCF, 0x4F, 0x48, 0xB9, 0xC2, 0xCE, 0x4F, 0xBF}},
-    // DC=rs, DC=posta, DC=ca, CN=Configuration, CN=Services, CN=Public Key
-    // Services, CN=AIA, CN=Posta CA Root
-    {{0xCD, 0x20, 0x12, 0x56, 0xFE, 0x5C, 0xED, 0x0B, 0xFF, 0xF8, 0xDF,
-      0x59, 0x5F, 0xFF, 0x36, 0xB1, 0x41, 0x6D, 0x53, 0x13, 0xA9, 0x99,
-      0xF5, 0x32, 0xEF, 0x4A, 0x99, 0x15, 0xDF, 0x96, 0xDE, 0xE0}},
-    // C=FR, O=Certplus, CN=Class 3TS Primary CA
-    {{0xCE, 0x7D, 0xD0, 0x96, 0xC8, 0xFD, 0xE2, 0xBF, 0x5C, 0x43, 0x8E,
-      0xDB, 0x57, 0x4B, 0xD6, 0x45, 0x43, 0x85, 0x33, 0x4E, 0xE8, 0xFF,
-      0x10, 0x6C, 0x0F, 0x93, 0xD5, 0x05, 0x1B, 0xE6, 0xBA, 0xC3}},
-    // C=US, OU=www.xrampsecurity.com, O=XRamp Security Services Inc, CN=XRamp
-    // Global Certification Authority
-    {{0xCE, 0xCD, 0xDC, 0x90, 0x50, 0x99, 0xD8, 0xDA, 0xDF, 0xC5, 0xB1,
-      0xD2, 0x09, 0xB7, 0x37, 0xCB, 0xE2, 0xC1, 0x8C, 0xFB, 0x2C, 0x10,
-      0xC0, 0xFF, 0x0B, 0xCF, 0x0D, 0x32, 0x86, 0xFC, 0x1A, 0xA2}},
-    // C=US, O=Equifax Secure Inc., CN=Equifax Secure eBusiness CA-1
-    {{0xCF, 0x56, 0xFF, 0x46, 0xA4, 0xA1, 0x86, 0x10, 0x9D, 0xD9, 0x65,
-      0x84, 0xB5, 0xEE, 0xB5, 0x8A, 0x51, 0x0C, 0x42, 0x75, 0xB0, 0xE5,
-      0xF9, 0x4F, 0x40, 0xBB, 0xAE, 0x86, 0x5E, 0x19, 0xF6, 0x73}},
-    // C=JP, O=LGPKI, CN=Application CA G4 Root
-    {{0xD1, 0xA0, 0x31, 0x90, 0x98, 0x03, 0x4E, 0x3A, 0xEC, 0x72, 0x9A,
-      0x0B, 0x5C, 0x31, 0x11, 0x22, 0x9D, 0x9D, 0x26, 0xE3, 0xE6, 0x23,
-      0xE8, 0xC5, 0xE6, 0x84, 0x3F, 0xA0, 0x6E, 0xE8, 0xE2, 0xE4}},
-    // O=Entrust.net, OU=www.entrust.net/CPS_2048 incorp. by ref. (limits
-    // liab.), OU=(c) 1999 Entrust.net Limited, CN=Entrust.net Certification
-    // Authority (2048)
-    {{0xD1, 0xC3, 0x39, 0xEA, 0x27, 0x84, 0xEB, 0x87, 0x0F, 0x93, 0x4F,
-      0xC5, 0x63, 0x4E, 0x4A, 0xA9, 0xAD, 0x55, 0x05, 0x01, 0x64, 0x01,
-      0xF2, 0x64, 0x65, 0xD3, 0x7A, 0x57, 0x46, 0x63, 0x35, 0x9F}},
-    // C=CZ, O=Prvn\xC3\xAD certifika\xC4\x8Dn\xC3\xAD autorita, a.s., CN=I.CA
-    // Root CA/RSA/serialNumber=NTRCZ-26439395
-    {{0xD3, 0xD6, 0x07, 0xA9, 0xFF, 0x24, 0xA1, 0x95, 0x23, 0xB6, 0xDA,
-      0x9D, 0x2C, 0x64, 0x94, 0x46, 0xF8, 0x78, 0x8C, 0xB9, 0x6D, 0x9F,
-      0xD1, 0x30, 0x97, 0x2E, 0x12, 0x0C, 0x13, 0x67, 0x77, 0x30}},
-    // C=PA, ST=Panama, L=Panama City, O=TrustCor Systems S. de R.L.,
-    // OU=TrustCor Certificate Authority, CN=TrustCor RootCert CA-1
-    {{0xD4, 0x0E, 0x9C, 0x86, 0xCD, 0x8F, 0xE4, 0x68, 0xC1, 0x77, 0x69,
-      0x59, 0xF4, 0x9E, 0xA7, 0x74, 0xFA, 0x54, 0x86, 0x84, 0xB6, 0xC4,
-      0x06, 0xF3, 0x90, 0x92, 0x61, 0xF4, 0xDC, 0xE2, 0x57, 0x5C}},
-    // C=NL, O=Staat der Nederlanden, CN=Staat der Nederlanden Root CA
-    {{0xD4, 0x1D, 0x82, 0x9E, 0x8C, 0x16, 0x59, 0x82, 0x2A, 0xF9, 0x3F,
-      0xCE, 0x62, 0xBF, 0xFC, 0xDE, 0x26, 0x4F, 0xC8, 0x4E, 0x8B, 0x95,
-      0x0C, 0x5F, 0xF2, 0x75, 0xD0, 0x52, 0x35, 0x46, 0x95, 0xA3}},
-    // C=CN, O=UniTrust, CN=UCA Extended Validation Root
-    {{0xD4, 0x3A, 0xF9, 0xB3, 0x54, 0x73, 0x75, 0x5C, 0x96, 0x84, 0xFC,
-      0x06, 0xD7, 0xD8, 0xCB, 0x70, 0xEE, 0x5C, 0x28, 0xE7, 0x73, 0xFB,
-      0x29, 0x4E, 0xB4, 0x1E, 0xE7, 0x17, 0x22, 0x92, 0x4D, 0x24}},
-    // C=CN, O=WoSign CA Limited, CN=Certification Authority of WoSign G2
-    {{0xD4, 0x87, 0xA5, 0x6F, 0x83, 0xB0, 0x74, 0x82, 0xE8, 0x5E, 0x96,
-      0x33, 0x94, 0xC1, 0xEC, 0xC2, 0xC9, 0xE5, 0x1D, 0x09, 0x03, 0xEE,
-      0x94, 0x6B, 0x02, 0xC3, 0x01, 0x58, 0x1E, 0xD9, 0x9E, 0x16}},
-    // C=FR, O=Dhimyotis, OU=0002 48146308100036, CN=Certigna Root CA
-    {{0xD4, 0x8D, 0x3D, 0x23, 0xEE, 0xDB, 0x50, 0xA4, 0x59, 0xE5, 0x51,
-      0x97, 0x60, 0x1C, 0x27, 0x77, 0x4B, 0x9D, 0x7B, 0x18, 0xC9, 0x4D,
-      0x5A, 0x05, 0x95, 0x11, 0xA1, 0x02, 0x50, 0xB9, 0x31, 0x68}},
-    // C=CN, O=WoSign CA Limited, CN=CA
-    // \xE6\xB2\x83\xE9\x80\x9A\xE6\xA0\xB9\xE8\xAF\x81\xE4\xB9\xA6
-    {{0xD6, 0xF0, 0x34, 0xBD, 0x94, 0xAA, 0x23, 0x3F, 0x02, 0x97, 0xEC,
-      0xA4, 0x24, 0x5B, 0x28, 0x39, 0x73, 0xE4, 0x47, 0xAA, 0x59, 0x0F,
-      0x31, 0x0C, 0x77, 0xF4, 0x8F, 0xDF, 0x83, 0x11, 0x22, 0x54}},
-    // C=GB, ST=Greater Manchester, L=Salford, O=Comodo CA Limited, CN=AAA
-    // Certificate Services
-    {{0xD7, 0xA7, 0xA0, 0xFB, 0x5D, 0x7E, 0x27, 0x31, 0xD7, 0x71, 0xE9,
-      0x48, 0x4E, 0xBC, 0xDE, 0xF7, 0x1D, 0x5F, 0x0C, 0x3E, 0x0A, 0x29,
-      0x48, 0x78, 0x2B, 0xC8, 0x3E, 0xE0, 0xEA, 0x69, 0x9E, 0xF4}},
-    // C=DE, O=Deutscher Sparkassen Verlag GmbH, OU=S-TRUST Certification
-    // Services, CN=S-TRUST Universal Root CA
-    {{0xD8, 0x0F, 0xEF, 0x91, 0x0A, 0xE3, 0xF1, 0x04, 0x72, 0x3B, 0x04,
-      0x5C, 0xEC, 0x2D, 0x01, 0x9F, 0x44, 0x1C, 0xE6, 0x21, 0x3A, 0xDF,
-      0x15, 0x67, 0x91, 0xE7, 0x0C, 0x17, 0x90, 0x11, 0x0A, 0x31}},
-    // C=PL, O=Unizeto Sp. z o.o., CN=Certum CA
-    {{0xD8, 0xE0, 0xFE, 0xBC, 0x1D, 0xB2, 0xE3, 0x8D, 0x00, 0x94, 0x0F,
-      0x37, 0xD2, 0x7D, 0x41, 0x34, 0x4D, 0x99, 0x3E, 0x73, 0x4B, 0x99,
-      0xD5, 0x65, 0x6D, 0x97, 0x78, 0xD4, 0xD8, 0x14, 0x36, 0x24}},
-    // C=ch, O=Swisscom, OU=Digital Certificate Services, CN=Swisscom Root EV CA
-    // 2
-    {{0xD9, 0x5F, 0xEA, 0x3C, 0xA4, 0xEE, 0xDC, 0xE7, 0x4C, 0xD7, 0x6E,
-      0x75, 0xFC, 0x6D, 0x1F, 0xF6, 0x2C, 0x44, 0x1F, 0x0F, 0xA8, 0xBC,
-      0x77, 0xF0, 0x34, 0xB1, 0x9E, 0x5D, 0xB2, 0x58, 0x01, 0x5D}},
-    // O=TeliaSonera, CN=TeliaSonera Root CA v1
-    {{0xDD, 0x69, 0x36, 0xFE, 0x21, 0xF8, 0xF0, 0x77, 0xC1, 0x23, 0xA1,
-      0xA5, 0x21, 0xC1, 0x22, 0x24, 0xF7, 0x22, 0x55, 0xB7, 0x3E, 0x03,
-      0xA7, 0x26, 0x06, 0x93, 0xE8, 0xA2, 0x4B, 0x0F, 0xA3, 0x89}},
-    // C=US, ST=FL, L=Jacksonville, O=Network Solutions L.L.C., CN=Network
-    // Solutions RSA Certificate Authority
-    {{0xDD, 0xBF, 0x14, 0x97, 0x33, 0xBC, 0x2B, 0xF8, 0xA0, 0x9D, 0x7F,
-      0x01, 0x2B, 0x01, 0xA6, 0xDE, 0xA1, 0x1D, 0x7B, 0xAE, 0x26, 0x71,
-      0x37, 0x83, 0xEF, 0x64, 0x07, 0xA2, 0x49, 0x5B, 0xF1, 0x89}},
-    // C=BE, O=Certipost s.a./n.v., CN=Certipost E-Trust TOP Root CA
-    {{0xDD, 0xFF, 0x53, 0xEC, 0xD7, 0x74, 0x3B, 0x60, 0xBB, 0x7B, 0x27,
-      0x95, 0xFF, 0x57, 0x32, 0xFA, 0x78, 0x5F, 0x9A, 0x14, 0xDF, 0x11,
-      0x20, 0xFB, 0x40, 0xA3, 0x8C, 0xF8, 0x4C, 0xA2, 0xA5, 0x66}},
-    // C=US, ST=Washington, L=Redmond, O=Microsoft Corporation, CN=Microsoft
-    // Root Certificate Authority 2010
-    {{0xDF, 0x54, 0x5B, 0xF9, 0x19, 0xA2, 0x43, 0x9C, 0x36, 0x98, 0x3B,
-      0x54, 0xCD, 0xFC, 0x90, 0x3D, 0xFA, 0x4F, 0x37, 0xD3, 0x99, 0x6D,
-      0x8D, 0x84, 0xB4, 0xC3, 0x1E, 0xEC, 0x6F, 0x3C, 0x16, 0x3E}},
-    // C=ES, ST=Barcelona, L=Barcelona (see current address at
-    // http://www.anf.es/es/address-direccion.html ), O=ANF Autoridad de
-    // Certificacion, OU=ANF Clase 1
-    // CA/emailAddress=info@anf.es/serialNumber=G63287510, CN=ANF Global Root CA
-    {{0xE0, 0xE1, 0x7A, 0xEA, 0x06, 0xCF, 0x9C, 0xE1, 0x2A, 0xAE, 0x81,
-      0x90, 0x34, 0x5A, 0x2C, 0x59, 0x72, 0x01, 0x30, 0xA7, 0xD8, 0xFF,
-      0x72, 0xF3, 0x74, 0x5A, 0xD7, 0x5D, 0xBA, 0xA3, 0x65, 0xB6}},
-    // C=SK, L=Bratislava, O=Disig a.s., CN=CA Disig Root R2
-    {{0xE2, 0x3D, 0x4A, 0x03, 0x6D, 0x7B, 0x70, 0xE9, 0xF5, 0x95, 0xB1,
-      0x42, 0x20, 0x79, 0xD2, 0xB9, 0x1E, 0xDF, 0xBB, 0x1F, 0xB6, 0x51,
-      0xA0, 0x63, 0x3E, 0xAA, 0x8A, 0x9D, 0xC5, 0xF8, 0x07, 0x03}},
-    // C=CN, O=CNNIC, CN=CNNIC ROOT
-    {{0xE2, 0x83, 0x93, 0x77, 0x3D, 0xA8, 0x45, 0xA6, 0x79, 0xF2, 0x08,
-      0x0C, 0xC7, 0xFB, 0x44, 0xA3, 0xB7, 0xA1, 0xC3, 0x79, 0x2C, 0xB7,
-      0xEB, 0x77, 0x29, 0xFD, 0xCB, 0x6A, 0x8D, 0x99, 0xAE, 0xA7}},
-    // C=US, O=Amazon, CN=Amazon Root CA 4
-    {{0xE3, 0x5D, 0x28, 0x41, 0x9E, 0xD0, 0x20, 0x25, 0xCF, 0xA6, 0x90,
-      0x38, 0xCD, 0x62, 0x39, 0x62, 0x45, 0x8D, 0xA5, 0xC6, 0x95, 0xFB,
-      0xDE, 0xA3, 0xC2, 0x2B, 0x0B, 0xFB, 0x25, 0x89, 0x70, 0x92}},
-    // C=US, O=VeriSign, Inc., OU=VeriSign Trust Network, OU=(c) 1999 VeriSign,
-    // Inc. - For authorized use only, CN=VeriSign Class 4 Public Primary
-    // Certification Authority - G3
-    {{0xE3, 0x89, 0x36, 0x0D, 0x0F, 0xDB, 0xAE, 0xB3, 0xD2, 0x50, 0x58,
-      0x4B, 0x47, 0x30, 0x31, 0x4E, 0x22, 0x2F, 0x39, 0xC1, 0x56, 0xA0,
-      0x20, 0x14, 0x4E, 0x8D, 0x96, 0x05, 0x61, 0x79, 0x15, 0x06}},
-    // C=FR, O=Dhimyotis, CN=Certigna
-    {{0xE3, 0xB6, 0xA2, 0xDB, 0x2E, 0xD7, 0xCE, 0x48, 0x84, 0x2F, 0x7A,
-      0xC5, 0x32, 0x41, 0xC7, 0xB7, 0x1D, 0x54, 0x14, 0x4B, 0xFB, 0x40,
-      0xC1, 0x1F, 0x3F, 0x1D, 0x0B, 0x42, 0xF5, 0xEE, 0xA1, 0x2D}},
-    // C=TR, L=Gebze - Kocaeli, O=T\xC3\xBCrkiye Bilimsel ve Teknolojik
-    // Ara\xC5\x9Ft\xC4\xB1rma Kurumu - T\xC3\x9CB\xC4\xB0TAK, OU=Ulusal
-    // Elektronik ve Kriptoloji Ara\xC5\x9Ft\xC4\xB1rma Enstit\xC3\xBCs\xC3\xBC
-    // - UEKAE, OU=Kamu Sertifikasyon Merkezi, CN=T\xC3\x9CB\xC4\xB0TAK UEKAE
-    // K\xC3\xB6k Sertifika Hizmet Sa\xC4\x9Flay\xC4\xB1c\xC4\xB1s\xC4\xB1 -
-    // S\xC3\xBCr\xC3\xBCm 3
-    {{0xE4, 0xC7, 0x34, 0x30, 0xD7, 0xA5, 0xB5, 0x09, 0x25, 0xDF, 0x43,
-      0x37, 0x0A, 0x0D, 0x21, 0x6E, 0x9A, 0x79, 0xB9, 0xD6, 0xDB, 0x83,
-      0x73, 0xA0, 0xC6, 0x9E, 0xB1, 0xCC, 0x31, 0xC7, 0xC5, 0x2A}},
-    // C=us, ST=Utah, L=Salt Lake City, O=Digital Signature Trust Co., OU=DSTCA
-    // X2, CN=DST RootCA X2/emailAddress=ca@digsigtrust.com
-    {{0xE5, 0x72, 0x10, 0xAB, 0x81, 0x2C, 0x8D, 0xF3, 0x08, 0x26, 0x7C,
-      0xB4, 0x29, 0x1B, 0x98, 0xE9, 0x56, 0x59, 0x7C, 0xA3, 0x6E, 0xC2,
-      0xB9, 0x51, 0x89, 0xEF, 0x17, 0x23, 0x39, 0x6B, 0xCA, 0xC8}},
-    // C=BR, O=Serasa S.A., OU=Serasa CA III, CN=Serasa Certificate Authority
-    // III
-    {{0xE5, 0xBD, 0xA8, 0x20, 0xE5, 0xCE, 0x15, 0xBF, 0xD0, 0x7B, 0xA1,
-      0x1F, 0xFB, 0x1C, 0x7C, 0x8A, 0x59, 0x10, 0xCE, 0x1B, 0x90, 0x17,
-      0x5C, 0x34, 0x30, 0x8B, 0xC2, 0x50, 0x04, 0x53, 0xCC, 0xDC}},
-    // C=KR, O=Government of Korea, OU=GPKI, CN=Root CA
-    {{0xE5, 0xC0, 0x1C, 0xB4, 0x09, 0x32, 0x79, 0xFA, 0xA1, 0x9F, 0xCF,
-      0xA2, 0x4E, 0xA4, 0x3E, 0xB1, 0xB2, 0x6D, 0x07, 0xA6, 0x15, 0xAD,
-      0xF7, 0x24, 0x01, 0x84, 0xA1, 0xE7, 0x16, 0xB7, 0x61, 0xC9}},
-    // C=TR, O=Elektronik Bilgi Guvenligi A.S., CN=e-Guven Kok Elektronik
-    // Sertifika Hizmet Saglayicisi
-    {{0xE6, 0x09, 0x07, 0x84, 0x65, 0xA4, 0x19, 0x78, 0x0C, 0xB6, 0xAC,
-      0x4C, 0x1C, 0x0B, 0xFB, 0x46, 0x53, 0xD9, 0xD9, 0xCC, 0x6E, 0xB3,
-      0x94, 0x6E, 0xB7, 0xF3, 0xD6, 0x99, 0x97, 0xBA, 0xD5, 0x98}},
-    // C=DE, O=TC TrustCenter GmbH, OU=TC TrustCenter Class 2 CA, CN=TC
-    // TrustCenter Class 2 CA II
-    {{0xE6, 0xB8, 0xF8, 0x76, 0x64, 0x85, 0xF8, 0x07, 0xAE, 0x7F, 0x8D,
-      0xAC, 0x16, 0x70, 0x46, 0x1F, 0x07, 0xC0, 0xA1, 0x3E, 0xEF, 0x3A,
-      0x1F, 0xF7, 0x17, 0x53, 0x8D, 0x7A, 0xBA, 0xD3, 0x91, 0xB4}},
-    // C=LT, O=Skaitmeninio sertifikavimo centras, OU=Certification Authority,
-    // CN=SSC Root CA C
-    {{0xE6, 0xE4, 0xA9, 0x51, 0xEC, 0xBF, 0x7D, 0x8E, 0xDC, 0x01, 0xBC,
-      0x87, 0x3F, 0x7B, 0x6F, 0xD3, 0x58, 0x68, 0xBD, 0xB1, 0x0E, 0xD7,
-      0x86, 0xF3, 0xA1, 0xB1, 0xEE, 0x16, 0xD8, 0xCE, 0xC3, 0xE9}},
-    // C=JP, O=SECOM Trust Systems CO.,LTD., CN=Security Communication ECC
-    // RootCA1
-    {{0xE7, 0x4F, 0xBD, 0xA5, 0x5B, 0xD5, 0x64, 0xC4, 0x73, 0xA3, 0x6B,
-      0x44, 0x1A, 0xA7, 0x99, 0xC8, 0xA6, 0x8E, 0x07, 0x74, 0x40, 0xE8,
-      0x28, 0x8B, 0x9F, 0xA1, 0xE5, 0x0E, 0x4B, 0xBA, 0xCA, 0x11}},
-    // C=JP, O=SECOM Trust.net, OU=Security Communication RootCA1
-    {{0xE7, 0x5E, 0x72, 0xED, 0x9F, 0x56, 0x0E, 0xEC, 0x6E, 0xB4, 0x80,
-      0x00, 0x73, 0xA4, 0x3F, 0xC3, 0xAD, 0x19, 0x19, 0x5A, 0x39, 0x22,
-      0x82, 0x01, 0x78, 0x95, 0x97, 0x4A, 0x99, 0x02, 0x6B, 0x6C}},
-    // C=US, O=VeriSign, Inc., OU=Class 3 Public Primary Certification Authority
-    {{0xE7, 0x68, 0x56, 0x34, 0xEF, 0xAC, 0xF6, 0x9A, 0xCE, 0x93, 0x9A,
-      0x6B, 0x25, 0x5B, 0x7B, 0x4F, 0xAB, 0xEF, 0x42, 0x93, 0x5B, 0x50,
-      0xA2, 0x65, 0xAC, 0xB5, 0xCB, 0x60, 0x27, 0xE4, 0x4E, 0x70}},
-    // C=US, ST=New Jersey, L=Jersey City, O=The USERTRUST Network, CN=USERTrust
-    // RSA Certification Authority
-    {{0xE7, 0x93, 0xC9, 0xB0, 0x2F, 0xD8, 0xAA, 0x13, 0xE2, 0x1C, 0x31,
-      0x22, 0x8A, 0xCC, 0xB0, 0x81, 0x19, 0x64, 0x3B, 0x74, 0x9C, 0x89,
-      0x89, 0x64, 0xB1, 0x74, 0x6D, 0x46, 0xC3, 0xD4, 0xCB, 0xD2}},
-    // C=us, ST=Utah, L=Salt Lake City, O=Digital Signature Trust Co., OU=United
-    // Parcel Service, CN=DST (UPS) RootCA/emailAddress=ca@digsigtrust.com
-    {{0xE8, 0x73, 0xD4, 0x08, 0x2A, 0x7B, 0x46, 0x32, 0x93, 0x4F, 0x48,
-      0xA5, 0xCC, 0x1E, 0xE5, 0x00, 0x93, 0x2F, 0x66, 0x1E, 0x56, 0xC3,
-      0x46, 0x7C, 0x5C, 0x84, 0xD3, 0x14, 0x47, 0x47, 0x6B, 0x0C}},
-    // C=AT, O=A-Trust Ges. f\xFCr Sicherheitssysteme im elektr. Datenverkehr
-    // GmbH, OU=A-Trust-Qual-01, CN=A-Trust-Qual-01
-    {{0xE8, 0xA2, 0xF4, 0x41, 0x65, 0x76, 0x78, 0x97, 0x5F, 0x2B, 0x97,
-      0xD7, 0x75, 0x71, 0x9C, 0x7D, 0x49, 0xD9, 0x22, 0x34, 0x55, 0x45,
-      0x40, 0xEC, 0x14, 0xD9, 0x2E, 0x16, 0xFE, 0x27, 0xD2, 0xCB}},
-    // C=BR, O=Certisign Certificadora Digital Ltda., OU=Certisign - Autoridade
-    // Certificadora - AC2
-    {{0xE8, 0xB2, 0x8D, 0x2A, 0x3D, 0x81, 0xF6, 0x3B, 0x4E, 0x44, 0x67,
-      0xC2, 0x19, 0x0A, 0x63, 0x1F, 0xC0, 0x62, 0x35, 0x3B, 0x5F, 0x2D,
-      0x25, 0x85, 0x1D, 0xDA, 0x6B, 0x64, 0x4A, 0xC7, 0x8B, 0x3F}},
-    // C=DE, O=D-Trust GmbH, CN=D-TRUST Qualified Root CA 1 2007:PN
-    {{0xE8, 0xC6, 0xAA, 0x6B, 0x5F, 0x58, 0xA8, 0xF2, 0xA6, 0x36, 0x5C,
-      0xF9, 0x8E, 0x65, 0x69, 0x35, 0x63, 0xA3, 0x8B, 0x7B, 0x2F, 0x32,
-      0xCF, 0x1B, 0xE0, 0x6F, 0x2D, 0x22, 0x29, 0xD4, 0xBF, 0x59}},
-    // C=BG, O=InfoNotary PLC, DC=root-ca, CN=InfoNotary CSP Root, OU=InfoNotary
-    // CSP Root/emailAddress=csp@infonotary.com
-    {{0xEA, 0x7E, 0x31, 0x2E, 0xCE, 0x48, 0x7B, 0x4C, 0x0A, 0xA6, 0x3C,
-      0xC8, 0x0A, 0xB9, 0xFC, 0xB3, 0x3C, 0x72, 0x05, 0x73, 0xF8, 0x94,
-      0x5F, 0x77, 0x61, 0x74, 0x5F, 0xC6, 0x38, 0x63, 0xD3, 0x9D}},
-    // C=RO, O=certSIGN, OU=certSIGN ROOT CA
-    {{0xEA, 0xA9, 0x62, 0xC4, 0xFA, 0x4A, 0x6B, 0xAF, 0xEB, 0xE4, 0x15,
-      0x19, 0x6D, 0x35, 0x1C, 0xCD, 0x88, 0x8D, 0x4F, 0x53, 0xF3, 0xFA,
-      0x8A, 0xE6, 0xD7, 0xC4, 0x66, 0xA9, 0x4E, 0x60, 0x42, 0xBB}},
-    // C=CH, O=admin, OU=Services, OU=Certification Authorities,
-    // CN=AdminCA-CD-T01
-    {{0xEA, 0xC0, 0x22, 0x0C, 0x5C, 0x9F, 0xEC, 0xC5, 0x12, 0x1D, 0x37,
-      0x20, 0x87, 0x2D, 0x06, 0x70, 0x7B, 0x52, 0x66, 0xBE, 0x25, 0xD4,
-      0xEB, 0xB5, 0x6A, 0xB8, 0x04, 0xBB, 0xBF, 0x85, 0xFE, 0x03}},
-    // C=US, O=VeriSign, Inc., OU=VeriSign Trust Network, OU=(c) 1999 VeriSign,
-    // Inc. - For authorized use only, CN=VeriSign Class 3 Public Primary
-    // Certification Authority - G3
-    {{0xEB, 0x04, 0xCF, 0x5E, 0xB1, 0xF3, 0x9A, 0xFA, 0x76, 0x2F, 0x2B,
-      0xB1, 0x20, 0xF2, 0x96, 0xCB, 0xA5, 0x20, 0xC1, 0xB9, 0x7D, 0xB1,
-      0x58, 0x95, 0x65, 0xB8, 0x1C, 0xB9, 0xA1, 0x7B, 0x72, 0x44}},
-    // C=HU, L=Budapest, O=NetLock Kft.,
-    // OU=Tan\xC3\xBAs\xC3\xADtv\xC3\xA1nykiad\xC3\xB3k (Certification
-    // Services), CN=NetLock Platina (Class Platinum)
-    // F\xC5\x91tan\xC3\xBAs\xC3\xADtv\xC3\xA1ny
-    {{0xEB, 0x7E, 0x05, 0xAA, 0x58, 0xE7, 0xBD, 0x32, 0x8A, 0x28, 0x2B,
-      0xF8, 0x86, 0x70, 0x33, 0xF3, 0xC0, 0x35, 0x34, 0x2B, 0x51, 0x6E,
-      0xE8, 0x5C, 0x01, 0x67, 0x3D, 0xFF, 0xFF, 0xBB, 0xFE, 0x58}},
-    // C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA
-    {{0xEB, 0xD4, 0x10, 0x40, 0xE4, 0xBB, 0x3E, 0xC7, 0x42, 0xC9, 0xE3,
-      0x81, 0xD3, 0x1E, 0xF2, 0xA4, 0x1A, 0x48, 0xB6, 0x68, 0x5C, 0x96,
-      0xE7, 0xCE, 0xF3, 0xC1, 0xDF, 0x6C, 0xD4, 0x33, 0x1C, 0x99}},
-    // C=DE, O=TC TrustCenter GmbH, OU=TC TrustCenter Universal CA, CN=TC
-    // TrustCenter Universal CA I
-    {{0xEB, 0xF3, 0xC0, 0x2A, 0x87, 0x89, 0xB1, 0xFB, 0x7D, 0x51, 0x19,
-      0x95, 0xD6, 0x63, 0xB7, 0x29, 0x06, 0xD9, 0x13, 0xCE, 0x0D, 0x5E,
-      0x10, 0x56, 0x8A, 0x8A, 0x77, 0xE2, 0x58, 0x61, 0x67, 0xE7}},
-    // emailAddress=pki@sk.ee, C=EE, O=AS Sertifitseerimiskeskus, CN=Juur-SK
-    {{0xEC, 0xC3, 0xE9, 0xC3, 0x40, 0x75, 0x03, 0xBE, 0xE0, 0x91, 0xAA,
-      0x95, 0x2F, 0x41, 0x34, 0x8F, 0xF8, 0x8B, 0xAA, 0x86, 0x3B, 0x22,
-      0x64, 0xBE, 0xFA, 0xC8, 0x07, 0x90, 0x15, 0x74, 0xE9, 0x39}},
-    // C=NO, O=Buypass AS-983163327, CN=Buypass Class 3 Root CA
-    {{0xED, 0xF7, 0xEB, 0xBC, 0xA2, 0x7A, 0x2A, 0x38, 0x4D, 0x38, 0x7B,
-      0x7D, 0x40, 0x10, 0xC6, 0x66, 0xE2, 0xED, 0xB4, 0x84, 0x3E, 0x4C,
-      0x29, 0xB4, 0xAE, 0x1D, 0x5B, 0x93, 0x32, 0xE6, 0xB2, 0x4D}},
-    // C=DE, O=D-Trust GmbH, CN=D-TRUST Root Class 3 CA 2 EV 2009
-    {{0xEE, 0xC5, 0x49, 0x6B, 0x98, 0x8C, 0xE9, 0x86, 0x25, 0xB9, 0x34,
-      0x09, 0x2E, 0xEC, 0x29, 0x08, 0xBE, 0xD0, 0xB0, 0xF3, 0x16, 0xC2,
-      0xD4, 0x73, 0x0C, 0x84, 0xEA, 0xF1, 0xF3, 0xD3, 0x48, 0x81}},
-    // C=ES, ST=Madrid, L=Madrid, O=IPS Certification Authority s.l. ipsCA,
-    // OU=ipsCA, CN=ipsCA Main CA Root/emailAddress=main01@ipsca.com
-    {{0xEE, 0xFC, 0xA8, 0x88, 0xDB, 0x44, 0x2C, 0xEA, 0x1F, 0x03, 0xFA,
-      0xC5, 0xDE, 0x5B, 0x1A, 0xF2, 0x10, 0xAE, 0x03, 0xF5, 0xE1, 0x65,
-      0x8D, 0xDB, 0x88, 0x0C, 0x64, 0x5E, 0x78, 0x62, 0x45, 0x46}},
-    // C=EU, O=AC Camerfirma SA CIF A82743287, OU=http://www.chambersign.org,
-    // CN=Global Chambersign Root
-    {{0xEF, 0x3C, 0xB4, 0x17, 0xFC, 0x8E, 0xBF, 0x6F, 0x97, 0x87, 0x6C,
-      0x9E, 0x4E, 0xCE, 0x39, 0xDE, 0x1E, 0xA5, 0xFE, 0x64, 0x91, 0x41,
-      0xD1, 0x02, 0x8B, 0x7D, 0x11, 0xC0, 0xB2, 0x29, 0x8C, 0xED}},
-    // C=BE, O=Certipost s.a./n.v., CN=Certipost E-Trust Primary Normalised CA
-    {{0xF0, 0x03, 0x55, 0xEE, 0xF1, 0x01, 0xC7, 0xDF, 0x4E, 0x46, 0xCC,
-      0xE6, 0x41, 0x7D, 0xFF, 0xCE, 0x3D, 0xB8, 0x2D, 0xBB, 0x13, 0x69,
-      0xC3, 0xB4, 0x39, 0xC4, 0xE3, 0x3B, 0xEE, 0x44, 0x5C, 0x42}},
-    // C=FI, ST=Finland, O=Vaestorekisterikeskus CA, OU=Certification Authority
-    // Services, OU=Varmennepalvelut, CN=VRK Gov. Root CA
-    {{0xF0, 0x08, 0x73, 0x3E, 0xC5, 0x00, 0xDC, 0x49, 0x87, 0x63, 0xCC,
-      0x92, 0x64, 0xC6, 0xFC, 0xEA, 0x40, 0xEC, 0x22, 0x00, 0x0E, 0x92,
-      0x7D, 0x05, 0x3C, 0xE9, 0xC9, 0x0B, 0xFA, 0x04, 0x6C, 0xB2}},
-    // C=ch, O=Swisscom, OU=Digital Certificate Services, CN=Swisscom Root CA 2
-    {{0xF0, 0x9B, 0x12, 0x2C, 0x71, 0x14, 0xF4, 0xA0, 0x9B, 0xD4, 0xEA,
-      0x4F, 0x4A, 0x99, 0xD5, 0x58, 0xB4, 0x6E, 0x4C, 0x25, 0xCD, 0x81,
-      0x14, 0x0D, 0x29, 0xC0, 0x56, 0x13, 0x91, 0x4C, 0x38, 0x41}},
-    // C=LT, O=Skaitmeninio sertifikavimo centras, OU=Certification Authority,
-    // CN=SSC Root CA A
-    {{0xF1, 0xB1, 0x3F, 0x5C, 0x9A, 0x32, 0x64, 0x03, 0xB0, 0xF3, 0x1B,
-      0xBE, 0x76, 0x99, 0xCD, 0x17, 0xC7, 0xD1, 0xC0, 0xB9, 0x81, 0x58,
-      0x6D, 0xD1, 0xA7, 0xB2, 0x19, 0xC5, 0x25, 0x08, 0xFE, 0x99}},
-    // C=US, O=SecureTrust Corporation, CN=SecureTrust CA
-    {{0xF1, 0xC1, 0xB5, 0x0A, 0xE5, 0xA2, 0x0D, 0xD8, 0x03, 0x0E, 0xC9,
-      0xF6, 0xBC, 0x24, 0x82, 0x3D, 0xD3, 0x67, 0xB5, 0x25, 0x57, 0x59,
-      0xB4, 0xE7, 0x1B, 0x61, 0xFC, 0xE9, 0xF7, 0x37, 0x5D, 0x73}},
-    // C=ES, ST=BARCELONA, L=BARCELONA, O=IPS Seguridad CA, OU=Certificaciones,
-    // CN=IPS SERVIDORES/emailAddress=ips@mail.ips.es
-    {{0xF1, 0xF3, 0xCC, 0x20, 0x7A, 0x6D, 0x47, 0x94, 0x7B, 0x8C, 0xB9,
-      0xC3, 0x04, 0x22, 0x22, 0x9D, 0xE0, 0xD7, 0x1F, 0xB8, 0x67, 0xE0,
-      0xB9, 0xA3, 0xED, 0xA0, 0x8E, 0x0E, 0x17, 0x36, 0xBC, 0x28}},
-    // C=AT, O=A-Trust Ges. f. Sicherheitssysteme im elektr. Datenverkehr GmbH,
-    // OU=A-Trust-Qual-02, CN=A-Trust-Qual-02
-    {{0xF2, 0x86, 0x30, 0xBA, 0xBF, 0x25, 0x6E, 0x56, 0x7B, 0x58, 0x21,
-      0x06, 0x9F, 0xCF, 0x13, 0x14, 0x8A, 0xB9, 0xA2, 0x3E, 0x28, 0xFC,
-      0x0D, 0x70, 0x61, 0x5A, 0xAE, 0x6E, 0xD2, 0x84, 0xF4, 0xC8}},
-    // CN=Atos TrustedRoot 2011, O=Atos, C=DE
-    {{0xF3, 0x56, 0xBE, 0xA2, 0x44, 0xB7, 0xA9, 0x1E, 0xB3, 0x5D, 0x53,
-      0xCA, 0x9A, 0xD7, 0x86, 0x4A, 0xCE, 0x01, 0x8E, 0x2D, 0x35, 0xD5,
-      0xF8, 0xF9, 0x6D, 0xDF, 0x68, 0xA6, 0xF4, 0x1A, 0xA4, 0x74}},
-    // C=IN, O=India PKI, CN=CCA India 2007
-    {{0xF3, 0x75, 0xE2, 0xF7, 0x7A, 0x10, 0x8B, 0xAC, 0xC4, 0x23, 0x48,
-      0x94, 0xA9, 0xAF, 0x30, 0x8E, 0xDE, 0xCA, 0x1A, 0xCD, 0x8F, 0xBD,
-      0xE0, 0xE7, 0xAA, 0xA9, 0x63, 0x4E, 0x9D, 0xAF, 0x7E, 0x1C}},
-    // OU=Copyright (c) 1997 Microsoft Corp., OU=Microsoft Corporation,
-    // CN=Microsoft Root Authority
-    {{0xF3, 0x84, 0x06, 0xE5, 0x40, 0xD7, 0xA9, 0xD9, 0x0C, 0xB4, 0xA9,
-      0x47, 0x92, 0x99, 0x64, 0x0F, 0xFB, 0x6D, 0xF9, 0xE2, 0x24, 0xEC,
-      0xC7, 0xA0, 0x1C, 0x0D, 0x95, 0x58, 0xD8, 0xDA, 0xD7, 0x7D}},
-    // C=ES, O=Agencia Notarial de Certificacion S.L.U. - CIF B83395988,
-    // CN=ANCERT Certificados CGN V2
-    {{0xF4, 0x33, 0x6B, 0xC2, 0xAC, 0x75, 0x95, 0x0B, 0xEC, 0xCF, 0x1C,
-      0x1F, 0x2F, 0x9D, 0xA6, 0xDD, 0xDA, 0xFD, 0x1F, 0x41, 0x16, 0x1C,
-      0xA7, 0x1F, 0x59, 0xC7, 0x68, 0x89, 0xBD, 0x47, 0x40, 0x33}},
-    // L=ValiCert Validation Network, O=ValiCert, Inc., OU=ValiCert Class 1
-    // Policy Validation Authority,
-    // CN=http://www.valicert.com//emailAddress=info@valicert.com
-    {{0xF4, 0xC1, 0x49, 0x55, 0x1A, 0x30, 0x13, 0xA3, 0x5B, 0xC7, 0xBF,
-      0xFE, 0x17, 0xA7, 0xF3, 0x44, 0x9B, 0xC1, 0xAB, 0x5B, 0x5A, 0x0A,
-      0xE7, 0x4B, 0x06, 0xC2, 0x3B, 0x90, 0x00, 0x4C, 0x01, 0x04}},
-    // C=IT, O=SIA S.p.A., L=Milano, CN=SIA Secure Server CA
-    {{0xF5, 0x63, 0xC5, 0xC3, 0xE5, 0x12, 0xE6, 0x3B, 0x97, 0xB5, 0x43,
-      0x8F, 0x2B, 0xD4, 0xA9, 0xAE, 0x78, 0xA4, 0xF9, 0xEA, 0xD9, 0x2B,
-      0xCC, 0x34, 0xFE, 0x97, 0x3B, 0xDC, 0x7C, 0x6D, 0x21, 0x48}},
-    // C=SE, O=Swedish Social Insurance Agency, CN=Swedish Government Root
-    // Authority v1
-    {{0xF6, 0x57, 0xA6, 0x33, 0xEE, 0xB9, 0xBC, 0x5D, 0x15, 0xA4, 0x61,
-      0x75, 0x17, 0x49, 0xEA, 0x4B, 0x31, 0x67, 0x27, 0xDC, 0xF1, 0xA9,
-      0xF9, 0x86, 0xB5, 0x45, 0x84, 0x45, 0xF6, 0x48, 0x5D, 0xDE}},
-    // C=UY, O=ADMINISTRACION NACIONAL DE CORREOS, OU=SERVICIOS ELECTRONICOS,
-    // CN=SERVICIOS DE CERTIFICACION - A.N.C./mail=correo_cert@correo.com.uy
-    {{0xF7, 0x73, 0xBC, 0x65, 0x65, 0x9F, 0x1B, 0xC5, 0x90, 0x87, 0xBF,
-      0x21, 0x4E, 0xEA, 0xD8, 0x64, 0x01, 0x0D, 0x58, 0x87, 0xCD, 0x2C,
-      0xD8, 0x4E, 0x4F, 0x1B, 0xA7, 0x52, 0x3F, 0xE5, 0x56, 0x40}},
-    // C=SK, L=Bratislava, O=Disig a.s., CN=CA Disig Root R1
-    {{0xF9, 0x6F, 0x23, 0xF4, 0xC3, 0xE7, 0x9C, 0x07, 0x7A, 0x46, 0x98,
-      0x8D, 0x5A, 0xF5, 0x90, 0x06, 0x76, 0xA0, 0xF0, 0x39, 0xCB, 0x64,
-      0x5D, 0xD1, 0x75, 0x49, 0xB2, 0x16, 0xC8, 0x24, 0x40, 0xCE}},
-    // C=HK, O=Hongkong Post, CN=Hongkong Post Root CA 1
-    {{0xF9, 0xE6, 0x7D, 0x33, 0x6C, 0x51, 0x00, 0x2A, 0xC0, 0x54, 0xC6,
-      0x32, 0x02, 0x2D, 0x66, 0xDD, 0xA2, 0xE7, 0xE3, 0xFF, 0xF1, 0x0A,
-      0xD0, 0x61, 0xED, 0x31, 0xD8, 0xBB, 0xB4, 0x10, 0xCF, 0xB2}},
-    // C=PL, O=Krajowa Izba Rozliczeniowa S.A., CN=SZAFIR ROOT CA
-    {{0xFA, 0xBC, 0xF5, 0x19, 0x7C, 0xDD, 0x7F, 0x45, 0x8A, 0xC3, 0x38,
-      0x32, 0xD3, 0x28, 0x40, 0x21, 0xDB, 0x24, 0x25, 0xFD, 0x6B, 0xEA,
-      0x7A, 0x2E, 0x69, 0xB7, 0x48, 0x6E, 0x8F, 0x51, 0xF9, 0xCC}},
-    // C=SI, O=Republika Slovenija/2.5.4.97=VATSI-17659957, CN=SI-TRUST Root
-    {{0xFA, 0xD5, 0x40, 0x81, 0x1A, 0xFA, 0xE0, 0xDC, 0x76, 0x7C, 0xDF,
-      0x65, 0x72, 0xA0, 0x88, 0xFA, 0x3C, 0xE8, 0x49, 0x3D, 0xD8, 0x2B,
-      0x3B, 0x86, 0x9A, 0x67, 0xD1, 0x0A, 0xAB, 0x4E, 0x81, 0x24}},
-    // C=BR, O=ICP-Brasil, OU=Instituto Nacional de Tecnologia da Informacao -
-    // ITI, CN=Autoridade Certificadora Raiz Brasileira v2
-    {{0xFB, 0x47, 0xD9, 0x2A, 0x99, 0x09, 0xFD, 0x4F, 0xA9, 0xBE, 0xC0,
-      0x27, 0x37, 0x54, 0x3E, 0x1F, 0x35, 0x14, 0xCE, 0xD7, 0x47, 0x40,
-      0x7A, 0x8D, 0x9C, 0xFA, 0x39, 0x7B, 0x09, 0x15, 0x06, 0x7C}},
-    // C=IT, O=SIA S.p.A., L=Milano, CN=SIA Secure Client CA
-    {{0xFC, 0x0A, 0x0F, 0xE2, 0x7C, 0x9D, 0xC1, 0x3C, 0x81, 0x23, 0x8A,
-      0x59, 0x13, 0xA1, 0xDA, 0xF8, 0x18, 0x41, 0x68, 0xBE, 0xB7, 0xE5,
-      0xA4, 0x51, 0x2A, 0x77, 0x1F, 0xD4, 0xF4, 0x53, 0x65, 0x1D}},
-    // C=SE, O=Inera AB, CN=SITHS Root CA v1
-    {{0xFC, 0x50, 0xB2, 0x6B, 0xDC, 0x4A, 0x8F, 0xDF, 0x13, 0x44, 0xCC,
-      0x80, 0x15, 0x7A, 0xE1, 0x3A, 0xC6, 0x71, 0xE2, 0x70, 0x6F, 0xAC,
-      0xFC, 0x06, 0x05, 0xFE, 0x34, 0xE2, 0x49, 0xEB, 0x72, 0xD6}},
-    // C=FR, O=Certinomis, OU=0002 433998903, CN=Certinomis - Autorit\xC3\xA9
-    // Racine
-    {{0xFC, 0xBF, 0xE2, 0x88, 0x62, 0x06, 0xF7, 0x2B, 0x27, 0x59, 0x3C,
-      0x8B, 0x07, 0x02, 0x97, 0xE1, 0x2D, 0x76, 0x9E, 0xD1, 0x0E, 0xD7,
-      0x93, 0x07, 0x05, 0xA8, 0x09, 0x8E, 0xFF, 0xC1, 0x4D, 0x17}},
-    // C=DE, O=T-Systems Enterprise Services GmbH, OU=T-Systems Trust Center,
-    // CN=T-TeleSec GlobalRoot Class 3
-    {{0xFD, 0x73, 0xDA, 0xD3, 0x1C, 0x64, 0x4F, 0xF1, 0xB4, 0x3B, 0xEF,
-      0x0C, 0xCD, 0xDA, 0x96, 0x71, 0x0B, 0x9C, 0xD9, 0x87, 0x5E, 0xCA,
-      0x7E, 0x31, 0x70, 0x7A, 0xF3, 0xE9, 0x6D, 0x52, 0x2B, 0xBD}},
-    // C=SI, O=Halcom, CN=Halcom CA PO 2
-    {{0xFE, 0x71, 0x14, 0xD0, 0x7A, 0x14, 0x77, 0x59, 0x89, 0x1F, 0xF3,
-      0x7B, 0x4F, 0x53, 0xEB, 0x43, 0x56, 0x82, 0x96, 0xBC, 0x3B, 0xF8,
-      0x9B, 0xC1, 0x2C, 0xAF, 0xB1, 0x86, 0x98, 0x5E, 0xF2, 0x8D}},
-    // C=US, O=GeoTrust Inc., CN=GeoTrust Global CA
-    {{0xFF, 0x85, 0x6A, 0x2D, 0x25, 0x1D, 0xCD, 0x88, 0xD3, 0x66, 0x56,
-      0xF4, 0x50, 0x12, 0x67, 0x98, 0xCF, 0xAB, 0xAA, 0xDE, 0x40, 0x79,
-      0x9C, 0x72, 0x2D, 0xE4, 0xD2, 0xB5, 0xDB, 0x36, 0xA7, 0x3A}},
-    // C=BR, O=Serasa S.A., OU=Serasa CA II, CN=Serasa Certificate Authority II
-    {{0xFF, 0xCE, 0xF2, 0x22, 0x4E, 0x29, 0xB0, 0xB3, 0x6E, 0xC8, 0x31,
-      0x4E, 0x68, 0x68, 0x22, 0xF3, 0xAC, 0x0F, 0x1C, 0x5E, 0x0C, 0x2D,
-      0x5C, 0x0E, 0xB2, 0x48, 0x4C, 0xE7, 0xE2, 0x54, 0x0F, 0xD0}},
-};
-
-static const size_t kKnownRootCertSHA256HashesLength =
-    arraysize(kKnownRootCertSHA256Hashes);
-
-}  // namespace net
-
-#endif  // NET_CERT_X509_CERTIFICATE_KNOWN_ROOTS_WIN_H_
diff --git a/net/cert/x509_certificate_unittest.cc b/net/cert/x509_certificate_unittest.cc
index 76ba850..fcc9452 100644
--- a/net/cert/x509_certificate_unittest.cc
+++ b/net/cert/x509_certificate_unittest.cc
@@ -105,10 +105,6 @@
   EXPECT_EQ(expected_fingerprint, X509Certificate::CalculateFingerprint256(
                                       google_cert->cert_buffer()));
 
-  std::vector<std::string> dns_names;
-  google_cert->GetDNSNames(&dns_names);
-  ASSERT_EQ(1U, dns_names.size());
-  EXPECT_EQ("www.google.com", dns_names[0]);
 }
 
 TEST(X509CertificateTest, GoogleCertParsing) {
@@ -159,17 +155,17 @@
   EXPECT_EQ(1300491319, valid_expiry.ToDoubleT());  // Mar 18 23:35:19 2011 GMT
 
   std::vector<std::string> dns_names;
-  webkit_cert->GetDNSNames(&dns_names);
+  EXPECT_TRUE(webkit_cert->GetSubjectAltName(&dns_names, nullptr));
   ASSERT_EQ(2U, dns_names.size());
   EXPECT_EQ("*.webkit.org", dns_names[0]);
   EXPECT_EQ("webkit.org", dns_names[1]);
 
   // Test that the wildcard cert matches properly.
-  EXPECT_TRUE(webkit_cert->VerifyNameMatch("www.webkit.org", false));
-  EXPECT_TRUE(webkit_cert->VerifyNameMatch("foo.webkit.org", false));
-  EXPECT_TRUE(webkit_cert->VerifyNameMatch("webkit.org", false));
-  EXPECT_FALSE(webkit_cert->VerifyNameMatch("www.webkit.com", false));
-  EXPECT_FALSE(webkit_cert->VerifyNameMatch("www.foo.webkit.com", false));
+  EXPECT_TRUE(webkit_cert->VerifyNameMatch("www.webkit.org"));
+  EXPECT_TRUE(webkit_cert->VerifyNameMatch("foo.webkit.org"));
+  EXPECT_TRUE(webkit_cert->VerifyNameMatch("webkit.org"));
+  EXPECT_FALSE(webkit_cert->VerifyNameMatch("www.webkit.com"));
+  EXPECT_FALSE(webkit_cert->VerifyNameMatch("www.foo.webkit.com"));
 }
 
 TEST(X509CertificateTest, ThawteCertParsing) {
@@ -208,11 +204,6 @@
 
   const Time& valid_expiry = thawte_cert->valid_expiry();
   EXPECT_EQ(1263772799, valid_expiry.ToDoubleT());  // Jan 17 23:59:59 2010 GMT
-
-  std::vector<std::string> dns_names;
-  thawte_cert->GetDNSNames(&dns_names);
-  ASSERT_EQ(1U, dns_names.size());
-  EXPECT_EQ("www.thawte.com", dns_names[0]);
 }
 
 // Test that all desired AttributeAndValue pairs can be extracted when only
@@ -1006,18 +997,12 @@
   bool expected;
   // The hostname to match.
   const char* hostname;
-  // Common name, may be used if |dns_names| or |ip_addrs| are empty.
-  const char* common_name;
   // Comma separated list of certificate names to match against. Any occurrence
   // of '#' will be replaced with a null character before processing.
   const char* dns_names;
   // Comma separated list of certificate IP Addresses to match against. Each
   // address is x prefixed 16 byte hex code for v6 or dotted-decimals for v4.
   const char* ip_addrs;
-  // Whether to disable matching against the commonName. This is a negative
-  // condition so that tests can omit one or more of the above fields and
-  // allow default initialization to handle this case.
-  bool disable_fallback;
 };
 
 // GTest 'magic' pretty-printer, so that if/when a test fails, it knows how
@@ -1025,157 +1010,126 @@
 // attempt to print out the first twenty bytes of the object, which depending
 // on platform and alignment, may result in an invalid read.
 void PrintTo(const CertificateNameVerifyTestData& data, std::ostream* os) {
-  ASSERT_TRUE(data.hostname && data.common_name);
+  ASSERT_TRUE(data.hostname);
+  ASSERT_TRUE(data.dns_names || data.ip_addrs);
   // Using StringPiece to allow for optional fields being NULL.
-  *os << " expected: " << data.expected
-      << "; hostname: " << data.hostname
-      << "; common_name: " << data.common_name
+  *os << " expected: " << data.expected << "; hostname: " << data.hostname
       << "; dns_names: " << base::StringPiece(data.dns_names)
-      << "; ip_addrs: " << base::StringPiece(data.ip_addrs)
-      << "; disable_fallback: " << data.disable_fallback;
+      << "; ip_addrs: " << base::StringPiece(data.ip_addrs);
 }
 
 const CertificateNameVerifyTestData kNameVerifyTestData[] = {
-    { true, "foo.com", "foo.com" },
-    { true, "f", "f" },
-    { false, "h", "i" },
-    { true, "bar.foo.com", "*.foo.com" },
-    { true, "www.test.fr", "common.name",
-        "*.test.com,*.test.co.uk,*.test.de,*.test.fr" },
-    { true, "wwW.tESt.fr",  "common.name",
-        ",*.*,*.test.de,*.test.FR,www" },
-    { false, "f.uk", ".uk" },
-    { false, "w.bar.foo.com", "?.bar.foo.com" },
-    { false, "www.foo.com", "(www|ftp).foo.com" },
-    { false, "www.foo.com", "www.foo.com#" },  // # = null char.
-    { false, "www.foo.com", "", "www.foo.com#*.foo.com,#,#" },
-    { false, "www.house.example", "ww.house.example" },
-    { false, "test.org", "", "www.test.org,*.test.org,*.org" },
-    { false, "w.bar.foo.com", "w*.bar.foo.com" },
-    { false, "www.bar.foo.com", "ww*ww.bar.foo.com" },
-    { false, "wwww.bar.foo.com", "ww*ww.bar.foo.com" },
-    { false, "wwww.bar.foo.com", "w*w.bar.foo.com" },
-    { false, "wwww.bar.foo.com", "w*w.bar.foo.c0m" },
-    { false, "WALLY.bar.foo.com", "wa*.bar.foo.com" },
-    { false, "wally.bar.foo.com", "*Ly.bar.foo.com" },
-    { true, "ww%57.foo.com", "", "www.foo.com" },
-    { true, "www&.foo.com", "www%26.foo.com" },
-    // Common name must not be used if subject alternative name was provided.
-    { false, "www.test.co.jp", "www.test.co.jp",
-        "*.test.de,*.jp,www.test.co.uk,www.*.co.jp" },
-    { false, "www.bar.foo.com", "www.bar.foo.com",
-      "*.foo.com,*.*.foo.com,*.*.bar.foo.com,*..bar.foo.com," },
-    { false, "www.bath.org", "www.bath.org", "", "20.30.40.50" },
-    { false, "66.77.88.99", "66.77.88.99", "www.bath.org" },
-    // Common name must not be used if fallback is disabled.
-    { false, "www.test.com", "www.test.com", nullptr, nullptr, true },
-    { false, "127.0.0.1", "127.0.0.1", nullptr, nullptr, true },
+    {true, "foo.com", "foo.com"},
+    {true, "f", "f"},
+    {false, "h", "i"},
+    {true, "bar.foo.com", "*.foo.com"},
+    {true, "www.test.fr", "*.test.com,*.test.co.uk,*.test.de,*.test.fr"},
+    {true, "wwW.tESt.fr", ",*.*,*.test.de,*.test.FR,www"},
+    {false, "f.uk", ".uk"},
+    {false, "w.bar.foo.com", "?.bar.foo.com"},
+    {false, "www.foo.com", "(www|ftp).foo.com"},
+    {false, "www.foo.com", "www.foo.com#"},  // # = null char.
+    {false, "www.foo.com", "www.foo.com#*.foo.com,#,#"},
+    {false, "www.house.example", "ww.house.example"},
+    {false, "test.org", "www.test.org,*.test.org,*.org"},
+    {false, "w.bar.foo.com", "w*.bar.foo.com"},
+    {false, "www.bar.foo.com", "ww*ww.bar.foo.com"},
+    {false, "wwww.bar.foo.com", "ww*ww.bar.foo.com"},
+    {false, "wwww.bar.foo.com", "w*w.bar.foo.com"},
+    {false, "wwww.bar.foo.com", "w*w.bar.foo.c0m"},
+    {false, "WALLY.bar.foo.com", "wa*.bar.foo.com"},
+    {false, "wally.bar.foo.com", "*Ly.bar.foo.com"},
+    {true, "ww%57.foo.com", "www.foo.com"},
+    {true, "www&.foo.com", "www%26.foo.com"},
     // IDN tests
-    { true, "xn--poema-9qae5a.com.br", "xn--poema-9qae5a.com.br" },
-    { true, "www.xn--poema-9qae5a.com.br", "*.xn--poema-9qae5a.com.br" },
-    { false, "xn--poema-9qae5a.com.br", "", "*.xn--poema-9qae5a.com.br,"
-                                            "xn--poema-*.com.br,"
-                                            "xn--*-9qae5a.com.br,"
-                                            "*--poema-9qae5a.com.br" },
+    {true, "xn--poema-9qae5a.com.br", "xn--poema-9qae5a.com.br"},
+    {true, "www.xn--poema-9qae5a.com.br", "*.xn--poema-9qae5a.com.br"},
+    {false, "xn--poema-9qae5a.com.br",
+     "*.xn--poema-9qae5a.com.br,"
+     "xn--poema-*.com.br,"
+     "xn--*-9qae5a.com.br,"
+     "*--poema-9qae5a.com.br"},
     // The following are adapted from the  examples quoted from
     // http://tools.ietf.org/html/rfc6125#section-6.4.3
     //  (e.g., *.example.com would match foo.example.com but
     //   not bar.foo.example.com or example.com).
-    { true, "foo.example.com", "*.example.com" },
-    { false, "bar.foo.example.com", "*.example.com" },
-    { false, "example.com", "*.example.com" },
+    {true, "foo.example.com", "*.example.com"},
+    {false, "bar.foo.example.com", "*.example.com"},
+    {false, "example.com", "*.example.com"},
     //   Partial wildcards are disallowed, though RFC 2818 rules allow them.
     //   That is, forms such as baz*.example.net, *baz.example.net, and
     //   b*z.example.net should NOT match domains. Instead, the wildcard must
     //   always be the left-most label, and only a single label.
-    { false, "baz1.example.net", "baz*.example.net" },
-    { false, "foobaz.example.net", "*baz.example.net" },
-    { false, "buzz.example.net", "b*z.example.net" },
-    { false, "www.test.example.net", "www.*.example.net" },
+    {false, "baz1.example.net", "baz*.example.net"},
+    {false, "foobaz.example.net", "*baz.example.net"},
+    {false, "buzz.example.net", "b*z.example.net"},
+    {false, "www.test.example.net", "www.*.example.net"},
     // Wildcards should not be valid for public registry controlled domains,
     // and unknown/unrecognized domains, at least three domain components must
     // be present.
-    { true, "www.test.example", "*.test.example" },
-    { true, "test.example.co.uk", "*.example.co.uk" },
-    { false, "test.example", "*.example" },
-    { false, "example.co.uk", "*.co.uk" },
-    { false, "foo.com", "*.com" },
-    { false, "foo.us", "*.us" },
-    { false, "foo", "*" },
+    {true, "www.test.example", "*.test.example"},
+    {true, "test.example.co.uk", "*.example.co.uk"},
+    {false, "test.example", "*.example"},
+    {false, "example.co.uk", "*.co.uk"},
+    {false, "foo.com", "*.com"},
+    {false, "foo.us", "*.us"},
+    {false, "foo", "*"},
     // IDN variants of wildcards and registry controlled domains.
-    { true, "www.xn--poema-9qae5a.com.br", "*.xn--poema-9qae5a.com.br" },
-    { true, "test.example.xn--mgbaam7a8h", "*.example.xn--mgbaam7a8h" },
-    { false, "xn--poema-9qae5a.com.br", "*.com.br" },
-    { false, "example.xn--mgbaam7a8h", "*.xn--mgbaam7a8h" },
+    {true, "www.xn--poema-9qae5a.com.br", "*.xn--poema-9qae5a.com.br"},
+    {true, "test.example.xn--mgbaam7a8h", "*.example.xn--mgbaam7a8h"},
+    {false, "xn--poema-9qae5a.com.br", "*.com.br"},
+    {false, "example.xn--mgbaam7a8h", "*.xn--mgbaam7a8h"},
     // Wildcards should be permissible for 'private' registry controlled
     // domains.
-    { true, "www.appspot.com", "*.appspot.com" },
-    { true, "foo.s3.amazonaws.com", "*.s3.amazonaws.com" },
+    {true, "www.appspot.com", "*.appspot.com"},
+    {true, "foo.s3.amazonaws.com", "*.s3.amazonaws.com"},
     // Multiple wildcards are not valid.
-    { false, "foo.example.com", "*.*.com" },
-    { false, "foo.bar.example.com", "*.bar.*.com" },
+    {false, "foo.example.com", "*.*.com"},
+    {false, "foo.bar.example.com", "*.bar.*.com"},
     // Absolute vs relative DNS name tests. Although not explicitly specified
     // in RFC 6125, absolute reference names (those ending in a .) should
     // match either absolute or relative presented names.
-    { true, "foo.com", "foo.com." },
-    { true, "foo.com.", "foo.com" },
-    { true, "foo.com.", "foo.com." },
-    { true, "f", "f." },
-    { true, "f.", "f" },
-    { true, "f.", "f." },
-    { true, "www-3.bar.foo.com", "*.bar.foo.com." },
-    { true, "www-3.bar.foo.com.", "*.bar.foo.com" },
-    { true, "www-3.bar.foo.com.", "*.bar.foo.com." },
-    { false, ".", "." },
-    { false, "example.com", "*.com." },
-    { false, "example.com.", "*.com" },
-    { false, "example.com.", "*.com." },
-    { false, "foo.", "*." },
-    { false, "foo", "*." },
-    { false, "foo.co.uk", "*.co.uk." },
-    { false, "foo.co.uk.", "*.co.uk." },
-    // IP addresses in common name; IPv4 only.
-    { true, "127.0.0.1", "127.0.0.1" },
-    { true, "192.168.1.1", "192.168.1.1" },
-    { true,  "676768", "0.10.83.160" },
-    { true,  "1.2.3", "1.2.0.3" },
-    { false, "192.169.1.1", "192.168.1.1" },
-    { false, "12.19.1.1", "12.19.1.1/255.255.255.0" },
-    { false, "FEDC:ba98:7654:3210:FEDC:BA98:7654:3210",
-      "FEDC:BA98:7654:3210:FEDC:ba98:7654:3210" },
-    { false, "1111:2222:3333:4444:5555:6666:7777:8888",
-      "1111:2222:3333:4444:5555:6666:7777:8888" },
-    { false, "::192.9.5.5", "[::192.9.5.5]" },
-    // No wildcard matching in valid IP addresses
-    { false, "::192.9.5.5", "*.9.5.5" },
-    { false, "2010:836B:4179::836B:4179", "*:836B:4179::836B:4179" },
-    { false, "192.168.1.11", "*.168.1.11" },
-    { false, "FEDC:BA98:7654:3210:FEDC:BA98:7654:3210", "*.]" },
-    // IP addresses in subject alternative name (common name ignored)
-    { true, "10.1.2.3", "", "", "10.1.2.3" },
-    { true,  "14.15", "", "", "14.0.0.15" },
-    { false, "10.1.2.7", "10.1.2.7", "", "10.1.2.6,10.1.2.8" },
-    { false, "10.1.2.8", "10.20.2.8", "foo" },
-    { true, "::4.5.6.7", "", "", "x00000000000000000000000004050607" },
-    { false, "::6.7.8.9", "::6.7.8.9", "::6.7.8.9",
-        "x00000000000000000000000006070808,x0000000000000000000000000607080a,"
-        "xff000000000000000000000006070809,6.7.8.9" },
-    { true, "FE80::200:f8ff:fe21:67cf", "no.common.name", "",
-        "x00000000000000000000000006070808,xfe800000000000000200f8fffe2167cf,"
-        "xff0000000000000000000000060708ff,10.0.0.1" },
+    {true, "foo.com", "foo.com."},
+    {true, "foo.com.", "foo.com"},
+    {true, "foo.com.", "foo.com."},
+    {true, "f", "f."},
+    {true, "f.", "f"},
+    {true, "f.", "f."},
+    {true, "www-3.bar.foo.com", "*.bar.foo.com."},
+    {true, "www-3.bar.foo.com.", "*.bar.foo.com"},
+    {true, "www-3.bar.foo.com.", "*.bar.foo.com."},
+    {false, ".", "."},
+    {false, "example.com", "*.com."},
+    {false, "example.com.", "*.com"},
+    {false, "example.com.", "*.com."},
+    {false, "foo.", "*."},
+    {false, "foo", "*."},
+    {false, "foo.co.uk", "*.co.uk."},
+    {false, "foo.co.uk.", "*.co.uk."},
+    // IP addresses in subject alternative name
+    {true, "10.1.2.3", "", "10.1.2.3"},
+    {true, "14.15", "", "14.0.0.15"},
+    {false, "10.1.2.7", "", "10.1.2.6,10.1.2.8"},
+    {false, "10.1.2.8", "foo"},
+    {true, "::4.5.6.7", "", "x00000000000000000000000004050607"},
+    {false, "::6.7.8.9", "::6.7.8.9",
+     "x00000000000000000000000006070808,x0000000000000000000000000607080a,"
+     "xff000000000000000000000006070809,6.7.8.9"},
+    {true, "FE80::200:f8ff:fe21:67cf", "",
+     "x00000000000000000000000006070808,xfe800000000000000200f8fffe2167cf,"
+     "xff0000000000000000000000060708ff,10.0.0.1"},
     // Numeric only hostnames (none of these are considered valid IP addresses).
-    { false,  "12345.6", "12345.6" },
-    { false, "121.2.3.512", "", "1*1.2.3.512,*1.2.3.512,1*.2.3.512,*.2.3.512",
-        "121.2.3.0"},
-    { false, "1.2.3.4.5.6", "*.2.3.4.5.6" },
-    { true, "1.2.3.4.5", "", "1.2.3.4.5" },
+    {false, "121.2.3.512", "1*1.2.3.512,*1.2.3.512,1*.2.3.512,*.2.3.512",
+     "121.2.3.0"},
+    {false, "1.2.3.4.5.6", "*.2.3.4.5.6"},
+    {true, "1.2.3.4.5", "1.2.3.4.5"},
     // Invalid host names.
-    { false, "junk)(£)$*!@~#", "junk)(£)$*!@~#" },
-    { false, "www.*.com", "www.*.com" },
-    { false, "w$w.f.com", "w$w.f.com" },
-    { false, "nocolonallowed:example", "", "nocolonallowed:example" },
-    { false, "www-1.[::FFFF:129.144.52.38]", "*.[::FFFF:129.144.52.38]" },
-    { false, "[::4.5.6.9]", "", "", "x00000000000000000000000004050609" },
+    {false, "junk)(£)$*!@~#", "junk)(£)$*!@~#"},
+    {false, "www.*.com", "www.*.com"},
+    {false, "w$w.f.com", "w$w.f.com"},
+    {false, "nocolonallowed:example", "nocolonallowed:example"},
+    {false, "www-1.[::FFFF:129.144.52.38]", "*.[::FFFF:129.144.52.38]"},
+    {false, "[::4.5.6.9]", "", "x00000000000000000000000004050609"},
 };
 
 class X509CertificateNameVerifyTest
@@ -1185,10 +1139,6 @@
 TEST_P(X509CertificateNameVerifyTest, VerifyHostname) {
   CertificateNameVerifyTestData test_data = GetParam();
 
-  std::string common_name(test_data.common_name);
-  ASSERT_EQ(std::string::npos, common_name.find(','));
-  std::replace(common_name.begin(), common_name.end(), '#', '\0');
-
   std::vector<std::string> dns_names, ip_addressses;
   if (test_data.dns_names) {
     // Build up the certificate DNS names list.
@@ -1233,9 +1183,8 @@
   }
 
   EXPECT_EQ(test_data.expected,
-            X509Certificate::VerifyHostname(test_data.hostname, common_name,
-                                            dns_names, ip_addressses,
-                                            !test_data.disable_fallback));
+            X509Certificate::VerifyHostname(test_data.hostname, dns_names,
+                                            ip_addressses));
 }
 
 INSTANTIATE_TEST_CASE_P(, X509CertificateNameVerifyTest,
diff --git a/net/data/ssl/certificates/825_days_1_second_after_2018_03_01.pem b/net/data/ssl/certificates/825_days_1_second_after_2018_03_01.pem
new file mode 100644
index 0000000..2061fd9
--- /dev/null
+++ b/net/data/ssl/certificates/825_days_1_second_after_2018_03_01.pem
@@ -0,0 +1,84 @@
+Certificate:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 29 (0x1d)
+    Signature Algorithm: sha256WithRSAEncryption
+        Issuer: C=US, ST=California, L=Mountain View, O=Test CA, CN=Test Root CA
+        Validity
+            Not Before: Mar  2 00:00:00 2018 GMT
+            Not After : Jun  4 00:00:01 2020 GMT
+        Subject: C=US, ST=California, L=Mountain View, O=Test CA, CN=127.0.0.1
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+                Public-Key: (2048 bit)
+                Modulus:
+                    00:b1:72:29:83:ff:96:bf:59:ab:e7:e0:a2:c3:eb:
+                    03:05:2a:34:92:0f:b9:4d:51:7a:4f:2d:3d:4b:24:
+                    f8:d8:17:0e:9f:88:38:aa:fc:5b:bb:13:ab:a1:1d:
+                    c6:1e:58:b2:b1:f5:04:bb:75:7f:70:9e:82:8f:97:
+                    73:25:c8:ff:35:41:2f:0c:20:f1:4a:98:18:5f:aa:
+                    8a:14:e8:9b:6c:f4:15:28:15:ad:52:da:f9:18:74:
+                    70:f9:c7:93:3c:2b:ee:88:37:de:51:af:b7:0e:0c:
+                    a1:4f:00:4f:48:fe:58:47:69:b8:57:98:f9:46:f7:
+                    db:ab:59:02:e6:c5:55:45:04:26:6b:7b:52:41:b7:
+                    24:4e:d4:c2:f9:bc:1b:ff:6d:fb:37:0f:88:f5:e8:
+                    4e:24:e1:e5:ce:e7:2b:2d:a7:1c:44:18:cc:56:7d:
+                    92:06:51:03:56:0f:f6:1c:fa:c6:52:39:aa:f7:f8:
+                    09:d3:0d:4d:e7:fa:71:f9:79:3a:26:0a:85:cd:5b:
+                    d5:3b:af:cb:49:d8:2c:f9:fb:cb:5e:f9:ca:8c:1d:
+                    0e:b7:03:70:9b:84:f6:dc:9d:39:6e:19:5a:d1:76:
+                    bb:57:57:be:e0:d1:4f:5b:30:5c:22:6e:5f:e4:27:
+                    1a:0c:5d:62:65:9a:f3:e1:d9:45:be:6a:38:a4:15:
+                    49:bb
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Basic Constraints: critical
+                CA:FALSE
+            X509v3 Subject Key Identifier: 
+                BC:F3:2D:55:5F:B1:CE:8D:5A:05:B4:FC:17:A9:4A:2F:14:8E:1C:F2
+            X509v3 Authority Key Identifier: 
+                keyid:9B:26:0B:8A:98:A9:BB:1D:B9:1F:1C:E3:1A:40:33:ED:8E:17:88:AB
+
+            X509v3 Extended Key Usage: 
+                TLS Web Server Authentication, TLS Web Client Authentication
+            X509v3 Subject Alternative Name: 
+                IP Address:127.0.0.1
+    Signature Algorithm: sha256WithRSAEncryption
+         76:6e:b9:fe:1c:ee:83:57:f7:cb:b8:51:e9:9a:c5:49:04:79:
+         d7:fc:1b:8a:53:62:d5:50:fd:f6:11:73:3c:cd:be:49:27:6e:
+         26:68:87:f8:2e:a8:de:0d:d4:a2:22:66:fc:f4:5b:fc:7c:e1:
+         0b:06:ae:4d:8c:af:20:30:67:b0:2e:99:72:12:ee:54:89:4d:
+         f8:21:32:d4:0f:50:54:ed:cb:4e:c9:8c:ba:ce:37:ec:a2:92:
+         58:b4:6f:bd:98:5f:fd:10:71:39:ac:4e:da:ad:71:13:a4:7b:
+         af:54:7e:47:11:30:55:93:50:ff:de:10:eb:be:9a:ca:77:cc:
+         e6:10:3e:bd:a3:c8:ce:42:00:cd:1d:d1:a4:d0:79:b2:f2:df:
+         09:7c:c9:8a:57:5e:b5:15:8f:d7:19:ad:5d:d5:9a:a8:5b:2a:
+         3e:49:4e:a9:6e:c7:bc:c0:d6:4a:21:02:48:a4:c1:60:0d:dd:
+         bb:a6:d9:d3:c7:4f:a8:35:63:a4:3c:43:47:3d:68:96:ba:44:
+         4f:08:0d:a6:40:0a:c2:c6:76:a8:79:a2:5b:e9:00:da:4a:7e:
+         87:46:94:d5:16:bc:08:e7:6f:66:3a:4a:37:fe:99:2f:25:38:
+         2b:3a:cd:e9:2d:e4:dc:c0:9d:38:34:42:5a:6a:7b:be:dc:a7:
+         d0:a7:9a:4f
+-----BEGIN CERTIFICATE-----
+MIIDvzCCAqegAwIBAgIBHTANBgkqhkiG9w0BAQsFADBjMQswCQYDVQQGEwJVUzET
+MBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNTW91bnRhaW4gVmlldzEQMA4G
+A1UECgwHVGVzdCBDQTEVMBMGA1UEAwwMVGVzdCBSb290IENBMB4XDTE4MDMwMjAw
+MDAwMFoXDTIwMDYwNDAwMDAwMVowYDELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNh
+bGlmb3JuaWExFjAUBgNVBAcMDU1vdW50YWluIFZpZXcxEDAOBgNVBAoMB1Rlc3Qg
+Q0ExEjAQBgNVBAMMCTEyNy4wLjAuMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC
+AQoCggEBALFyKYP/lr9Zq+fgosPrAwUqNJIPuU1Rek8tPUsk+NgXDp+IOKr8W7sT
+q6Edxh5YsrH1BLt1f3Cego+XcyXI/zVBLwwg8UqYGF+qihTom2z0FSgVrVLa+Rh0
+cPnHkzwr7og33lGvtw4MoU8AT0j+WEdpuFeY+Ub326tZAubFVUUEJmt7UkG3JE7U
+wvm8G/9t+zcPiPXoTiTh5c7nKy2nHEQYzFZ9kgZRA1YP9hz6xlI5qvf4CdMNTef6
+cfl5OiYKhc1b1Tuvy0nYLPn7y175yowdDrcDcJuE9tydOW4ZWtF2u1dXvuDRT1sw
+XCJuX+QnGgxdYmWa8+HZRb5qOKQVSbsCAwEAAaOBgDB+MAwGA1UdEwEB/wQCMAAw
+HQYDVR0OBBYEFLzzLVVfsc6NWgW0/BepSi8UjhzyMB8GA1UdIwQYMBaAFJsmC4qY
+qbsduR8c4xpAM+2OF4irMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAP
+BgNVHREECDAGhwR/AAABMA0GCSqGSIb3DQEBCwUAA4IBAQB2brn+HO6DV/fLuFHp
+msVJBHnX/BuKU2LVUP32EXM8zb5JJ24maIf4LqjeDdSiImb89Fv8fOELBq5NjK8g
+MGewLplyEu5UiU34ITLUD1BU7ctOyYy6zjfsopJYtG+9mF/9EHE5rE7arXETpHuv
+VH5HETBVk1D/3hDrvprKd8zmED69o8jOQgDNHdGk0Hmy8t8JfMmKV161FY/XGa1d
+1ZqoWyo+SU6pbse8wNZKIQJIpMFgDd27ptnTx0+oNWOkPENHPWiWukRPCA2mQArC
+xnaoeaJb6QDaSn6HRpTVFrwI529mOko3/pkvJTgrOs3pLeTcwJ04NEJaanu+3KfQ
+p5pP
+-----END CERTIFICATE-----
diff --git a/net/data/ssl/certificates/825_days_after_2018_03_01.pem b/net/data/ssl/certificates/825_days_after_2018_03_01.pem
new file mode 100644
index 0000000..95a57bb
--- /dev/null
+++ b/net/data/ssl/certificates/825_days_after_2018_03_01.pem
@@ -0,0 +1,84 @@
+Certificate:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 28 (0x1c)
+    Signature Algorithm: sha256WithRSAEncryption
+        Issuer: C=US, ST=California, L=Mountain View, O=Test CA, CN=Test Root CA
+        Validity
+            Not Before: Mar  2 00:00:00 2018 GMT
+            Not After : Jun  4 00:00:00 2020 GMT
+        Subject: C=US, ST=California, L=Mountain View, O=Test CA, CN=127.0.0.1
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+                Public-Key: (2048 bit)
+                Modulus:
+                    00:a9:a4:7e:68:33:ea:40:c5:66:fe:cf:92:6c:ab:
+                    fc:dc:2c:e7:42:73:44:1a:f4:0e:8b:3b:3d:23:d7:
+                    41:aa:21:7e:a6:98:06:9c:05:d3:e6:60:e5:52:5e:
+                    4f:f2:dd:22:f3:1a:e7:7a:43:91:c5:7a:5b:b9:75:
+                    f0:57:ae:69:73:e3:4d:7b:ec:e1:fa:05:34:93:7f:
+                    95:84:dd:3b:75:73:ab:fc:fc:2d:84:04:3f:1f:20:
+                    d8:2e:6e:b9:9e:51:b1:8f:57:17:67:56:ec:8c:5a:
+                    08:36:a5:5e:4f:14:18:87:5f:82:f0:2c:87:d6:de:
+                    06:d3:f7:7f:99:54:55:3f:ec:fc:51:20:ac:48:89:
+                    34:22:c2:13:a5:75:20:e6:5b:c3:61:9e:8d:b2:24:
+                    99:8b:c1:e3:3d:54:7a:5b:d6:68:83:b2:49:a1:9a:
+                    df:70:e2:bb:eb:8c:0c:a8:9a:a0:af:5e:d3:e9:db:
+                    93:51:9f:1c:48:80:0f:4d:76:20:34:23:fe:2a:8e:
+                    52:e2:93:9a:e3:fb:6b:73:a6:fa:6f:2d:50:5a:65:
+                    ce:ed:15:ca:94:9d:56:7f:9d:23:f5:ce:0b:54:04:
+                    ad:ff:17:4e:92:4a:d1:1c:ab:a7:c2:9d:99:e7:3b:
+                    f1:98:68:88:a7:5c:e5:c0:39:5f:c3:25:56:85:a6:
+                    14:c1
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Basic Constraints: critical
+                CA:FALSE
+            X509v3 Subject Key Identifier: 
+                32:7A:77:17:24:D3:A1:E2:D9:79:98:0C:A0:19:65:18:06:7D:74:4B
+            X509v3 Authority Key Identifier: 
+                keyid:9B:26:0B:8A:98:A9:BB:1D:B9:1F:1C:E3:1A:40:33:ED:8E:17:88:AB
+
+            X509v3 Extended Key Usage: 
+                TLS Web Server Authentication, TLS Web Client Authentication
+            X509v3 Subject Alternative Name: 
+                IP Address:127.0.0.1
+    Signature Algorithm: sha256WithRSAEncryption
+         23:0d:4a:51:cc:45:b5:57:44:4b:db:8b:18:f9:77:85:72:ed:
+         94:b8:20:31:52:0e:c3:49:71:2f:0b:1f:fe:a4:d9:39:e4:99:
+         52:fd:a5:22:fc:9e:f4:45:9b:be:dd:a5:52:2b:45:74:52:61:
+         e0:03:66:f2:88:c8:15:79:4a:cf:e1:71:b3:d9:40:21:93:5f:
+         1a:a4:08:26:80:32:45:5a:0e:a4:b2:79:1f:02:5a:c1:c7:61:
+         32:c4:e0:0d:07:32:71:38:f4:85:b8:55:84:0d:ec:b2:cc:f3:
+         8d:a1:df:d2:70:c2:d4:f1:68:4c:b0:87:a7:37:4d:44:b7:d6:
+         93:37:bb:d3:0d:9c:11:5e:4c:1e:f9:c5:5a:26:53:82:46:62:
+         cf:10:fd:9c:c3:5f:48:02:69:90:9e:36:f6:77:fe:53:a6:6d:
+         3c:52:ac:38:4b:44:d2:58:df:71:ec:e1:c3:6e:da:08:0c:ae:
+         c7:19:ef:fe:94:1b:ce:2d:40:c9:e7:ff:9c:c1:8a:f6:0f:79:
+         d6:bf:59:c3:ea:13:42:24:79:35:d6:85:13:54:d3:96:58:4c:
+         8d:0a:01:d9:7d:37:97:9e:66:56:f7:75:f5:b8:8c:8b:a2:73:
+         e1:07:ca:5b:41:3e:db:2c:c7:8a:ad:97:95:b9:1a:e5:51:2f:
+         42:49:88:b4
+-----BEGIN CERTIFICATE-----
+MIIDvzCCAqegAwIBAgIBHDANBgkqhkiG9w0BAQsFADBjMQswCQYDVQQGEwJVUzET
+MBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNTW91bnRhaW4gVmlldzEQMA4G
+A1UECgwHVGVzdCBDQTEVMBMGA1UEAwwMVGVzdCBSb290IENBMB4XDTE4MDMwMjAw
+MDAwMFoXDTIwMDYwNDAwMDAwMFowYDELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNh
+bGlmb3JuaWExFjAUBgNVBAcMDU1vdW50YWluIFZpZXcxEDAOBgNVBAoMB1Rlc3Qg
+Q0ExEjAQBgNVBAMMCTEyNy4wLjAuMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC
+AQoCggEBAKmkfmgz6kDFZv7Pkmyr/Nws50JzRBr0Dos7PSPXQaohfqaYBpwF0+Zg
+5VJeT/LdIvMa53pDkcV6W7l18FeuaXPjTXvs4foFNJN/lYTdO3Vzq/z8LYQEPx8g
+2C5uuZ5RsY9XF2dW7IxaCDalXk8UGIdfgvAsh9beBtP3f5lUVT/s/FEgrEiJNCLC
+E6V1IOZbw2GejbIkmYvB4z1UelvWaIOySaGa33Diu+uMDKiaoK9e0+nbk1GfHEiA
+D012IDQj/iqOUuKTmuP7a3Om+m8tUFplzu0VypSdVn+dI/XOC1QErf8XTpJK0Ryr
+p8Kdmec78ZhoiKdc5cA5X8MlVoWmFMECAwEAAaOBgDB+MAwGA1UdEwEB/wQCMAAw
+HQYDVR0OBBYEFDJ6dxck06Hi2XmYDKAZZRgGfXRLMB8GA1UdIwQYMBaAFJsmC4qY
+qbsduR8c4xpAM+2OF4irMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAP
+BgNVHREECDAGhwR/AAABMA0GCSqGSIb3DQEBCwUAA4IBAQAjDUpRzEW1V0RL24sY
++XeFcu2UuCAxUg7DSXEvCx/+pNk55JlS/aUi/J70RZu+3aVSK0V0UmHgA2byiMgV
+eUrP4XGz2UAhk18apAgmgDJFWg6ksnkfAlrBx2EyxOANBzJxOPSFuFWEDeyyzPON
+od/ScMLU8WhMsIenN01Et9aTN7vTDZwRXkwe+cVaJlOCRmLPEP2cw19IAmmQnjb2
+d/5Tpm08Uqw4S0TSWN9x7OHDbtoIDK7HGe/+lBvOLUDJ5/+cwYr2D3nWv1nD6hNC
+JHk11oUTVNOWWEyNCgHZfTeXnmZW93X1uIyLonPhB8pbQT7bLMeKrZeVuRrlUS9C
+SYi0
+-----END CERTIFICATE-----
diff --git a/net/data/ssl/certificates/826_days_after_2018_03_01.pem b/net/data/ssl/certificates/826_days_after_2018_03_01.pem
new file mode 100644
index 0000000..e010db2c
--- /dev/null
+++ b/net/data/ssl/certificates/826_days_after_2018_03_01.pem
@@ -0,0 +1,84 @@
+Certificate:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 27 (0x1b)
+    Signature Algorithm: sha256WithRSAEncryption
+        Issuer: C=US, ST=California, L=Mountain View, O=Test CA, CN=Test Root CA
+        Validity
+            Not Before: Mar  2 00:00:00 2018 GMT
+            Not After : Jun  5 00:00:00 2020 GMT
+        Subject: C=US, ST=California, L=Mountain View, O=Test CA, CN=127.0.0.1
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+                Public-Key: (2048 bit)
+                Modulus:
+                    00:cf:da:ab:7b:a6:ed:17:b4:7b:14:b9:8c:29:a3:
+                    7f:25:cb:7c:a4:1c:23:da:c5:fc:8a:29:bd:be:b0:
+                    3d:40:c1:51:08:46:db:73:8c:dd:5c:06:3e:8c:f2:
+                    b5:d1:eb:b0:94:74:e0:46:14:b6:55:d0:bb:a9:b9:
+                    63:ae:7c:ee:e6:4c:7a:81:f3:37:1f:37:8b:dc:86:
+                    d1:79:0f:6e:ca:ca:ff:d0:91:e2:e9:f6:0c:38:ca:
+                    29:18:d2:92:65:88:6d:d6:72:14:b2:8b:06:11:6f:
+                    f7:3d:9d:54:3b:b5:ca:4d:d6:02:d8:1b:28:2c:bd:
+                    35:09:d3:29:c7:1d:82:9b:12:3b:a8:5c:51:68:69:
+                    72:d2:03:6a:2e:af:b5:33:fc:f3:57:b6:cb:7f:76:
+                    d6:2d:f7:82:74:50:f0:ef:b0:ac:08:90:be:b1:6c:
+                    47:ad:cb:e5:e1:fe:9a:c2:e8:0e:7f:e7:40:11:87:
+                    ec:1b:37:cb:d2:6d:77:96:66:48:15:c2:f2:c2:9b:
+                    aa:e0:64:ad:8f:ee:fe:81:ca:26:43:0f:21:f3:33:
+                    47:0d:be:ab:a4:8f:8f:84:1d:bc:e8:8f:ef:4d:ad:
+                    7b:39:30:22:c0:67:b2:ec:86:f7:f0:7b:f3:11:3d:
+                    8d:b3:5e:74:a4:9f:75:e4:4a:6c:c2:b8:d5:91:52:
+                    bf:4f
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Basic Constraints: critical
+                CA:FALSE
+            X509v3 Subject Key Identifier: 
+                57:B6:A1:A5:9D:E5:D4:1E:49:10:E6:56:D8:70:E6:A1:D5:74:F2:46
+            X509v3 Authority Key Identifier: 
+                keyid:9B:26:0B:8A:98:A9:BB:1D:B9:1F:1C:E3:1A:40:33:ED:8E:17:88:AB
+
+            X509v3 Extended Key Usage: 
+                TLS Web Server Authentication, TLS Web Client Authentication
+            X509v3 Subject Alternative Name: 
+                IP Address:127.0.0.1
+    Signature Algorithm: sha256WithRSAEncryption
+         92:f9:fd:c1:02:55:b9:61:ac:c5:15:87:4c:24:db:a5:b4:9b:
+         33:ab:24:3e:4c:3d:28:f4:f1:2c:50:64:ca:8a:2f:79:df:af:
+         e7:d8:cb:8e:98:c9:d3:f3:be:b3:40:ec:28:47:66:be:6f:75:
+         b8:eb:3f:07:18:97:2c:a1:7d:65:3b:4f:d8:c9:4b:ba:21:c2:
+         af:cf:90:aa:6a:a1:e7:70:3e:c0:54:6e:22:6c:11:ce:55:f2:
+         d7:9d:6a:bb:4d:40:8c:24:05:04:05:c0:35:c4:28:b7:0b:d6:
+         c9:39:a1:1b:6b:8a:aa:da:87:8f:ce:be:18:ac:04:1b:31:52:
+         39:ab:03:cf:41:07:b5:64:e2:e5:5b:76:52:20:2a:9e:4d:17:
+         c4:b6:64:09:0e:64:66:f9:d3:23:74:2c:fe:c1:79:15:e0:c0:
+         59:a1:ee:71:f7:0a:8e:3a:5c:46:c0:18:20:a0:33:ff:02:37:
+         46:61:a8:6a:51:ac:a5:39:a1:cf:49:61:76:6b:df:a9:68:63:
+         e9:d2:1a:bb:43:60:d4:99:65:1a:91:04:03:42:43:db:2b:28:
+         dc:c8:af:03:b4:71:5a:c9:17:a5:ff:c9:cc:04:c7:41:7f:b3:
+         a5:d5:72:3d:77:45:f3:57:a0:1d:24:4f:8a:24:42:a5:9d:49:
+         f2:18:cc:ac
+-----BEGIN CERTIFICATE-----
+MIIDvzCCAqegAwIBAgIBGzANBgkqhkiG9w0BAQsFADBjMQswCQYDVQQGEwJVUzET
+MBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNTW91bnRhaW4gVmlldzEQMA4G
+A1UECgwHVGVzdCBDQTEVMBMGA1UEAwwMVGVzdCBSb290IENBMB4XDTE4MDMwMjAw
+MDAwMFoXDTIwMDYwNTAwMDAwMFowYDELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNh
+bGlmb3JuaWExFjAUBgNVBAcMDU1vdW50YWluIFZpZXcxEDAOBgNVBAoMB1Rlc3Qg
+Q0ExEjAQBgNVBAMMCTEyNy4wLjAuMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC
+AQoCggEBAM/aq3um7Re0exS5jCmjfyXLfKQcI9rF/Iopvb6wPUDBUQhG23OM3VwG
+PozytdHrsJR04EYUtlXQu6m5Y6587uZMeoHzNx83i9yG0XkPbsrK/9CR4un2DDjK
+KRjSkmWIbdZyFLKLBhFv9z2dVDu1yk3WAtgbKCy9NQnTKccdgpsSO6hcUWhpctID
+ai6vtTP881e2y3921i33gnRQ8O+wrAiQvrFsR63L5eH+msLoDn/nQBGH7Bs3y9Jt
+d5ZmSBXC8sKbquBkrY/u/oHKJkMPIfMzRw2+q6SPj4QdvOiP702tezkwIsBnsuyG
+9/B78xE9jbNedKSfdeRKbMK41ZFSv08CAwEAAaOBgDB+MAwGA1UdEwEB/wQCMAAw
+HQYDVR0OBBYEFFe2oaWd5dQeSRDmVthw5qHVdPJGMB8GA1UdIwQYMBaAFJsmC4qY
+qbsduR8c4xpAM+2OF4irMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAP
+BgNVHREECDAGhwR/AAABMA0GCSqGSIb3DQEBCwUAA4IBAQCS+f3BAlW5YazFFYdM
+JNultJszqyQ+TD0o9PEsUGTKii9536/n2MuOmMnT876zQOwoR2a+b3W46z8HGJcs
+oX1lO0/YyUu6IcKvz5CqaqHncD7AVG4ibBHOVfLXnWq7TUCMJAUEBcA1xCi3C9bJ
+OaEba4qq2oePzr4YrAQbMVI5qwPPQQe1ZOLlW3ZSICqeTRfEtmQJDmRm+dMjdCz+
+wXkV4MBZoe5x9wqOOlxGwBggoDP/AjdGYahqUaylOaHPSWF2a9+paGPp0hq7Q2DU
+mWUakQQDQkPbKyjcyK8DtHFayRel/8nMBMdBf7Ol1XI9d0XzV6AdJE+KJEKlnUny
+GMys
+-----END CERTIFICATE-----
diff --git a/net/data/ssl/scripts/generate-test-certs.sh b/net/data/ssl/scripts/generate-test-certs.sh
index 622897b..0eee7f5 100755
--- a/net/data/ssl/scripts/generate-test-certs.sh
+++ b/net/data/ssl/scripts/generate-test-certs.sh
@@ -388,6 +388,42 @@
     -in out/pre_br_validity_bad_2020.req \
     -out ../certificates/pre_br_validity_bad_2020.pem \
     -config ca.cnf
+# Issued after 2018-03-01, lifetime == 826 days (bad)
+openssl req -config ../scripts/ee.cnf \
+  -newkey rsa:2048 -text -out out/826_days_after_2018_03_01.req
+CA_NAME="req_ca_dn" \
+  openssl ca \
+    -batch \
+    -extensions user_cert \
+    -startdate 180302000000Z \
+    -enddate   200605000000Z \
+    -in out/826_days_after_2018_03_01.req \
+    -out ../certificates/826_days_after_2018_03_01.pem \
+    -config ca.cnf
+# Issued after 2018-03-01, lifetime == 825 days (good)
+openssl req -config ../scripts/ee.cnf \
+  -newkey rsa:2048 -text -out out/825_days_after_2018_03_01.req
+CA_NAME="req_ca_dn" \
+  openssl ca \
+    -batch \
+    -extensions user_cert \
+    -startdate 180302000000Z \
+    -enddate   200604000000Z \
+    -in out/825_days_after_2018_03_01.req \
+    -out ../certificates/825_days_after_2018_03_01.pem \
+    -config ca.cnf
+# Issued after 2018-03-01, lifetime == 825 days and one second (bad)
+openssl req -config ../scripts/ee.cnf \
+  -newkey rsa:2048 -text -out out/825_days_1_second_after_2018_03_01.req
+CA_NAME="req_ca_dn" \
+  openssl ca \
+    -batch \
+    -extensions user_cert \
+    -startdate 180302000000Z \
+    -enddate   200604000001Z \
+    -in out/825_days_1_second_after_2018_03_01.req \
+    -out ../certificates/825_days_1_second_after_2018_03_01.pem \
+    -config ca.cnf
 
 # Issued prior to 1 June 2016 (Symantec CT Enforcement Date)
 openssl req -config ../scripts/ee.cnf \
diff --git a/net/disk_cache/entry_unittest.cc b/net/disk_cache/entry_unittest.cc
index 4363813..cf00bc3 100644
--- a/net/disk_cache/entry_unittest.cc
+++ b/net/disk_cache/entry_unittest.cc
@@ -2857,7 +2857,8 @@
   // Close(B);
   //
   // ... where the execution of the Open sits on the queue all the way till
-  // Doom. Currently this fails the open.
+  // Doom. This now succeeds, as the doom is merely queued at time of Open,
+  // rather than completed.
 
   SetSimpleCacheMode();
   // Disable optimistic ops so we can block on CreateEntry and start
@@ -2879,14 +2880,50 @@
   ASSERT_EQ(net::ERR_IO_PENDING,
             cache_->OpenEntry(key, &entry2, cb.callback()));
 
-  cache_->DoomEntry(key, base::Bind([](int) {}));
+  net::TestCompletionCallback cb2;
+  cache_->DoomEntry(key, cb2.callback());
   // Now event loop.
-  EXPECT_EQ(net::ERR_FAILED, cb.WaitForResult());
-  ASSERT_TRUE(entry2 == nullptr);
+  EXPECT_EQ(net::OK, cb.WaitForResult());
+  ASSERT_TRUE(entry2 != nullptr);
+  entry2->Close();
 
+  EXPECT_EQ(net::OK, cb2.WaitForResult());
   EXPECT_EQ(0, cache_->GetEntryCount());
 }
 
+TEST_F(DiskCacheEntryTest, SimpleCacheDoomErrorRace) {
+  // Code coverage for a doom racing with a doom induced by a failure.
+  SetSimpleCacheMode();
+  // Disable optimistic ops so we can block on CreateEntry and start
+  // WriteData off with an empty op queue.
+  SetCacheType(net::APP_CACHE);
+  InitCache();
+
+  const char kKey[] = "the first key";
+  const int kSize1 = 10;
+  scoped_refptr<net::IOBuffer> buffer1(new net::IOBuffer(kSize1));
+  CacheTestFillBuffer(buffer1->data(), kSize1, false);
+
+  disk_cache::Entry* entry = nullptr;
+  ASSERT_EQ(net::OK, CreateEntry(kKey, &entry));
+  ASSERT_TRUE(entry != nullptr);
+
+  // Now an empty _1 file, to cause a stream 2 write to fail.
+  base::FilePath entry_file1_path = cache_path_.AppendASCII(
+      disk_cache::simple_util::GetFilenameFromKeyAndFileIndex(kKey, 1));
+  base::File entry_file1(entry_file1_path,
+                         base::File::FLAG_WRITE | base::File::FLAG_CREATE);
+  ASSERT_TRUE(entry_file1.IsValid());
+
+  entry->WriteData(2, 0, buffer1.get(), kSize1, net::CompletionCallback(),
+                   /* truncate= */ true);
+
+  net::TestCompletionCallback cb;
+  cache_->DoomEntry(kKey, cb.callback());
+  entry->Close();
+  EXPECT_EQ(0, cb.WaitForResult());
+}
+
 bool TruncatePath(const base::FilePath& file_path, int64_t length) {
   base::File file(file_path, base::File::FLAG_WRITE | base::File::FLAG_OPEN);
   if (!file.IsValid())
diff --git a/net/disk_cache/simple/simple_entry_impl.cc b/net/disk_cache/simple/simple_entry_impl.cc
index dda8a1e..44a29f35 100644
--- a/net/disk_cache/simple/simple_entry_impl.cc
+++ b/net/disk_cache/simple/simple_entry_impl.cc
@@ -200,7 +200,7 @@
       last_modified_(last_used_),
       sparse_data_size_(0),
       open_count_(0),
-      doomed_(false),
+      doom_state_(DOOM_NONE),
       optimistic_create_pending_doom_state_(CREATE_NORMAL),
       state_(STATE_UNINITIALIZED),
       synchronous_entry_(NULL),
@@ -309,12 +309,12 @@
 }
 
 int SimpleEntryImpl::DoomEntry(const CompletionCallback& callback) {
-  if (doomed_)
+  if (doom_state_ != DOOM_NONE)
     return net::OK;
   net_log_.AddEvent(net::NetLogEventType::SIMPLE_CACHE_ENTRY_DOOM_CALL);
   net_log_.AddEvent(net::NetLogEventType::SIMPLE_CACHE_ENTRY_DOOM_BEGIN);
 
-  MarkAsDoomed();
+  MarkAsDoomed(DOOM_QUEUED);
   if (backend_.get()) {
     if (optimistic_create_pending_doom_state_ == CREATE_NORMAL) {
       backend_->OnDoomStart(entry_hash_);
@@ -631,7 +631,8 @@
 void SimpleEntryImpl::ResetEntry() {
   // If we're doomed, we can't really do anything else with the entry, since
   // we no longer own the name and are disconnected from the active entry table.
-  state_ = doomed_ ? STATE_FAILURE : STATE_UNINITIALIZED;
+  // We preserve doom_state_ accross this entry for this same reason.
+  state_ = doom_state_ == DOOM_COMPLETED ? STATE_FAILURE : STATE_UNINITIALIZED;
   std::memset(crc32s_end_offset_, 0, sizeof(crc32s_end_offset_));
   std::memset(crc32s_, 0, sizeof(crc32s_));
   std::memset(have_written_, 0, sizeof(have_written_));
@@ -657,8 +658,9 @@
   *out_entry = this;
 }
 
-void SimpleEntryImpl::MarkAsDoomed() {
-  doomed_ = true;
+void SimpleEntryImpl::MarkAsDoomed(DoomState new_state) {
+  DCHECK_NE(DOOM_NONE, new_state);
+  doom_state_ = new_state;
   if (!backend_.get())
     return;
   backend_->index()->Remove(entry_hash_);
@@ -924,7 +926,7 @@
   }
 
   state_ = STATE_IO_PENDING;
-  if (!doomed_ && backend_.get())
+  if (doom_state_ == DOOM_NONE && backend_.get())
     backend_->index()->UseIfExists(entry_hash_);
 
   // Figure out if we should be computing the checksum for this read,
@@ -1012,7 +1014,7 @@
     }
   }
   state_ = STATE_IO_PENDING;
-  if (!doomed_ && backend_.get())
+  if (doom_state_ == DOOM_NONE && backend_.get())
     backend_->index()->UseIfExists(entry_hash_);
 
   // Any stream 1 write invalidates the prefetched data.
@@ -1046,10 +1048,13 @@
   // Retain a reference to |buf| in |reply| instead of |task|, so that we can
   // reduce cross thread malloc/free pairs. The cross thread malloc/free pair
   // increases the apparent memory usage due to the thread cached free list.
+  // TODO(morlovich): Remove the doom_state_ argument to WriteData once the
+  // follow up implementation of doom as renaming rather than delete is in, as
+  // with it creating a new stream 2 of doomed entry will just work.
   Closure task = base::Bind(
       &SimpleSynchronousEntry::WriteData, base::Unretained(synchronous_entry_),
-      SimpleSynchronousEntry::EntryOperationData(stream_index, offset, buf_len,
-                                                 truncate, doomed_),
+      SimpleSynchronousEntry::EntryOperationData(
+          stream_index, offset, buf_len, truncate, doom_state_ != DOOM_NONE),
       base::Unretained(buf), entry_stat.get(), result.get());
   Closure reply = base::Bind(&SimpleEntryImpl::WriteOperationComplete, this,
                              stream_index, callback, base::Passed(&entry_stat),
@@ -1196,6 +1201,13 @@
 }
 
 void SimpleEntryImpl::DoomEntryInternal(const CompletionCallback& callback) {
+  if (doom_state_ == DOOM_COMPLETED) {
+    // During the time we were sitting on a queue, some operation failed
+    // and cleaned our files up, so we don't have to do anything.
+    DoomOperationComplete(callback, state_, net::OK);
+    return;
+  }
+
   if (!backend_) {
     // If there's no backend, we want to truncate the files rather than delete
     // them. Removing files will update the entry directory's mtime, which will
@@ -1257,7 +1269,7 @@
   // Make sure to keep the index up-to-date. We likely already did this when
   // CreateEntry was called, but it's possible we were sitting on a queue
   // after an op that removed us.
-  if (backend_ && !doomed_)
+  if (backend_ && doom_state_ == DOOM_NONE)
     backend_->index()->Insert(entry_hash_);
 
   // If out_entry is NULL, it means we already called ReturnEntryToCaller from
@@ -1315,7 +1327,7 @@
   DCHECK(result);
   if (*result < 0) {
     state_ = STATE_FAILURE;
-    MarkAsDoomed();
+    MarkAsDoomed(DOOM_COMPLETED);
   } else {
     state_ = STATE_READY;
     UpdateDataFromEntryStat(entry_stat);
@@ -1446,6 +1458,7 @@
     State state_to_restore,
     int result) {
   state_ = state_to_restore;
+  doom_state_ = DOOM_COMPLETED;
   net_log_.AddEvent(net::NetLogEventType::SIMPLE_CACHE_ENTRY_DOOM_END);
   PostClientCallback(callback, result);
   RunNextOperationIfNeeded();
@@ -1493,7 +1506,7 @@
     data_size_[i] = entry_stat.data_size(i);
   }
   sparse_data_size_ = entry_stat.sparse_data_size();
-  if (!doomed_ && backend_.get()) {
+  if (doom_state_ == DOOM_NONE && backend_.get()) {
     backend_->index()->UpdateEntrySize(
         entry_hash_, base::checked_cast<uint32_t>(GetDiskUsage()));
   }
diff --git a/net/disk_cache/simple/simple_entry_impl.h b/net/disk_cache/simple/simple_entry_impl.h
index 1a7027da..d7fc91f 100644
--- a/net/disk_cache/simple/simple_entry_impl.h
+++ b/net/disk_cache/simple/simple_entry_impl.h
@@ -158,6 +158,19 @@
     STATE_FAILURE,
   };
 
+  enum DoomState {
+    // No attempt to doom the entry has been made.
+    DOOM_NONE,
+
+    // We have moved ourselves to |entries_pending_doom_| and have queued an
+    // operation to actually update the disk, but haven't completed it yet.
+    DOOM_QUEUED,
+
+    // The disk has been updated. This corresponds to the state where we
+    // are in neither |entries_pending_doom_| nor |active_entries_|.
+    DOOM_COMPLETED,
+  };
+
   // Used in histograms, please only add entries at the end.
   enum CheckCrcResult {
     CRC_CHECK_NEVER_READ_TO_END = 0,
@@ -185,10 +198,11 @@
   // count.
   void ReturnEntryToCaller(Entry** out_entry);
 
-  // An error occured, and the SimpleSynchronousEntry should have Doomed
-  // us at this point. We need to remove |this| from the Backend and the
-  // index.
-  void MarkAsDoomed();
+  // Remove |this| from the Backend and the index, either because
+  // SimpleSynchronousEntry has detected an error or because we are about to
+  // be dooming it ourselves and want it to be tracked in
+  // |entries_pending_doom_| instead.
+  void MarkAsDoomed(DoomState doom_state);
 
   // Runs the next operation in the queue, if any and if there is no other
   // operation running at the moment.
@@ -371,7 +385,7 @@
   // notify the backend when this entry not used by any callers.
   int open_count_;
 
-  bool doomed_;
+  DoomState doom_state_;
 
   enum {
     CREATE_NORMAL,
diff --git a/net/http/http_proxy_client_socket_wrapper.cc b/net/http/http_proxy_client_socket_wrapper.cc
index f34f0f9..f9fe475d 100644
--- a/net/http/http_proxy_client_socket_wrapper.cc
+++ b/net/http/http_proxy_client_socket_wrapper.cc
@@ -17,6 +17,7 @@
 #include "net/log/net_log_event_type.h"
 #include "net/log/net_log_source.h"
 #include "net/log/net_log_source_type.h"
+#include "net/quic/chromium/quic_http_utils.h"
 #include "net/quic/chromium/quic_proxy_client_socket.h"
 #include "net/socket/client_socket_handle.h"
 #include "net/socket/socket_tag.h"
@@ -659,6 +660,9 @@
   std::unique_ptr<QuicChromiumClientStream::Handle> quic_stream =
       quic_session_->ReleaseStream();
 
+  SpdyPriority spdy_priority = ConvertRequestPriorityToQuicPriority(priority_);
+  quic_stream->SetPriority(spdy_priority);
+
   transport_socket_.reset(new QuicProxyClientSocket(
       std::move(quic_stream), std::move(quic_session_), user_agent_, endpoint_,
       net_log_, http_auth_controller_.get()));
diff --git a/net/http/transport_security_state.cc b/net/http/transport_security_state.cc
index 6eaa321..b83add71 100644
--- a/net/http/transport_security_state.cc
+++ b/net/http/transport_security_state.cc
@@ -44,7 +44,7 @@
 #include "net/http/transport_security_state_ct_policies.inc"
 
 #if BUILDFLAG(INCLUDE_TRANSPORT_SECURITY_STATE_PRELOAD_LIST)
-#include "net/http/transport_security_state_static.h"
+#include "net/http/transport_security_state_static.h"  // nogncheck
 // Points to the active transport security state source.
 const TransportSecurityStateSource* const kDefaultHSTSSource = &kHSTSSource;
 #else
diff --git a/net/log/net_log_event_type_list.h b/net/log/net_log_event_type_list.h
index 594674b..e23f2e6 100644
--- a/net/log/net_log_event_type_list.h
+++ b/net/log/net_log_event_type_list.h
@@ -2540,10 +2540,6 @@
 //   {
 //     "cert_status": <Bitmask of CERT_STATUS_*
 //                     from net/base/cert_status_flags.h>
-//     "common_name_fallback_used": <True if a fallback to the common name
-//                                   was used when matching the host
-//                                   name, rather than using the
-//                                   subjectAltName.>
 //     "has_md2": <True if a certificate in the certificate chain is signed with
 //                 a MD2 signature.>
 //     "has_md4": <True if a certificate in the certificate chain is signed with
diff --git a/net/quic/chromium/quic_connection_logger.cc b/net/quic/chromium/quic_connection_logger.cc
index 86f4d56..048c492 100644
--- a/net/quic/chromium/quic_connection_logger.cc
+++ b/net/quic/chromium/quic_connection_logger.cc
@@ -245,7 +245,7 @@
   // Only the subjects are logged so that we can investigate connection pooling.
   // More fields could be logged in the future.
   std::vector<std::string> dns_names;
-  cert->GetDNSNames(&dns_names);
+  cert->GetSubjectAltName(&dns_names, nullptr);
   auto dict = std::make_unique<base::DictionaryValue>();
   auto subjects = std::make_unique<base::ListValue>();
   for (auto& dns_name : dns_names) {
diff --git a/net/quic/chromium/quic_network_transaction_unittest.cc b/net/quic/chromium/quic_network_transaction_unittest.cc
index cf42d5c..545e405 100644
--- a/net/quic/chromium/quic_network_transaction_unittest.cc
+++ b/net/quic/chromium/quic_network_transaction_unittest.cc
@@ -1287,8 +1287,8 @@
       ImportCertFromFile(GetTestCertsDirectory(), "wildcard.pem"));
   ASSERT_TRUE(cert.get());
   // This certificate is valid for the proxy, but not for the origin.
-  EXPECT_TRUE(cert->VerifyNameMatch(proxy_host, false));
-  EXPECT_FALSE(cert->VerifyNameMatch(origin_host, false));
+  EXPECT_TRUE(cert->VerifyNameMatch(proxy_host));
+  EXPECT_FALSE(cert->VerifyNameMatch(origin_host));
   ProofVerifyDetailsChromium verify_details;
   verify_details.cert_verify_result.verified_cert = cert;
   crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details);
@@ -1314,8 +1314,8 @@
   ASSERT_TRUE(cert.get());
   // TODO(rch): the connection should be "to" the origin, so if the cert is
   // valid for the origin but not the alternative, that should work too.
-  EXPECT_TRUE(cert->VerifyNameMatch(origin.host(), false));
-  EXPECT_TRUE(cert->VerifyNameMatch(alternative.host(), false));
+  EXPECT_TRUE(cert->VerifyNameMatch(origin.host()));
+  EXPECT_TRUE(cert->VerifyNameMatch(alternative.host()));
   ProofVerifyDetailsChromium verify_details;
   verify_details.cert_verify_result.verified_cert = cert;
   crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details);
@@ -3196,8 +3196,8 @@
 
   scoped_refptr<X509Certificate> cert(
       ImportCertFromFile(GetTestCertsDirectory(), "wildcard.pem"));
-  ASSERT_TRUE(cert->VerifyNameMatch("www.example.org", false));
-  ASSERT_TRUE(cert->VerifyNameMatch("mail.example.org", false));
+  ASSERT_TRUE(cert->VerifyNameMatch("www.example.org"));
+  ASSERT_TRUE(cert->VerifyNameMatch("mail.example.org"));
 
   ProofVerifyDetailsChromium verify_details;
   verify_details.cert_verify_result.verified_cert = cert;
@@ -3269,8 +3269,8 @@
 
   scoped_refptr<X509Certificate> cert(
       ImportCertFromFile(GetTestCertsDirectory(), "wildcard.pem"));
-  ASSERT_TRUE(cert->VerifyNameMatch("www.example.org", false));
-  ASSERT_TRUE(cert->VerifyNameMatch("mail.example.org", false));
+  ASSERT_TRUE(cert->VerifyNameMatch("www.example.org"));
+  ASSERT_TRUE(cert->VerifyNameMatch("mail.example.org"));
 
   ProofVerifyDetailsChromium verify_details;
   verify_details.cert_verify_result.verified_cert = cert;
@@ -5780,8 +5780,8 @@
 
   scoped_refptr<X509Certificate> cert(
       ImportCertFromFile(GetTestCertsDirectory(), "wildcard.pem"));
-  ASSERT_FALSE(cert->VerifyNameMatch(origin1_, false));
-  ASSERT_TRUE(cert->VerifyNameMatch(origin2_, false));
+  ASSERT_FALSE(cert->VerifyNameMatch(origin1_));
+  ASSERT_TRUE(cert->VerifyNameMatch(origin2_));
 
   ProofVerifyDetailsChromium verify_details;
   verify_details.cert_verify_result.verified_cert = cert;
@@ -5819,9 +5819,9 @@
 
   scoped_refptr<X509Certificate> cert(
       ImportCertFromFile(GetTestCertsDirectory(), "wildcard.pem"));
-  ASSERT_TRUE(cert->VerifyNameMatch(origin1_, false));
-  ASSERT_TRUE(cert->VerifyNameMatch(origin2_, false));
-  ASSERT_FALSE(cert->VerifyNameMatch(kDifferentHostname, false));
+  ASSERT_TRUE(cert->VerifyNameMatch(origin1_));
+  ASSERT_TRUE(cert->VerifyNameMatch(origin2_));
+  ASSERT_FALSE(cert->VerifyNameMatch(kDifferentHostname));
 
   ProofVerifyDetailsChromium verify_details;
   verify_details.cert_verify_result.verified_cert = cert;
@@ -5890,14 +5890,14 @@
 
   scoped_refptr<X509Certificate> cert1(
       ImportCertFromFile(GetTestCertsDirectory(), "wildcard.pem"));
-  ASSERT_TRUE(cert1->VerifyNameMatch(origin1_, false));
-  ASSERT_FALSE(cert1->VerifyNameMatch(origin2_, false));
-  ASSERT_FALSE(cert1->VerifyNameMatch(kDifferentHostname, false));
+  ASSERT_TRUE(cert1->VerifyNameMatch(origin1_));
+  ASSERT_FALSE(cert1->VerifyNameMatch(origin2_));
+  ASSERT_FALSE(cert1->VerifyNameMatch(kDifferentHostname));
 
   scoped_refptr<X509Certificate> cert2(
       ImportCertFromFile(GetTestCertsDirectory(), "spdy_pooling.pem"));
-  ASSERT_TRUE(cert2->VerifyNameMatch(origin2_, false));
-  ASSERT_FALSE(cert2->VerifyNameMatch(kDifferentHostname, false));
+  ASSERT_TRUE(cert2->VerifyNameMatch(origin2_));
+  ASSERT_FALSE(cert2->VerifyNameMatch(kDifferentHostname));
 
   ProofVerifyDetailsChromium verify_details1;
   verify_details1.cert_verify_result.verified_cert = cert1;
@@ -6628,6 +6628,41 @@
   EXPECT_TRUE(mock_quic_data.AllWriteDataConsumed());
 }
 
+// Makes sure the CONNECT request packet for a QUIC proxy contains the correct
+// HTTP/2 stream dependency and weights given the request priority.
+TEST_P(QuicNetworkTransactionTest, QuicProxyRequestPriority) {
+  session_params_.enable_quic = true;
+  proxy_resolution_service_ = ProxyResolutionService::CreateFixedFromPacResult(
+      "QUIC proxy.example.org:70");
+
+  const RequestPriority request_priority = MEDIUM;
+
+  MockQuicData mock_quic_data;
+  QuicStreamOffset header_stream_offset = 0;
+  mock_quic_data.AddWrite(
+      ConstructInitialSettingsPacket(1, &header_stream_offset));
+  mock_quic_data.AddWrite(ConstructClientRequestHeadersPacket(
+      2, GetNthClientInitiatedStreamId(0), true, false, request_priority,
+      ConnectRequestHeaders("mail.example.org:443"), 0, &header_stream_offset));
+  // Return an error, so the transaction stops here (this test isn't interested
+  // in the rest).
+  mock_quic_data.AddRead(ASYNC, ERR_CONNECTION_FAILED);
+
+  mock_quic_data.AddSocketDataToFactory(&socket_factory_);
+
+  CreateSession();
+
+  request_.url = GURL("https://mail.example.org/");
+  HttpNetworkTransaction trans(request_priority, session_.get());
+  TestCompletionCallback callback;
+  int rv = trans.Start(&request_, callback.callback(), net_log_.bound());
+  EXPECT_EQ(ERR_IO_PENDING, rv);
+  EXPECT_EQ(ERR_QUIC_PROTOCOL_ERROR, callback.WaitForResult());
+
+  EXPECT_TRUE(mock_quic_data.AllReadDataConsumed());
+  EXPECT_TRUE(mock_quic_data.AllWriteDataConsumed());
+}
+
 // Test the request-challenge-retry sequence for basic auth, over a QUIC
 // connection when setting up a QUIC proxy tunnel.
 TEST_P(QuicNetworkTransactionTest, QuicProxyAuth) {
diff --git a/net/quic/chromium/quic_stream_factory_test.cc b/net/quic/chromium/quic_stream_factory_test.cc
index 8ac1580..e3ea082f 100644
--- a/net/quic/chromium/quic_stream_factory_test.cc
+++ b/net/quic/chromium/quic_stream_factory_test.cc
@@ -5482,8 +5482,8 @@
 
   scoped_refptr<X509Certificate> cert(
       ImportCertFromFile(GetTestCertsDirectory(), "wildcard.pem"));
-  ASSERT_FALSE(cert->VerifyNameMatch(origin1_.host(), false));
-  ASSERT_TRUE(cert->VerifyNameMatch(origin2_.host(), false));
+  ASSERT_FALSE(cert->VerifyNameMatch(origin1_.host()));
+  ASSERT_TRUE(cert->VerifyNameMatch(origin2_.host()));
 
   ProofVerifyDetailsChromium verify_details;
   verify_details.cert_verify_result.verified_cert = cert;
@@ -5517,9 +5517,9 @@
 
   scoped_refptr<X509Certificate> cert(
       ImportCertFromFile(GetTestCertsDirectory(), "wildcard.pem"));
-  ASSERT_TRUE(cert->VerifyNameMatch(origin1_.host(), false));
-  ASSERT_TRUE(cert->VerifyNameMatch(origin2_.host(), false));
-  ASSERT_FALSE(cert->VerifyNameMatch(kDifferentHostname, false));
+  ASSERT_TRUE(cert->VerifyNameMatch(origin1_.host()));
+  ASSERT_TRUE(cert->VerifyNameMatch(origin2_.host()));
+  ASSERT_FALSE(cert->VerifyNameMatch(kDifferentHostname));
 
   ProofVerifyDetailsChromium verify_details;
   verify_details.cert_verify_result.verified_cert = cert;
@@ -5582,9 +5582,9 @@
 
   scoped_refptr<X509Certificate> cert(
       ImportCertFromFile(GetTestCertsDirectory(), "wildcard.pem"));
-  ASSERT_TRUE(cert->VerifyNameMatch(origin1_.host(), false));
-  ASSERT_TRUE(cert->VerifyNameMatch(origin2_.host(), false));
-  ASSERT_FALSE(cert->VerifyNameMatch(kDifferentHostname, false));
+  ASSERT_TRUE(cert->VerifyNameMatch(origin1_.host()));
+  ASSERT_TRUE(cert->VerifyNameMatch(origin2_.host()));
+  ASSERT_FALSE(cert->VerifyNameMatch(kDifferentHostname));
 
   ProofVerifyDetailsChromium verify_details1;
   verify_details1.cert_verify_result.verified_cert = cert;
@@ -5662,9 +5662,9 @@
 
   scoped_refptr<X509Certificate> cert1(
       ImportCertFromFile(GetTestCertsDirectory(), "wildcard.pem"));
-  ASSERT_TRUE(cert1->VerifyNameMatch(origin1_.host(), false));
-  ASSERT_FALSE(cert1->VerifyNameMatch(origin2_.host(), false));
-  ASSERT_FALSE(cert1->VerifyNameMatch(kDifferentHostname, false));
+  ASSERT_TRUE(cert1->VerifyNameMatch(origin1_.host()));
+  ASSERT_FALSE(cert1->VerifyNameMatch(origin2_.host()));
+  ASSERT_FALSE(cert1->VerifyNameMatch(kDifferentHostname));
 
   ProofVerifyDetailsChromium verify_details1;
   verify_details1.cert_verify_result.verified_cert = cert1;
@@ -5673,8 +5673,8 @@
 
   scoped_refptr<X509Certificate> cert2(
       ImportCertFromFile(GetTestCertsDirectory(), "spdy_pooling.pem"));
-  ASSERT_TRUE(cert2->VerifyNameMatch(origin2_.host(), false));
-  ASSERT_FALSE(cert2->VerifyNameMatch(kDifferentHostname, false));
+  ASSERT_TRUE(cert2->VerifyNameMatch(origin2_.host()));
+  ASSERT_FALSE(cert2->VerifyNameMatch(kDifferentHostname));
 
   ProofVerifyDetailsChromium verify_details2;
   verify_details2.cert_verify_result.verified_cert = cert2;
diff --git a/net/quic/test_tools/mock_crypto_client_stream.cc b/net/quic/test_tools/mock_crypto_client_stream.cc
index 36c183e..2ccd8f0 100644
--- a/net/quic/test_tools/mock_crypto_client_stream.cc
+++ b/net/quic/test_tools/mock_crypto_client_stream.cc
@@ -55,7 +55,7 @@
 bool MockCryptoClientStream::CryptoConnect() {
   if (proof_verify_details_) {
     if (!proof_verify_details_->cert_verify_result.verified_cert
-             ->VerifyNameMatch(server_id_.host(), false)) {
+             ->VerifyNameMatch(server_id_.host())) {
       handshake_confirmed_ = false;
       encryption_established_ = false;
       session()->connection()->CloseConnection(
diff --git a/net/spdy/chromium/spdy_session.cc b/net/spdy/chromium/spdy_session.cc
index 3fc1782..ee6fb9c5 100644
--- a/net/spdy/chromium/spdy_session.cc
+++ b/net/spdy/chromium/spdy_session.cc
@@ -691,7 +691,7 @@
     return false;
   }
 
-  if (!ssl_info.cert->VerifyNameMatch(new_hostname, false))
+  if (!ssl_info.cert->VerifyNameMatch(new_hostname))
     return false;
 
   SpdyString pinning_failure_log;
diff --git a/net/ssl/ssl_config.cc b/net/ssl/ssl_config.cc
index 75ea0f1d..883c7f8d 100644
--- a/net/ssl/ssl_config.cc
+++ b/net/ssl/ssl_config.cc
@@ -25,7 +25,6 @@
     : rev_checking_enabled(false),
       rev_checking_required_local_anchors(false),
       sha1_local_anchors_enabled(true),
-      common_name_fallback_local_anchors_enabled(true),
       symantec_enforcement_disabled(false),
       version_min(kDefaultSSLVersionMin),
       version_max(kDefaultSSLVersionMax),
@@ -68,8 +67,6 @@
     flags |= CertVerifier::VERIFY_REV_CHECKING_REQUIRED_LOCAL_ANCHORS;
   if (sha1_local_anchors_enabled)
     flags |= CertVerifier::VERIFY_ENABLE_SHA1_LOCAL_ANCHORS;
-  if (common_name_fallback_local_anchors_enabled)
-    flags |= CertVerifier::VERIFY_ENABLE_COMMON_NAME_FALLBACK_LOCAL_ANCHORS;
   if (symantec_enforcement_disabled)
     flags |= CertVerifier::VERIFY_DISABLE_SYMANTEC_ENFORCEMENT;
 
diff --git a/net/ssl/ssl_config.h b/net/ssl/ssl_config.h
index d1d6771..a6e7973 100644
--- a/net/ssl/ssl_config.h
+++ b/net/ssl/ssl_config.h
@@ -87,12 +87,6 @@
   // local (non-public) trust anchor should be allowed.
   bool sha1_local_anchors_enabled;
 
-  // common_name_fallback_local_anchors_enabled is true if certificates which
-  // only have a commonName in the Subject (i.e. lacking a subjectAltName)
-  // should be checked if the name matches. Only those issued by a local
-  // (non-public) trust anchor will be allowed to match.
-  bool common_name_fallback_local_anchors_enabled;
-
   // symantec_enforcement_disabled is true if the policies outlined in
   // https://security.googleblog.com/2017/09/chromes-plan-to-distrust-symantec.html
   // should not be enforced.
diff --git a/net/ssl/ssl_config_service.cc b/net/ssl/ssl_config_service.cc
index f6e341b..1654c49a5 100644
--- a/net/ssl/ssl_config_service.cc
+++ b/net/ssl/ssl_config_service.cc
@@ -80,7 +80,6 @@
       std::tie(old_config.rev_checking_enabled,
                old_config.rev_checking_required_local_anchors,
                old_config.sha1_local_anchors_enabled,
-               old_config.common_name_fallback_local_anchors_enabled,
                old_config.version_min, old_config.version_max,
                old_config.tls13_variant, old_config.disabled_cipher_suites,
                old_config.channel_id_enabled, old_config.false_start_enabled,
@@ -88,7 +87,6 @@
       std::tie(new_config.rev_checking_enabled,
                new_config.rev_checking_required_local_anchors,
                new_config.sha1_local_anchors_enabled,
-               new_config.common_name_fallback_local_anchors_enabled,
                new_config.version_min, new_config.version_max,
                new_config.tls13_variant, new_config.disabled_cipher_suites,
                new_config.channel_id_enabled, new_config.false_start_enabled,
diff --git a/net/ssl/ssl_config_service_unittest.cc b/net/ssl/ssl_config_service_unittest.cc
index 6dac67b..b0d41a3 100644
--- a/net/ssl/ssl_config_service_unittest.cc
+++ b/net/ssl/ssl_config_service_unittest.cc
@@ -67,7 +67,6 @@
   initial_config.rev_checking_enabled = true;
   initial_config.rev_checking_required_local_anchors = false;
   initial_config.sha1_local_anchors_enabled = true;
-  initial_config.common_name_fallback_local_anchors_enabled = true;
   initial_config.false_start_enabled = false;
   initial_config.require_ecdhe = false;
   initial_config.version_min = SSL_PROTOCOL_VERSION_TLS1;
@@ -91,10 +90,6 @@
   EXPECT_CALL(observer, OnSSLConfigChanged()).Times(1);
   mock_service->SetSSLConfig(initial_config);
 
-  initial_config.common_name_fallback_local_anchors_enabled = false;
-  EXPECT_CALL(observer, OnSSLConfigChanged()).Times(1);
-  mock_service->SetSSLConfig(initial_config);
-
   initial_config.false_start_enabled = true;
   EXPECT_CALL(observer, OnSSLConfigChanged()).Times(1);
   mock_service->SetSSLConfig(initial_config);
diff --git a/net/test/tcp_socket_proxy_unittest.cc b/net/test/tcp_socket_proxy_unittest.cc
index 08cb90d..d85e142 100644
--- a/net/test/tcp_socket_proxy_unittest.cc
+++ b/net/test/tcp_socket_proxy_unittest.cc
@@ -6,6 +6,7 @@
 
 #include "base/message_loop/message_loop.h"
 #include "base/threading/thread.h"
+#include "build/build_config.h"
 #include "net/base/io_buffer.h"
 #include "net/base/test_completion_callback.h"
 #include "net/socket/tcp_client_socket.h"
@@ -129,7 +130,13 @@
 
 // Close socket on the server side and verify that it's closed on the client
 // side.
-TEST_F(TcpSocketProxyTest, DisconnectServer) {
+// TODO(crbug.com/804429): This test hangs occasionally on iOS.
+#if defined(OS_IOS)
+#define MAYBE_DisconnectServer DISABLED_DisconnectServer
+#else
+#define MAYBE_DisconnectServer DisconnectServer
+#endif
+TEST_F(TcpSocketProxyTest, MAYBE_DisconnectServer) {
   std::unique_ptr<StreamSocket> client_socket;
   std::unique_ptr<StreamSocket> server_socket;
   MakeConnection(&client_socket, &server_socket);
@@ -139,7 +146,13 @@
 
 // Close socket on the client side and verify that it's closed on the server
 // side.
-TEST_F(TcpSocketProxyTest, DisconnectClient) {
+// TODO(crbug.com/804429): This test hangs occasionally on iOS.
+#if defined(OS_IOS)
+#define MAYBE_DisconnectClient DISABLED_DisconnectClient
+#else
+#define MAYBE_DisconnectClient DisconnectClient
+#endif
+TEST_F(TcpSocketProxyTest, MAYBE_DisconnectClient) {
   std::unique_ptr<StreamSocket> client_socket;
   std::unique_ptr<StreamSocket> server_socket;
   MakeConnection(&client_socket, &server_socket);
diff --git a/net/tools/cert_verify_tool/verify_using_cert_verify_proc.cc b/net/tools/cert_verify_tool/verify_using_cert_verify_proc.cc
index 38f7c18f..01cfe40 100644
--- a/net/tools/cert_verify_tool/verify_using_cert_verify_proc.cc
+++ b/net/tools/cert_verify_tool/verify_using_cert_verify_proc.cc
@@ -92,8 +92,6 @@
     std::cout << "is_issued_by_known_root\n";
   if (result.is_issued_by_additional_trust_anchor)
     std::cout << "is_issued_by_additional_trust_anchor\n";
-  if (result.common_name_fallback_used)
-    std::cout << "common_name_fallback_used\n";
 
   if (result.verified_cert) {
     std::cout << "chain:\n "
diff --git a/net/tools/testserver/minica.py b/net/tools/testserver/minica.py
index ff35b9cd..17a6e1f 100644
--- a/net/tools/testserver/minica.py
+++ b/net/tools/testserver/minica.py
@@ -215,7 +215,6 @@
         ] + ([path_len] if path_len is not None else []) # Path len
         ))),
       ]))
-
   if ip_sans is not None or dns_sans is not None:
     sans = []
     if dns_sans is not None:
@@ -475,7 +474,11 @@
   return (cert_pem + LEAF_KEY_PEM, ocsp_der)
 
 
-def GenerateCertKeyAndIntermediate(subject, ca_issuers_url, serial=0):
+def GenerateCertKeyAndIntermediate(subject,
+                                   ca_issuers_url,
+                                   ip_sans=None,
+                                   dns_sans=None,
+                                   serial=0):
   '''Returns a (cert_and_key_pem, intermediate_cert_pem) where:
        * cert_and_key_pem contains a certificate and private key in PEM format
          with the given subject common name and caIssuers URL.
@@ -483,8 +486,10 @@
          cert_and_key_pem and was signed by ocsp-test-root.pem.'''
   if serial == 0:
     serial = RandomNumber(16)
+
   target_cert_der = MakeCertificate(INTERMEDIATE_CN, bytes(subject), serial,
                                     LEAF_KEY, INTERMEDIATE_KEY,
+                                    ip_sans=ip_sans, dns_sans=dns_sans,
                                     ca_issuers_url=bytes(ca_issuers_url))
   target_cert_pem = DERToPEM(target_cert_der)
 
diff --git a/net/tools/testserver/testserver.py b/net/tools/testserver/testserver.py
index 4ec4831..b2a1ccbc 100755
--- a/net/tools/testserver/testserver.py
+++ b/net/tools/testserver/testserver.py
@@ -42,6 +42,7 @@
 # Insert at the beginning of the path, we want to use our copies of the library
 # unconditionally (since they contain modifications from anything that might be
 # obtained from e.g. PyPi).
+sys.path.insert(0, os.path.join(ROOT_DIR, 'third_party', 'pyftpdlib', 'src'))
 sys.path.insert(0, os.path.join(ROOT_DIR, 'third_party', 'pywebsocket', 'src'))
 sys.path.insert(0, os.path.join(ROOT_DIR, 'third_party', 'tlslite'))
 
@@ -1895,6 +1896,20 @@
        port == 0:
       host = "127.0.0.1"
 
+    # Construct the subjectAltNames for any ad-hoc generated certificates.
+    # As host can be either a DNS name or IP address, attempt to determine
+    # which it is, so it can be placed in the appropriate SAN.
+    dns_sans = None
+    ip_sans = None
+    ip = None
+    try:
+      ip = socket.inet_aton(host)
+      ip_sans = [ip]
+    except socket.error:
+      pass
+    if ip is None:
+      dns_sans = [host]
+
     if self.options.server_type == SERVER_HTTP:
       if self.options.https:
         pem_cert_and_key = None
@@ -1918,6 +1933,7 @@
           (pem_cert_and_key, intermediate_cert_der) = \
               minica.GenerateCertKeyAndIntermediate(
                   subject = self.options.cert_common_name,
+                  ip_sans=ip_sans, dns_sans=dns_sans,
                   ca_issuers_url =
                       ("http://%s:%d/ca_issuers" % (host, ocsp_server_port)),
                   serial = self.options.cert_serial)
@@ -1995,6 +2011,8 @@
 
           (pem_cert_and_key, ocsp_der) = minica.GenerateCertKeyAndOCSP(
               subject = self.options.cert_common_name,
+              ip_sans = ip_sans,
+              dns_sans = dns_sans,
               ocsp_url = ("http://%s:%d/ocsp" % (host, ocsp_server_port)),
               ocsp_states = ocsp_states,
               ocsp_dates = ocsp_dates,
diff --git a/pdf/BUILD.gn b/pdf/BUILD.gn
index 34c33a4..a68f013 100644
--- a/pdf/BUILD.gn
+++ b/pdf/BUILD.gn
@@ -4,6 +4,7 @@
 
 import("//build/buildflag_header.gni")
 import("//build/config/features.gni")
+import("//build/config/jumbo.gni")
 import("//pdf/features.gni")
 import("//testing/test.gni")
 import("//third_party/pdfium/pdfium.gni")
@@ -17,9 +18,10 @@
 if (enable_pdf) {
   pdf_engine = 0  # 0 PDFium
 
-  static_library("pdf") {
+  jumbo_component("pdf") {
     deps = [
       "//base",
+      "//base:i18n",
       "//gin",
       "//net",
       "//ppapi/cpp:objects",
@@ -28,6 +30,11 @@
       "//ui/gfx/range",
     ]
 
+    public = [
+      "pdf.h",
+      "pdf_ppapi.h",
+    ]
+
     sources = [
       "chunk_stream.h",
       "document_loader.cc",
@@ -44,6 +51,9 @@
       "pdf.h",
       "pdf_engine.cc",
       "pdf_engine.h",
+      "pdf_export.h",
+      "pdf_ppapi.cc",
+      "pdf_ppapi.h",
       "preview_mode_client.cc",
       "preview_mode_client.h",
       "range_set.cc",
@@ -79,7 +89,10 @@
       ]
     }
 
-    defines = [ "PDFIUM_PRINT_TEXT_WITH_GDI" ]
+    defines = [
+      "PDF_IMPLEMENTATION",
+      "PDFIUM_PRINT_TEXT_WITH_GDI",
+    ]
     if (pdf_enable_xfa) {
       defines += [ "PDF_ENABLE_XFA" ]
     }
diff --git a/pdf/document_loader.h b/pdf/document_loader.h
index 52a5070..befe488 100644
--- a/pdf/document_loader.h
+++ b/pdf/document_loader.h
@@ -15,18 +15,19 @@
 #include <vector>
 
 #include "pdf/chunk_stream.h"
+#include "pdf/pdf_export.h"
 #include "ppapi/utility/completion_callback_factory.h"
 
 namespace chrome_pdf {
 
 class URLLoaderWrapper;
 
-class DocumentLoader {
+class PDF_EXPORT DocumentLoader {
  public:
   // Number was chosen in crbug.com/78264#c8
   static constexpr uint32_t kDefaultRequestSize = 65536;
 
-  class Client {
+  class PDF_EXPORT Client {
    public:
     virtual ~Client();
 
diff --git a/pdf/out_of_process_instance.cc b/pdf/out_of_process_instance.cc
index 1bb3729..1496ce3 100644
--- a/pdf/out_of_process_instance.cc
+++ b/pdf/out_of_process_instance.cc
@@ -329,12 +329,12 @@
                     const std::string& type,
                     const std::string& message,
                     const std::string& default_answer) {
-  const PPB_Instance_Private* interface =
+  const PPB_Instance_Private* ppb_interface =
       reinterpret_cast<const PPB_Instance_Private*>(
           pp::Module::Get()->GetBrowserInterface(
               PPB_INSTANCE_PRIVATE_INTERFACE));
-  pp::VarPrivate window(pp::PASS_REF,
-                        interface->GetWindowObject(instance->pp_instance()));
+  pp::VarPrivate window(
+      pp::PASS_REF, ppb_interface->GetWindowObject(instance->pp_instance()));
   if (default_answer.empty())
     return window.Call(type, message);
   return window.Call(type, message, default_answer);
diff --git a/pdf/pdf.cc b/pdf/pdf.cc
index b8a79d7..bde70c9 100644
--- a/pdf/pdf.cc
+++ b/pdf/pdf.cc
@@ -10,75 +10,12 @@
 #include <windows.h>
 #endif
 
-#include "base/command_line.h"
 #include "base/logging.h"
 #include "pdf/out_of_process_instance.h"
-#include "ppapi/c/ppp.h"
-#include "ppapi/cpp/private/internal_module.h"
-#include "ppapi/cpp/private/pdf.h"
-#include "v8/include/v8.h"
+#include "pdf/pdf_ppapi.h"
 
 namespace chrome_pdf {
 
-namespace {
-
-bool g_sdk_initialized_via_pepper = false;
-
-}  // namespace
-
-PDFModule::PDFModule() = default;
-
-PDFModule::~PDFModule() {
-  if (g_sdk_initialized_via_pepper) {
-    ShutdownSDK();
-    g_sdk_initialized_via_pepper = false;
-  }
-}
-
-bool PDFModule::Init() {
-  return true;
-}
-
-pp::Instance* PDFModule::CreateInstance(PP_Instance instance) {
-  if (!g_sdk_initialized_via_pepper) {
-    v8::StartupData natives;
-    v8::StartupData snapshot;
-    pp::PDF::GetV8ExternalSnapshotData(pp::InstanceHandle(instance),
-                                       &natives.data, &natives.raw_size,
-                                       &snapshot.data, &snapshot.raw_size);
-    if (natives.data) {
-      v8::V8::SetNativesDataBlob(&natives);
-      v8::V8::SetSnapshotDataBlob(&snapshot);
-    }
-    if (!InitializeSDK())
-      return nullptr;
-    g_sdk_initialized_via_pepper = true;
-  }
-
-  return new OutOfProcessInstance(instance);
-}
-
-// Implementation of Global PPP functions ---------------------------------
-int32_t PPP_InitializeModule(PP_Module module_id,
-                             PPB_GetInterface get_browser_interface) {
-  std::unique_ptr<PDFModule> module(new PDFModule);
-  if (!module->InternalInit(module_id, get_browser_interface))
-    return PP_ERROR_FAILED;
-
-  pp::InternalSetModuleSingleton(module.release());
-  return PP_OK;
-}
-
-void PPP_ShutdownModule() {
-  delete pp::Module::Get();
-  pp::InternalSetModuleSingleton(nullptr);
-}
-
-const void* PPP_GetInterface(const char* interface_name) {
-  auto* module = pp::Module::Get();
-  return module ? module->GetPluginInterface(interface_name) : nullptr;
-}
-
 #if defined(OS_WIN)
 bool RenderPDFPageToDC(const void* pdf_buffer,
                        int buffer_size,
@@ -94,7 +31,7 @@
                        bool keep_aspect_ratio,
                        bool center_in_bounds,
                        bool autorotate) {
-  if (!g_sdk_initialized_via_pepper) {
+  if (!IsSDKInitializedViaPepper()) {
     if (!InitializeSDK()) {
       return false;
     }
@@ -107,7 +44,7 @@
       autorotate);
   bool ret = engine_exports->RenderPDFPageToDC(pdf_buffer, buffer_size,
                                                page_number, settings, dc);
-  if (!g_sdk_initialized_via_pepper)
+  if (!IsSDKInitializedViaPepper())
     ShutdownSDK();
 
   return ret;
@@ -131,14 +68,14 @@
                    int buffer_size,
                    int* page_count,
                    double* max_page_width) {
-  if (!g_sdk_initialized_via_pepper) {
+  if (!IsSDKInitializedViaPepper()) {
     if (!InitializeSDK())
       return false;
   }
   PDFEngineExports* engine_exports = PDFEngineExports::Get();
   bool ret = engine_exports->GetPDFDocInfo(pdf_buffer, buffer_size, page_count,
                                            max_page_width);
-  if (!g_sdk_initialized_via_pepper)
+  if (!IsSDKInitializedViaPepper())
     ShutdownSDK();
 
   return ret;
@@ -149,7 +86,7 @@
                            int page_number,
                            double* width,
                            double* height) {
-  if (!g_sdk_initialized_via_pepper) {
+  if (!IsSDKInitializedViaPepper()) {
     if (!chrome_pdf::InitializeSDK())
       return false;
   }
@@ -157,7 +94,7 @@
       chrome_pdf::PDFEngineExports::Get();
   bool ret = engine_exports->GetPDFPageSizeByIndex(pdf_buffer, pdf_buffer_size,
                                                    page_number, width, height);
-  if (!g_sdk_initialized_via_pepper)
+  if (!IsSDKInitializedViaPepper())
     chrome_pdf::ShutdownSDK();
   return ret;
 }
@@ -170,7 +107,7 @@
                            int bitmap_height,
                            int dpi,
                            bool autorotate) {
-  if (!g_sdk_initialized_via_pepper) {
+  if (!IsSDKInitializedViaPepper()) {
     if (!InitializeSDK())
       return false;
   }
@@ -180,7 +117,7 @@
       autorotate);
   bool ret = engine_exports->RenderPDFPageToBitmap(
       pdf_buffer, pdf_buffer_size, page_number, settings, bitmap_buffer);
-  if (!g_sdk_initialized_via_pepper)
+  if (!IsSDKInitializedViaPepper())
     ShutdownSDK();
 
   return ret;
diff --git a/pdf/pdf.h b/pdf/pdf.h
index 6f69bdb3d..b4f5f3e 100644
--- a/pdf/pdf.h
+++ b/pdf/pdf.h
@@ -5,6 +5,8 @@
 #ifndef PDF_PDF_H_
 #define PDF_PDF_H_
 
+#include "build/build_config.h"
+#include "pdf/pdf_export.h"
 #include "ppapi/c/ppb.h"
 #include "ppapi/cpp/module.h"
 
@@ -20,21 +22,6 @@
 
 namespace chrome_pdf {
 
-class PDFModule : public pp::Module {
- public:
-  PDFModule();
-  ~PDFModule() override;
-
-  // pp::Module implementation.
-  bool Init() override;
-  pp::Instance* CreateInstance(PP_Instance instance) override;
-};
-
-int PPP_InitializeModule(PP_Module module_id,
-                         PPB_GetInterface get_browser_interface);
-void PPP_ShutdownModule();
-const void* PPP_GetInterface(const char* interface_name);
-
 #if defined(OS_WIN)
 // Printing modes - type to convert PDF to for printing
 enum PrintingMode {
@@ -71,35 +58,35 @@
 // |autorotate| specifies whether the final image should be rotated to match
 //     the output bound.
 // Returns false if the document or the page number are not valid.
-bool RenderPDFPageToDC(const void* pdf_buffer,
-                       int buffer_size,
-                       int page_number,
-                       HDC dc,
-                       int dpi,
-                       int bounds_origin_x,
-                       int bounds_origin_y,
-                       int bounds_width,
-                       int bounds_height,
-                       bool fit_to_bounds,
-                       bool stretch_to_bounds,
-                       bool keep_aspect_ratio,
-                       bool center_in_bounds,
-                       bool autorotate);
+PDF_EXPORT bool RenderPDFPageToDC(const void* pdf_buffer,
+                                  int buffer_size,
+                                  int page_number,
+                                  HDC dc,
+                                  int dpi,
+                                  int bounds_origin_x,
+                                  int bounds_origin_y,
+                                  int bounds_width,
+                                  int bounds_height,
+                                  bool fit_to_bounds,
+                                  bool stretch_to_bounds,
+                                  bool keep_aspect_ratio,
+                                  bool center_in_bounds,
+                                  bool autorotate);
 
-void SetPDFEnsureTypefaceCharactersAccessible(
+PDF_EXPORT void SetPDFEnsureTypefaceCharactersAccessible(
     PDFEnsureTypefaceCharactersAccessible func);
 
-void SetPDFUseGDIPrinting(bool enable);
+PDF_EXPORT void SetPDFUseGDIPrinting(bool enable);
 
-void SetPDFUsePrintMode(int mode);
+PDF_EXPORT void SetPDFUsePrintMode(int mode);
 #endif  // defined(OS_WIN)
 
 // |page_count| and |max_page_width| are optional and can be NULL.
 // Returns false if the document is not valid.
-bool GetPDFDocInfo(const void* pdf_buffer,
-                   int buffer_size,
-                   int* page_count,
-                   double* max_page_width);
+PDF_EXPORT bool GetPDFDocInfo(const void* pdf_buffer,
+                              int buffer_size,
+                              int* page_count,
+                              double* max_page_width);
 
 // Gets the dimensions of a specific page in a document.
 // |pdf_buffer| is the buffer that contains the entire PDF document to be
@@ -110,11 +97,11 @@
 // |width| is the output for the width of the page in points.
 // |height| is the output for the height of the page in points.
 // Returns false if the document or the page number are not valid.
-bool GetPDFPageSizeByIndex(const void* pdf_buffer,
-                           int pdf_buffer_size,
-                           int page_number,
-                           double* width,
-                           double* height);
+PDF_EXPORT bool GetPDFPageSizeByIndex(const void* pdf_buffer,
+                                      int pdf_buffer_size,
+                                      int page_number,
+                                      double* width,
+                                      double* height);
 
 // Renders PDF page into 4-byte per pixel BGRA color bitmap.
 // |pdf_buffer| is the buffer that contains the entire PDF document to be
@@ -128,14 +115,14 @@
 // |autorotate| specifies whether the final image should be rotated to match
 //     the output bound.
 // Returns false if the document or the page number are not valid.
-bool RenderPDFPageToBitmap(const void* pdf_buffer,
-                           int pdf_buffer_size,
-                           int page_number,
-                           void* bitmap_buffer,
-                           int bitmap_width,
-                           int bitmap_height,
-                           int dpi,
-                           bool autorotate);
+PDF_EXPORT bool RenderPDFPageToBitmap(const void* pdf_buffer,
+                                      int pdf_buffer_size,
+                                      int page_number,
+                                      void* bitmap_buffer,
+                                      int bitmap_width,
+                                      int bitmap_height,
+                                      int dpi,
+                                      bool autorotate);
 
 }  // namespace chrome_pdf
 
diff --git a/pdf/pdf_export.h b/pdf/pdf_export.h
new file mode 100644
index 0000000..8b3fc9e
--- /dev/null
+++ b/pdf/pdf_export.h
@@ -0,0 +1,29 @@
+// 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 PDF_PDF_EXPORT_H_
+#define PDF_PDF_EXPORT_H_
+
+#if defined(COMPONENT_BUILD)
+#if defined(WIN32)
+
+#if defined(PDF_IMPLEMENTATION)
+#define PDF_EXPORT __declspec(dllexport)
+#else
+#define PDF_EXPORT __declspec(dllimport)
+#endif  // defined(PDF_IMPLEMENTATION)
+
+#else  // defined(WIN32)
+#if defined(PDF_IMPLEMENTATION)
+#define PDF_EXPORT __attribute__((visibility("default")))
+#else
+#define PDF_EXPORT
+#endif
+#endif
+
+#else  // defined(COMPONENT_BUILD)
+#define PDF_EXPORT
+#endif
+
+#endif  // PDF_PDF_EXPORT_H_
diff --git a/pdf/pdf_ppapi.cc b/pdf/pdf_ppapi.cc
new file mode 100644
index 0000000..6e68d57
--- /dev/null
+++ b/pdf/pdf_ppapi.cc
@@ -0,0 +1,89 @@
+// 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 "pdf/pdf_ppapi.h"
+
+#include <memory>
+
+#include "pdf/out_of_process_instance.h"
+#include "ppapi/c/ppp.h"
+#include "ppapi/cpp/private/internal_module.h"
+#include "ppapi/cpp/private/pdf.h"
+#include "v8/include/v8.h"
+
+namespace chrome_pdf {
+
+namespace {
+
+bool g_sdk_initialized_via_pepper = false;
+
+class PDFModule : public pp::Module {
+ public:
+  PDFModule();
+  ~PDFModule() override;
+
+  // pp::Module implementation.
+  bool Init() override;
+  pp::Instance* CreateInstance(PP_Instance instance) override;
+};
+
+PDFModule::PDFModule() = default;
+
+PDFModule::~PDFModule() {
+  if (g_sdk_initialized_via_pepper) {
+    ShutdownSDK();
+    g_sdk_initialized_via_pepper = false;
+  }
+}
+
+bool PDFModule::Init() {
+  return true;
+}
+
+pp::Instance* PDFModule::CreateInstance(PP_Instance instance) {
+  if (!g_sdk_initialized_via_pepper) {
+    v8::StartupData natives;
+    v8::StartupData snapshot;
+    pp::PDF::GetV8ExternalSnapshotData(pp::InstanceHandle(instance),
+                                       &natives.data, &natives.raw_size,
+                                       &snapshot.data, &snapshot.raw_size);
+    if (natives.data) {
+      v8::V8::SetNativesDataBlob(&natives);
+      v8::V8::SetSnapshotDataBlob(&snapshot);
+    }
+    if (!InitializeSDK())
+      return nullptr;
+    g_sdk_initialized_via_pepper = true;
+  }
+
+  return new OutOfProcessInstance(instance);
+}
+
+}  // namespace
+
+int32_t PPP_InitializeModule(PP_Module module_id,
+                             PPB_GetInterface get_browser_interface) {
+  auto module = std::make_unique<PDFModule>();
+  if (!module->InternalInit(module_id, get_browser_interface))
+    return PP_ERROR_FAILED;
+
+  pp::InternalSetModuleSingleton(module.release());
+  return PP_OK;
+}
+
+void PPP_ShutdownModule() {
+  delete pp::Module::Get();
+  pp::InternalSetModuleSingleton(nullptr);
+}
+
+const void* PPP_GetInterface(const char* interface_name) {
+  auto* module = pp::Module::Get();
+  return module ? module->GetPluginInterface(interface_name) : nullptr;
+}
+
+bool IsSDKInitializedViaPepper() {
+  return g_sdk_initialized_via_pepper;
+}
+
+}  // namespace chrome_pdf
diff --git a/pdf/pdf_ppapi.h b/pdf/pdf_ppapi.h
new file mode 100644
index 0000000..68b7e18
--- /dev/null
+++ b/pdf/pdf_ppapi.h
@@ -0,0 +1,24 @@
+// 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 PDF_PDF_PPAPI_H_
+#define PDF_PDF_PPAPI_H_
+
+#include "build/build_config.h"
+#include "pdf/pdf_export.h"
+#include "ppapi/c/ppb.h"
+#include "ppapi/cpp/module.h"
+
+namespace chrome_pdf {
+
+PDF_EXPORT int PPP_InitializeModule(PP_Module module_id,
+                                    PPB_GetInterface get_browser_interface);
+PDF_EXPORT void PPP_ShutdownModule();
+PDF_EXPORT const void* PPP_GetInterface(const char* interface_name);
+
+bool IsSDKInitializedViaPepper();
+
+}  // namespace chrome_pdf
+
+#endif  // PDF_PDF_PPAPI_H_
diff --git a/pdf/range_set.h b/pdf/range_set.h
index b615999..66252c0 100644
--- a/pdf/range_set.h
+++ b/pdf/range_set.h
@@ -11,11 +11,12 @@
 #include <set>
 #include <string>
 
+#include "pdf/pdf_export.h"
 #include "ui/gfx/range/range.h"
 
 namespace chrome_pdf {
 
-class RangeSet {
+class PDF_EXPORT RangeSet {
  public:
   RangeSet();
   explicit RangeSet(const gfx::Range& range);
@@ -71,7 +72,7 @@
 
 }  // namespace chrome_pdf
 
-std::ostream& operator<<(std::ostream& os,
-                         const chrome_pdf::RangeSet& range_set);
+PDF_EXPORT std::ostream& operator<<(std::ostream& os,
+                                    const chrome_pdf::RangeSet& range_set);
 
 #endif  // PDF_RANGE_SET_H_
diff --git a/services/network/public/cpp/network_param_ipc_traits.cc b/services/network/public/cpp/network_param_ipc_traits.cc
index b6c4f52..432ec4a 100644
--- a/services/network/public/cpp/network_param_ipc_traits.cc
+++ b/services/network/public/cpp/network_param_ipc_traits.cc
@@ -24,7 +24,6 @@
   WriteParam(m, p.public_key_hashes);
   WriteParam(m, p.is_issued_by_known_root);
   WriteParam(m, p.is_issued_by_additional_trust_anchor);
-  WriteParam(m, p.common_name_fallback_used);
   WriteParam(m, p.ocsp_result);
 }
 
@@ -39,7 +38,6 @@
          ReadParam(m, iter, &r->public_key_hashes) &&
          ReadParam(m, iter, &r->is_issued_by_known_root) &&
          ReadParam(m, iter, &r->is_issued_by_additional_trust_anchor) &&
-         ReadParam(m, iter, &r->common_name_fallback_used) &&
          ReadParam(m, iter, &r->ocsp_result);
 }
 
diff --git a/services/ui/common/switches.cc b/services/ui/common/switches.cc
index e4e81f52..35cdb614 100644
--- a/services/ui/common/switches.cc
+++ b/services/ui/common/switches.cc
@@ -17,9 +17,5 @@
 // "//services/ui/ime/test_ime_driver".
 const char kUseTestConfig[] = "use-test-config";
 
-// WindowServer uses the viz hit-test logic (HitTestAggregator and
-// HitTestQuery).
-const char kUseVizHitTest[] = "use-viz-hit-test";
-
 }  // namespace switches
 }  // namespace ui
diff --git a/services/ui/common/switches.h b/services/ui/common/switches.h
index 2565eb7..85709f0 100644
--- a/services/ui/common/switches.h
+++ b/services/ui/common/switches.h
@@ -13,7 +13,6 @@
 // alongside the definition of their values in the .cc file.
 extern const char kUseAsyncEventTargeting[];
 extern const char kUseTestConfig[];
-extern const char kUseVizHitTest[];
 
 }  // namespace switches
 }  // namespace ui
diff --git a/services/ui/ws/event_dispatcher_unittest.cc b/services/ui/ws/event_dispatcher_unittest.cc
index ac2e3bd..78ab2eb 100644
--- a/services/ui/ws/event_dispatcher_unittest.cc
+++ b/services/ui/ws/event_dispatcher_unittest.cc
@@ -14,6 +14,7 @@
 #include "base/memory/weak_ptr.h"
 #include "base/run_loop.h"
 #include "base/test/scoped_task_environment.h"
+#include "components/viz/common/switches.h"
 #include "components/viz/host/hit_test/hit_test_query.h"
 #include "services/ui/common/accelerator_util.h"
 #include "services/ui/common/switches.h"
@@ -523,7 +524,7 @@
 
 void EventDispatcherVizTargeterTest::SetUp() {
   base::CommandLine::ForCurrentProcess()->AppendSwitch(
-      switches::kUseVizHitTest);
+      ::switches::kUseVizHitTest);
   if (is_event_processing_async()) {
     base::CommandLine::ForCurrentProcess()->AppendSwitch(
         switches::kUseAsyncEventTargeting);
diff --git a/services/ui/ws/event_targeter.cc b/services/ui/ws/event_targeter.cc
index 0bae4d8..8733006 100644
--- a/services/ui/ws/event_targeter.cc
+++ b/services/ui/ws/event_targeter.cc
@@ -9,6 +9,7 @@
 #include "base/metrics/user_metrics.h"
 #include "base/task_scheduler/post_task.h"
 #include "base/threading/thread_task_runner_handle.h"
+#include "components/viz/common/features.h"
 #include "components/viz/host/hit_test/hit_test_query.h"
 #include "services/ui/common/switches.h"
 #include "services/ui/ws/event_location.h"
@@ -47,8 +48,7 @@
   ServerWindow* root = event_targeter_delegate_->GetRootWindowForDisplay(
       event_location.display_id);
   DeepestWindow deepest_window;
-  if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
-          switches::kUseVizHitTest)) {
+  if (!features::IsVizHitTestingEnabled()) {
     if (root) {
       deepest_window = ui::ws::FindDeepestVisibleWindowForLocation(
           root, event_source, gfx::ToFlooredPoint(event_location.raw_location));
diff --git a/services/video_capture/BUILD.gn b/services/video_capture/BUILD.gn
index f875609..cb8748a 100644
--- a/services/video_capture/BUILD.gn
+++ b/services/video_capture/BUILD.gn
@@ -92,7 +92,7 @@
     ":lib",
     ":video_capture",
     "//base/test:test_support",
-    "//media/capture/mojo:capture_types",
+    "//media/capture/mojo:video_capture",
     "//services/service_manager/public/cpp",
     "//services/service_manager/public/cpp:service_test_support",
     "//services/service_manager/public/cpp/test:test_support",
diff --git a/services/video_capture/public/interfaces/BUILD.gn b/services/video_capture/public/interfaces/BUILD.gn
index 48946afe..9dffa7a 100644
--- a/services/video_capture/public/interfaces/BUILD.gn
+++ b/services/video_capture/public/interfaces/BUILD.gn
@@ -16,8 +16,8 @@
   ]
 
   deps = [
-    "//media/capture/mojo:capture_types",
     "//media/capture/mojo:image_capture",
+    "//media/capture/mojo:video_capture",
     "//media/mojo/interfaces",
     "//ui/gfx/geometry/mojo",
   ]
diff --git a/services/viz/privileged/interfaces/BUILD.gn b/services/viz/privileged/interfaces/BUILD.gn
index f956978..16be510 100644
--- a/services/viz/privileged/interfaces/BUILD.gn
+++ b/services/viz/privileged/interfaces/BUILD.gn
@@ -26,7 +26,7 @@
   deps = [
     "//base/test:test_support",
     "//components/viz/common:common",
-    "//media/capture/mojo:capture_types",
+    "//media/capture/mojo:video_capture",
     "//services/service_manager/public/cpp",
     "//services/service_manager/public/cpp:service_test_support",
     "//services/viz/privileged/interfaces/compositing",
diff --git a/services/viz/privileged/interfaces/compositing/BUILD.gn b/services/viz/privileged/interfaces/compositing/BUILD.gn
index 3d5aab07..6ea4fe9 100644
--- a/services/viz/privileged/interfaces/compositing/BUILD.gn
+++ b/services/viz/privileged/interfaces/compositing/BUILD.gn
@@ -15,7 +15,7 @@
 
   public_deps = [
     "//gpu/ipc/common:interfaces",
-    "//media/capture/mojo:capture_types",
+    "//media/capture/mojo:video_capture",
     "//media/mojo/interfaces:interfaces",
     "//mojo/common:common_custom_types",
     "//services/viz/public/interfaces",
diff --git a/services/viz/public/cpp/compositing/BUILD.gn b/services/viz/public/cpp/compositing/BUILD.gn
index 4ae9d32a..9aa6fa5a 100644
--- a/services/viz/public/cpp/compositing/BUILD.gn
+++ b/services/viz/public/cpp/compositing/BUILD.gn
@@ -14,7 +14,7 @@
     "//components/viz/common:common",
     "//components/viz/test:test_support",
     "//gpu/ipc/common:struct_traits",
-    "//media/capture/mojo:capture_types",
+    "//media/capture/mojo:video_capture",
     "//services/service_manager/public/cpp",
     "//services/service_manager/public/cpp:service_test_support",
     "//services/viz/public/interfaces",
diff --git a/skia/BUILD.gn b/skia/BUILD.gn
index 02df75e..8a046e5 100644
--- a/skia/BUILD.gn
+++ b/skia/BUILD.gn
@@ -476,6 +476,7 @@
     "//base/third_party/dynamic_annotations",
     "//third_party/libpng",
     "//third_party/libwebp",
+    "//third_party/libwebp:libwebp_webp",
   ]
 
   if (!is_ios) {
@@ -503,6 +504,7 @@
   if (skia_support_pdf) {
     deps += [
       "//third_party/sfntly",
+      "//third_party/sfntly:sfntly_chromium",
       "//third_party/zlib",
     ]
     sources += skia_pdf_sources
diff --git a/skia/config/SkUserConfig.h b/skia/config/SkUserConfig.h
index 59d0911..5d26966 100644
--- a/skia/config/SkUserConfig.h
+++ b/skia/config/SkUserConfig.h
@@ -230,6 +230,9 @@
 #define SK_SUPPORT_LEGACY_DASH_CULL_PATH
 #endif
 
+// Max. verb count for paths rendered by the edge-AA tessellating path renderer.
+#define GR_AA_TESSELLATOR_MAX_VERB_COUNT 10
+
 ///////////////////////// Imported from BUILD.gn and skia_common.gypi
 
 /* In some places Skia can use static initializers for global initialization,
diff --git a/testing/buildbot/chromium.clang.json b/testing/buildbot/chromium.clang.json
index 1d23334..34dfb00c 100644
--- a/testing/buildbot/chromium.clang.json
+++ b/testing/buildbot/chromium.clang.json
@@ -7553,6 +7553,16 @@
     ],
     "isolated_scripts": [
       {
+        "args": [
+          "--filter=__main__.ChromeDriverTest.testLoadUrl"
+        ],
+        "isolate_name": "chromedriver_py_tests",
+        "name": "chromedriver_py_tests",
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        }
+      },
+      {
         "isolate_name": "telemetry_gpu_unittests",
         "name": "telemetry_gpu_unittests",
         "swarming": {
diff --git a/testing/buildbot/chromium.fyi.json b/testing/buildbot/chromium.fyi.json
index 2483a07efe..fc8f1b3 100644
--- a/testing/buildbot/chromium.fyi.json
+++ b/testing/buildbot/chromium.fyi.json
@@ -1695,6 +1695,16 @@
     ],
     "isolated_scripts": [
       {
+        "args": [
+          "--filter=__main__.ChromeDriverTest.testLoadUrl"
+        ],
+        "isolate_name": "chromedriver_py_tests",
+        "name": "chromedriver_py_tests",
+        "swarming": {
+          "can_use_on_swarming_builders": false
+        }
+      },
+      {
         "isolate_name": "telemetry_gpu_unittests",
         "name": "telemetry_gpu_unittests",
         "swarming": {
@@ -2320,6 +2330,16 @@
     ],
     "isolated_scripts": [
       {
+        "args": [
+          "--filter=__main__.ChromeDriverTest.testLoadUrl"
+        ],
+        "isolate_name": "chromedriver_py_tests",
+        "name": "chromedriver_py_tests",
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        }
+      },
+      {
         "isolate_name": "telemetry_gpu_unittests",
         "name": "telemetry_gpu_unittests",
         "swarming": {
@@ -5998,6 +6018,16 @@
     ],
     "isolated_scripts": [
       {
+        "args": [
+          "--filter=__main__.ChromeDriverTest.testLoadUrl"
+        ],
+        "isolate_name": "chromedriver_py_tests",
+        "name": "chromedriver_py_tests",
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        }
+      },
+      {
         "isolate_name": "telemetry_gpu_unittests",
         "name": "telemetry_gpu_unittests",
         "swarming": {
diff --git a/testing/buildbot/chromium.mac.json b/testing/buildbot/chromium.mac.json
index 1e7afe8..137171f1 100644
--- a/testing/buildbot/chromium.mac.json
+++ b/testing/buildbot/chromium.mac.json
@@ -396,6 +396,16 @@
     ],
     "isolated_scripts": [
       {
+        "args": [
+          "--filter=__main__.ChromeDriverTest.testLoadUrl"
+        ],
+        "isolate_name": "chromedriver_py_tests",
+        "name": "chromedriver_py_tests",
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        }
+      },
+      {
         "isolate_name": "telemetry_gpu_unittests",
         "name": "telemetry_gpu_unittests",
         "swarming": {
@@ -833,6 +843,16 @@
     ],
     "isolated_scripts": [
       {
+        "args": [
+          "--filter=__main__.ChromeDriverTest.testLoadUrl"
+        ],
+        "isolate_name": "chromedriver_py_tests",
+        "name": "chromedriver_py_tests",
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        }
+      },
+      {
         "isolate_name": "telemetry_gpu_unittests",
         "name": "telemetry_gpu_unittests",
         "swarming": {
@@ -1270,6 +1290,16 @@
     ],
     "isolated_scripts": [
       {
+        "args": [
+          "--filter=__main__.ChromeDriverTest.testLoadUrl"
+        ],
+        "isolate_name": "chromedriver_py_tests",
+        "name": "chromedriver_py_tests",
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        }
+      },
+      {
         "isolate_name": "telemetry_gpu_unittests",
         "name": "telemetry_gpu_unittests",
         "swarming": {
@@ -1721,6 +1751,16 @@
     ],
     "isolated_scripts": [
       {
+        "args": [
+          "--filter=__main__.ChromeDriverTest.testLoadUrl"
+        ],
+        "isolate_name": "chromedriver_py_tests",
+        "name": "chromedriver_py_tests",
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        }
+      },
+      {
         "isolate_name": "content_shell_crash_test",
         "name": "content_shell_crash_test",
         "swarming": {
@@ -2158,6 +2198,16 @@
     ],
     "isolated_scripts": [
       {
+        "args": [
+          "--filter=__main__.ChromeDriverTest.testLoadUrl"
+        ],
+        "isolate_name": "chromedriver_py_tests",
+        "name": "chromedriver_py_tests",
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        }
+      },
+      {
         "isolate_name": "telemetry_gpu_unittests",
         "name": "telemetry_gpu_unittests",
         "swarming": {
diff --git a/testing/buildbot/chromium.perf.fyi.json b/testing/buildbot/chromium.perf.fyi.json
index 467a45a..36f846e 100644
--- a/testing/buildbot/chromium.perf.fyi.json
+++ b/testing/buildbot/chromium.perf.fyi.json
@@ -541,7 +541,7 @@
         },
         "name": "performance_test_suite",
         "override_compile_targets": [
-          "peformance_test_suite"
+          "performance_test_suite"
         ],
         "swarming": {
           "can_use_on_swarming_builders": true,
diff --git a/testing/buildbot/chromium.win.json b/testing/buildbot/chromium.win.json
index 640efbf..f29c301 100644
--- a/testing/buildbot/chromium.win.json
+++ b/testing/buildbot/chromium.win.json
@@ -538,6 +538,16 @@
     ],
     "isolated_scripts": [
       {
+        "args": [
+          "--filter=__main__.ChromeDriverTest.testLoadUrl"
+        ],
+        "isolate_name": "chromedriver_py_tests",
+        "name": "chromedriver_py_tests",
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        }
+      },
+      {
         "isolate_name": "metrics_python_tests",
         "name": "metrics_python_tests",
         "swarming": {
@@ -1707,6 +1717,16 @@
     ],
     "isolated_scripts": [
       {
+        "args": [
+          "--filter=__main__.ChromeDriverTest.testLoadUrl"
+        ],
+        "isolate_name": "chromedriver_py_tests",
+        "name": "chromedriver_py_tests",
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        }
+      },
+      {
         "isolate_name": "content_shell_crash_test",
         "name": "content_shell_crash_test",
         "swarming": {
@@ -2259,6 +2279,16 @@
     ],
     "isolated_scripts": [
       {
+        "args": [
+          "--filter=__main__.ChromeDriverTest.testLoadUrl"
+        ],
+        "isolate_name": "chromedriver_py_tests",
+        "name": "chromedriver_py_tests",
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        }
+      },
+      {
         "isolate_name": "telemetry_gpu_unittests",
         "name": "telemetry_gpu_unittests",
         "swarming": {
diff --git a/testing/buildbot/test_suites.pyl b/testing/buildbot/test_suites.pyl
index 3a460f8b..9658a91 100644
--- a/testing/buildbot/test_suites.pyl
+++ b/testing/buildbot/test_suites.pyl
@@ -327,18 +327,6 @@
     },
   },
 
-  'chromedriver_py_tests_isolated_scripts': {
-    'chromedriver_py_tests': {
-      "args": [
-        # TODO(johnchen@chromium.org): As the initial step of adding
-        # ChromeDriver tests to commit queue, the following filter is used to
-        # enable a single test case as a smoke test. Many more test cases will
-        # be enabled in the future.
-        "--filter=__main__.ChromeDriverTest.testLoadUrl",
-      ],
-    },
-  },
-
   'chromium_android_asan_gtests': {
     # TODO(kbr): reduce duplication among these tests, and with other
     # test suites.
@@ -757,6 +745,15 @@
   },
 
   'desktop_chromium_isolated_scripts': {
+    'chromedriver_py_tests': {
+      "args": [
+        # TODO(johnchen@chromium.org): As the initial step of adding
+        # ChromeDriver tests to commit queue, the following filter is used to
+        # enable a single test case as a smoke test. Many more test cases will
+        # be enabled in the future.
+        "--filter=__main__.ChromeDriverTest.testLoadUrl",
+      ],
+    },
     'content_shell_crash_test': {},
     'metrics_python_tests': {},
     'telemetry_gpu_unittests': {},
@@ -1952,7 +1949,6 @@
   ],
 
   'chromium_linux_isolated_scripts': [
-    'chromedriver_py_tests_isolated_scripts',
     'desktop_chromium_isolated_scripts',
     'linux_specific_chromium_isolated_scripts',
     'telemetry_perf_unittests_isolated_scripts',
diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json
index b61fc338..3587bb2 100644
--- a/testing/variations/fieldtrial_testing_config.json
+++ b/testing/variations/fieldtrial_testing_config.json
@@ -372,6 +372,21 @@
             ]
         }
     ],
+    "AsyncDns": [
+        {
+            "platforms": [
+                "android"
+            ],
+            "experiments": [
+                {
+                    "name": "Enabled",
+                    "enable_features": [
+                        "AsyncDns"
+                    ]
+                }
+            ]
+        }
+    ],
     "AutofillCreditCardBankNameDisplay": [
         {
             "platforms": [
diff --git a/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG b/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
index 88ea2566..52251d9 100644
--- a/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
+++ b/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
@@ -1340,10 +1340,18 @@
 crbug.com/591099 external/wpt/css/CSS2/linebox/vertical-align-117a.xht [ Failure ]
 crbug.com/591099 external/wpt/css/CSS2/linebox/vertical-align-118a.xht [ Failure ]
 crbug.com/714962 external/wpt/css/CSS2/linebox/vertical-align-baseline-005a.xht [ Failure ]
+crbug.com/591099 external/wpt/css/CSS2/normal-flow/block-in-inline-empty-001.xht [ Pass ]
+crbug.com/591099 external/wpt/css/CSS2/normal-flow/block-in-inline-empty-004.xht [ Pass ]
+crbug.com/591099 external/wpt/css/CSS2/normal-flow/block-in-inline-insert-001e.xht [ Pass ]
+crbug.com/591099 external/wpt/css/CSS2/normal-flow/block-in-inline-insert-001h.xht [ Pass ]
+crbug.com/591099 external/wpt/css/CSS2/normal-flow/block-in-inline-insert-002e.xht [ Pass ]
+crbug.com/591099 external/wpt/css/CSS2/normal-flow/block-in-inline-nested-002.xht [ Pass ]
 crbug.com/591099 external/wpt/css/CSS2/normal-flow/block-in-inline-percents-001.xht [ Failure ]
+crbug.com/591099 external/wpt/css/CSS2/normal-flow/block-in-inline-remove-006.xht [ Pass ]
 crbug.com/591099 external/wpt/css/CSS2/normal-flow/max-height-percentage-002.xht [ Failure ]
 crbug.com/591099 external/wpt/css/CSS2/normal-flow/root-box-001.xht [ Failure ]
 crbug.com/591099 external/wpt/css/CSS2/positioning/abspos-007.xht [ Failure ]
+crbug.com/591099 external/wpt/css/CSS2/positioning/positioning-float-001.xht [ Pass ]
 crbug.com/591099 external/wpt/css/CSS2/positioning/relpos-calcs-004.xht [ Failure ]
 crbug.com/591099 external/wpt/css/CSS2/positioning/relpos-calcs-005.xht [ Failure ]
 crbug.com/591099 external/wpt/css/CSS2/text/text-decoration-applies-to-015.xht [ Failure ]
diff --git a/third_party/WebKit/LayoutTests/TestExpectations b/third_party/WebKit/LayoutTests/TestExpectations
index 1ce9100..5148b0c 100644
--- a/third_party/WebKit/LayoutTests/TestExpectations
+++ b/third_party/WebKit/LayoutTests/TestExpectations
@@ -179,34 +179,13 @@
 
 # ====== Layout team owned tests from here ======
 
+crbug.com/711704 external/wpt/css/CSS2/floats/floats-rule3-outside-left-002.xht [ Failure ]
+crbug.com/711704 external/wpt/css/CSS2/floats/floats-rule3-outside-right-002.xht [ Failure ]
+crbug.com/711704 external/wpt/css/CSS2/floats/floats-rule7-outside-left-001.xht [ Failure ]
+crbug.com/711704 external/wpt/css/CSS2/floats/floats-rule7-outside-right-001.xht [ Failure ]
+crbug.com/711704 external/wpt/css/CSS2/floats/floats-wrap-bfc-006.xht [ Failure ]
 
-#### external/wpt/css/CSS2/floats
-#### Passed: 37
-#### Skipped: 5
-crbug.com/711704 external/wpt/css/CSS2/floats/floats-rule3-outside-left-002.xht [ Skip ]
-crbug.com/711704 external/wpt/css/CSS2/floats/floats-rule3-outside-right-002.xht [ Skip ]
-crbug.com/711704 external/wpt/css/CSS2/floats/floats-rule7-outside-left-001.xht [ Skip ]
-crbug.com/711704 external/wpt/css/CSS2/floats/floats-rule7-outside-right-001.xht [ Skip ]
-crbug.com/711704 external/wpt/css/CSS2/floats/floats-wrap-bfc-006.xht [ Skip ]
-
-#### external/wpt/css/CSS2/floats-clear
-#### Passed: 166
-#### Skipped: 25
-crbug.com/711709 external/wpt/css/CSS2/floats-clear/clear-applies-to-008.xht [ Skip ]
-crbug.com/711709 external/wpt/css/CSS2/floats-clear/clear-applies-to-012.xht [ Skip ]
-crbug.com/711709 external/wpt/css/CSS2/floats-clear/float-applies-to-008.xht [ Skip ]
-crbug.com/711709 external/wpt/css/CSS2/floats-clear/float-applies-to-012.xht [ Skip ]
-crbug.com/711709 external/wpt/css/CSS2/floats-clear/float-non-replaced-width-007.xht [ Skip ]
-crbug.com/711709 external/wpt/css/CSS2/floats-clear/float-non-replaced-width-008.xht [ Skip ]
-crbug.com/711709 external/wpt/css/CSS2/floats-clear/float-non-replaced-width-009.xht [ Skip ]
-crbug.com/711709 external/wpt/css/CSS2/floats-clear/float-non-replaced-width-010.xht [ Skip ]
-crbug.com/711709 external/wpt/css/CSS2/floats-clear/float-non-replaced-width-011.xht [ Skip ]
-crbug.com/711709 external/wpt/css/CSS2/floats-clear/float-non-replaced-width-012.xht [ Skip ]
 crbug.com/711709 external/wpt/css/CSS2/floats-clear/floating-replaced-height-008.xht [ Skip ]
-crbug.com/711709 external/wpt/css/CSS2/floats-clear/floats-005.xht [ Skip ]
-crbug.com/711709 external/wpt/css/CSS2/floats-clear/floats-007.xht [ Skip ]
-crbug.com/711709 external/wpt/css/CSS2/floats-clear/floats-028.xht [ Skip ]
-crbug.com/711709 external/wpt/css/CSS2/floats-clear/floats-036.xht [ Skip ]
 crbug.com/711709 external/wpt/css/CSS2/floats-clear/floats-108.xht [ Skip ]
 crbug.com/711709 external/wpt/css/CSS2/floats-clear/floats-109.xht [ Skip ]
 crbug.com/711709 external/wpt/css/CSS2/floats-clear/floats-110.xht [ Skip ]
@@ -218,12 +197,6 @@
 crbug.com/711709 external/wpt/css/CSS2/floats-clear/floats-131.xht [ Skip ]
 crbug.com/711709 external/wpt/css/CSS2/floats-clear/floats-137.xht [ Skip ]
 
-#### external/wpt/css/CSS2/positioning
-#### Passed: 474
-#### Skipped: 49
-crbug.com/711805 external/wpt/css/CSS2/positioning/abspos-011.xht [ Skip ]
-crbug.com/711805 external/wpt/css/CSS2/positioning/abspos-012.xht [ Skip ]
-crbug.com/711805 external/wpt/css/CSS2/positioning/abspos-027.xht [ Skip ]
 crbug.com/711805 external/wpt/css/CSS2/positioning/abspos-inline-001.xht [ Skip ]
 crbug.com/711805 external/wpt/css/CSS2/positioning/abspos-inline-002.xht [ Skip ]
 crbug.com/711805 external/wpt/css/CSS2/positioning/abspos-inline-003.xht [ Skip ]
@@ -232,79 +205,43 @@
 crbug.com/711805 external/wpt/css/CSS2/positioning/abspos-inline-006.xht [ Skip ]
 crbug.com/711805 external/wpt/css/CSS2/positioning/abspos-paged-001.xht [ Skip ]
 crbug.com/711805 external/wpt/css/CSS2/positioning/abspos-paged-002.xht [ Skip ]
-crbug.com/711805 external/wpt/css/CSS2/positioning/bottom-applies-to-001.xht [ Skip ]
-crbug.com/711805 external/wpt/css/CSS2/positioning/bottom-applies-to-002.xht [ Skip ]
-crbug.com/711805 external/wpt/css/CSS2/positioning/bottom-applies-to-003.xht [ Skip ]
-crbug.com/711805 external/wpt/css/CSS2/positioning/bottom-applies-to-004.xht [ Skip ]
-crbug.com/711805 external/wpt/css/CSS2/positioning/bottom-applies-to-005.xht [ Skip ]
-crbug.com/711805 external/wpt/css/CSS2/positioning/bottom-applies-to-006.xht [ Skip ]
-crbug.com/711805 external/wpt/css/CSS2/positioning/bottom-applies-to-007.xht [ Skip ]
-crbug.com/711805 external/wpt/css/CSS2/positioning/bottom-applies-to-009.xht [ Skip ]
-crbug.com/711805 external/wpt/css/CSS2/positioning/bottom-applies-to-012.xht [ Skip ]
-crbug.com/711805 external/wpt/css/CSS2/positioning/bottom-applies-to-013.xht [ Skip ]
-crbug.com/711805 external/wpt/css/CSS2/positioning/bottom-applies-to-014.xht [ Skip ]
-crbug.com/711805 external/wpt/css/CSS2/positioning/bottom-applies-to-015.xht [ Skip ]
 crbug.com/711805 external/wpt/css/CSS2/positioning/position-004.xht [ Skip ]
-crbug.com/711805 external/wpt/css/CSS2/positioning/position-applies-to-001.xht [ Skip ]
-crbug.com/711805 external/wpt/css/CSS2/positioning/position-applies-to-002.xht [ Skip ]
-crbug.com/711805 external/wpt/css/CSS2/positioning/position-applies-to-003.xht [ Skip ]
-crbug.com/711805 external/wpt/css/CSS2/positioning/position-applies-to-004.xht [ Skip ]
-crbug.com/711805 external/wpt/css/CSS2/positioning/position-applies-to-005.xht [ Skip ]
-crbug.com/711805 external/wpt/css/CSS2/positioning/position-applies-to-006.xht [ Skip ]
-crbug.com/711805 external/wpt/css/CSS2/positioning/position-applies-to-007.xht [ Skip ]
-crbug.com/711805 external/wpt/css/CSS2/positioning/position-applies-to-009.xht [ Skip ]
-crbug.com/711805 external/wpt/css/CSS2/positioning/position-applies-to-012.xht [ Skip ]
-crbug.com/711805 external/wpt/css/CSS2/positioning/position-applies-to-013.xht [ Skip ]
-crbug.com/711805 external/wpt/css/CSS2/positioning/position-applies-to-014.xht [ Skip ]
-crbug.com/711805 external/wpt/css/CSS2/positioning/position-applies-to-015.xht [ Skip ]
 crbug.com/711805 external/wpt/css/CSS2/positioning/position-fixed-003.xht [ Skip ]
 crbug.com/711805 external/wpt/css/CSS2/positioning/position-fixed-004.xht [ Skip ]
 crbug.com/711805 external/wpt/css/CSS2/positioning/position-fixed-005.xht [ Skip ]
 crbug.com/711805 external/wpt/css/CSS2/positioning/position-relative-020.xht [ Skip ]
 crbug.com/711805 external/wpt/css/CSS2/positioning/position-relative-021.xht [ Skip ]
 crbug.com/711805 external/wpt/css/CSS2/positioning/position-relative-022.xht [ Skip ]
-crbug.com/711805 external/wpt/css/CSS2/positioning/position-relative-031.xht [ Skip ]
 crbug.com/711805 external/wpt/css/CSS2/positioning/position-relative-034.xht [ Skip ]
 crbug.com/711805 external/wpt/css/CSS2/positioning/position-relative-035.xht [ Skip ]
 crbug.com/711805 external/wpt/css/CSS2/positioning/position-relative-036.xht [ Skip ]
-crbug.com/711805 external/wpt/css/CSS2/positioning/positioning-float-001.xht [ Skip ]
 
-#### crbug.com/783229 external/wpt/css/CSS2/normal-flow
-#### Passed: 667
-#### Skipped: 41
-crbug.com/711807 external/wpt/css/CSS2/normal-flow/block-in-inline-empty-001.xht [ Skip ]
-crbug.com/711807 external/wpt/css/CSS2/normal-flow/block-in-inline-empty-004.xht [ Skip ]
-crbug.com/711807 external/wpt/css/CSS2/normal-flow/block-in-inline-insert-001e.xht [ Skip ]
-crbug.com/711807 external/wpt/css/CSS2/normal-flow/block-in-inline-insert-001f.xht [ Skip ]
-crbug.com/711807 external/wpt/css/CSS2/normal-flow/block-in-inline-insert-001h.xht [ Skip ]
-crbug.com/711807 external/wpt/css/CSS2/normal-flow/block-in-inline-insert-002e.xht [ Skip ]
-crbug.com/711807 external/wpt/css/CSS2/normal-flow/block-in-inline-insert-002f.xht [ Skip ]
-crbug.com/711807 external/wpt/css/CSS2/normal-flow/block-in-inline-nested-002.xht [ Skip ]
-crbug.com/711807 external/wpt/css/CSS2/normal-flow/block-in-inline-remove-006.xht [ Skip ]
+crbug.com/711807 external/wpt/css/CSS2/normal-flow/block-in-inline-empty-001.xht [ Failure ]
+crbug.com/711807 external/wpt/css/CSS2/normal-flow/block-in-inline-empty-004.xht [ Failure ]
+crbug.com/711807 external/wpt/css/CSS2/normal-flow/block-in-inline-insert-001e.xht [ Failure ]
+crbug.com/711807 external/wpt/css/CSS2/normal-flow/block-in-inline-insert-001f.xht [ Failure ]
+crbug.com/711807 external/wpt/css/CSS2/normal-flow/block-in-inline-insert-001h.xht [ Failure ]
+crbug.com/711807 external/wpt/css/CSS2/normal-flow/block-in-inline-insert-002e.xht [ Failure ]
+crbug.com/711807 external/wpt/css/CSS2/normal-flow/block-in-inline-insert-002f.xht [ Failure ]
+crbug.com/711807 external/wpt/css/CSS2/normal-flow/block-in-inline-nested-002.xht [ Failure ]
+crbug.com/711807 external/wpt/css/CSS2/normal-flow/block-in-inline-remove-006.xht [ Failure ]
 crbug.com/711807 external/wpt/css/CSS2/normal-flow/inline-block-002.xht [ Skip ]
 crbug.com/711807 external/wpt/css/CSS2/normal-flow/inline-block-003.xht [ Skip ]
 crbug.com/711807 external/wpt/css/CSS2/normal-flow/inline-block-004.xht [ Skip ]
 crbug.com/711807 external/wpt/css/CSS2/normal-flow/inline-block-005.xht [ Skip ]
-crbug.com/711807 external/wpt/css/CSS2/normal-flow/inline-table-002a.xht [ Skip ]
-crbug.com/711807 external/wpt/css/CSS2/normal-flow/inline-table-002b.xht [ Skip ]
-crbug.com/711807 external/wpt/css/CSS2/normal-flow/inline-table-valign-001.xht [ Skip ]
 crbug.com/711807 external/wpt/css/CSS2/normal-flow/inlines-003.xht [ Skip ]
 crbug.com/711807 external/wpt/css/CSS2/normal-flow/inlines-004.xht [ Skip ]
 crbug.com/711807 external/wpt/css/CSS2/normal-flow/inlines-005.xht [ Skip ]
 crbug.com/711807 external/wpt/css/CSS2/normal-flow/inlines-006.xht [ Skip ]
-crbug.com/711807 external/wpt/css/CSS2/normal-flow/inlines-016.xht [ Skip ]
-crbug.com/711807 external/wpt/css/CSS2/normal-flow/inlines-017.xht [ Skip ]
-crbug.com/711807 external/wpt/css/CSS2/normal-flow/max-width-110.xht [ Skip ]
-crbug.com/711807 external/wpt/css/CSS2/normal-flow/max-width-applies-to-005.xht [ Skip ]
-crbug.com/711807 external/wpt/css/CSS2/normal-flow/max-width-applies-to-006.xht [ Skip ]
-crbug.com/711807 external/wpt/css/CSS2/normal-flow/max-width-applies-to-013.xht [ Skip ]
-crbug.com/711807 external/wpt/css/CSS2/normal-flow/max-width-applies-to-014.xht [ Skip ]
-crbug.com/711807 external/wpt/css/CSS2/normal-flow/min-width-applies-to-005.xht [ Skip ]
-crbug.com/711807 external/wpt/css/CSS2/normal-flow/min-width-applies-to-006.xht [ Skip ]
-crbug.com/711807 external/wpt/css/CSS2/normal-flow/min-width-applies-to-014.xht [ Skip ]
-crbug.com/711807 external/wpt/css/CSS2/normal-flow/replaced-intrinsic-001.xht [ Skip ]
-crbug.com/711807 external/wpt/css/CSS2/normal-flow/replaced-intrinsic-002.xht [ Skip ]
-crbug.com/711807 external/wpt/css/CSS2/normal-flow/width-inherit-001.xht [ Skip ]
+crbug.com/711807 external/wpt/css/CSS2/normal-flow/max-width-applies-to-005.xht [ Failure ]
+crbug.com/711807 external/wpt/css/CSS2/normal-flow/max-width-applies-to-006.xht [ Failure ]
+crbug.com/711807 external/wpt/css/CSS2/normal-flow/max-width-applies-to-013.xht [ Failure ]
+crbug.com/711807 external/wpt/css/CSS2/normal-flow/max-width-applies-to-014.xht [ Failure ]
+crbug.com/711807 external/wpt/css/CSS2/normal-flow/min-width-applies-to-005.xht [ Failure ]
+crbug.com/711807 external/wpt/css/CSS2/normal-flow/min-width-applies-to-006.xht [ Failure ]
+crbug.com/711807 external/wpt/css/CSS2/normal-flow/min-width-applies-to-014.xht [ Failure ]
+crbug.com/711807 external/wpt/css/CSS2/normal-flow/replaced-intrinsic-001.xht [ Failure ]
+crbug.com/711807 external/wpt/css/CSS2/normal-flow/replaced-intrinsic-002.xht [ Failure ]
 
 #### external/wpt/css/css-position
 crbug.com/752022 external/wpt/css/css-position/position-sticky-offset-overflow.html [ Failure ]
@@ -353,13 +290,6 @@
 crbug.com/635619 virtual/layout_ng/external/wpt/css/CSS2/floats/floats-wrap-bfc-004.xht [ Failure ]
 crbug.com/635619 virtual/layout_ng/external/wpt/css/CSS2/floats/floats-wrap-bfc-006.xht [ Failure ]
 
-### virtual/layout_ng/external/wpt/css/CSS2/floats-clear
-crbug.com/635619 virtual/layout_ng/external/wpt/css/CSS2/floats-clear/clear-applies-to-008.xht [ Failure ]
-crbug.com/635619 virtual/layout_ng/external/wpt/css/CSS2/floats-clear/float-applies-to-008.xht [ Failure ]
-crbug.com/635619 [ Linux ] virtual/layout_ng/external/wpt/css/CSS2/floats-clear/clear-applies-to-012.xht [ Failure ]
-crbug.com/635619 [ Linux ] virtual/layout_ng/external/wpt/css/CSS2/floats-clear/float-applies-to-012.xht [ Failure ]
-crbug.com/635619 virtual/layout_ng/external/wpt/css/CSS2/floats-clear/floats-028.xht [ Failure ]
-
 ### virtual/layout_ng/external/wpt/css/CSS2/linebox
 crbug.com/635619 virtual/layout_ng/external/wpt/css/CSS2/linebox/inline-box-002.xht [ Failure ]
 crbug.com/635619 virtual/layout_ng/external/wpt/css/CSS2/linebox/vertical-align-117a.xht [ Failure ]
@@ -397,14 +327,7 @@
 ### virtual/layout_ng/external/wpt/css/CSS2/positioning
 crbug.com/635619 virtual/layout_ng/external/wpt/css/CSS2/positioning/abspos-007.xht [ Failure ]
 crbug.com/704961 [ Mac ] virtual/layout_ng/external/wpt/css/CSS2/positioning/abspos-027.xht [ Failure ]
-crbug.com/635619 [ Mac ] virtual/layout_ng/external/wpt/css/CSS2/positioning/position-relative-027.xht [ Failure ]
-crbug.com/635619 [ Mac ] virtual/layout_ng/external/wpt/css/CSS2/positioning/position-relative-028.xht [ Failure ]
-crbug.com/635619 [ Mac ] virtual/layout_ng/external/wpt/css/CSS2/positioning/position-relative-029.xht [ Failure ]
-crbug.com/635619 [ Mac ] virtual/layout_ng/external/wpt/css/CSS2/positioning/position-relative-030.xht [ Failure ]
-crbug.com/635619 [ Mac ] virtual/layout_ng/external/wpt/css/CSS2/positioning/position-relative-031.xht [ Failure ]
 crbug.com/635619 virtual/layout_ng/external/wpt/css/CSS2/positioning/position-relative-035.xht [ Failure ]
-crbug.com/635619 [ Mac ] virtual/layout_ng/external/wpt/css/CSS2/positioning/positioning-float-001.xht [ Failure ]
-crbug.com/635619 [ Mac ] virtual/layout_ng/external/wpt/css/CSS2/positioning/positioning-float-002.xht [ Failure ]
 crbug.com/635619 virtual/layout_ng/external/wpt/css/CSS2/positioning/relpos-calcs-004.xht [ Failure ]
 crbug.com/635619 virtual/layout_ng/external/wpt/css/CSS2/positioning/relpos-calcs-005.xht [ Failure ]
 
@@ -543,20 +466,6 @@
 crbug.com/714962 [ Mac ] virtual/layout_ng/external/wpt/css/CSS2/normal-flow/inline-table-002b.xht [ Failure ]
 crbug.com/714962 [ Mac ] virtual/layout_ng/external/wpt/css/CSS2/normal-flow/inline-table-valign-001.xht [ Failure ]
 
-### virtual/layout_ng/external/wpt/css/CSS2/positioning/
-crbug.com/714962 [ Mac ] virtual/layout_ng/external/wpt/css/CSS2/positioning/bottom-offset-001.xht [ Failure ]
-crbug.com/714962 [ Mac ] virtual/layout_ng/external/wpt/css/CSS2/positioning/bottom-offset-002.xht [ Failure ]
-crbug.com/714962 [ Mac ] virtual/layout_ng/external/wpt/css/CSS2/positioning/bottom-offset-003.xht [ Failure ]
-crbug.com/714962 [ Mac ] virtual/layout_ng/external/wpt/css/CSS2/positioning/left-offset-001.xht [ Failure ]
-crbug.com/714962 [ Mac ] virtual/layout_ng/external/wpt/css/CSS2/positioning/left-offset-002.xht [ Failure ]
-crbug.com/714962 [ Mac ] virtual/layout_ng/external/wpt/css/CSS2/positioning/position-relative-032.xht [ Failure ]
-crbug.com/714962 [ Mac ] virtual/layout_ng/external/wpt/css/CSS2/positioning/right-offset-001.xht [ Failure ]
-crbug.com/714962 [ Mac ] virtual/layout_ng/external/wpt/css/CSS2/positioning/right-offset-002.xht [ Failure ]
-crbug.com/714962 [ Mac ] virtual/layout_ng/external/wpt/css/CSS2/positioning/right-offset-003.xht [ Failure ]
-crbug.com/714962 [ Mac ] virtual/layout_ng/external/wpt/css/CSS2/positioning/top-offset-001.xht [ Failure ]
-crbug.com/714962 [ Mac ] virtual/layout_ng/external/wpt/css/CSS2/positioning/top-offset-002.xht [ Failure ]
-crbug.com/714962 [ Mac ] virtual/layout_ng/external/wpt/css/CSS2/positioning/top-offset-003.xht [ Failure ]
-
 ### virtual/layout_ng/fast/block/float/
 crbug.com/714962 [ Mac ] virtual/layout_ng/fast/block/float/002.html [ Failure ]
 crbug.com/714962 virtual/layout_ng/fast/block/float/015.html [ Failure ]
@@ -640,8 +549,6 @@
 ### 1px diff with ref files.
 crbug.com/635619 virtual/layout_ng/external/wpt/css/CSS2/linebox/vertical-align-sub-001.xht [ Failure ]
 crbug.com/635619 virtual/layout_ng/external/wpt/css/CSS2/linebox/vertical-align-super-001.xht [ Failure ]
-crbug.com/635619 virtual/layout_ng/external/wpt/css/CSS2/positioning/abspos-011.xht [ Failure ]
-crbug.com/635619 virtual/layout_ng/external/wpt/css/CSS2/positioning/abspos-012.xht [ Failure ]
 crbug.com/635619 virtual/layout_ng/fast/block/float/float-should-dirty-line-when-adjacent-to-line-breaks-2.html [ Failure ]
 crbug.com/635619 virtual/layout_ng/fast/block/float/float-should-dirty-line-when-adjacent-to-line-breaks.html [ Failure ]
 
@@ -1842,8 +1749,12 @@
 crbug.com/803200 external/wpt/websockets/cookies/006.html?wss [ Failure ]
 crbug.com/803200 external/wpt/websockets/opening-handshake/005.html?wss [ Pass Failure ]
 
+# DCHECK failure.
+crbug.com/805061 external/wpt/custom-elements/upgrading/Node-cloneNode.html [ Crash ]
 
 # ====== New tests from wpt-importer added here ======
+crbug.com/626703 external/wpt/css/css-display/display-contents-fieldset-nested-legend.html [ Failure ]
+crbug.com/626703 external/wpt/css/css-ui/text-overflow-026.html [ Failure ]
 crbug.com/626703 external/wpt/svg/path/closepath/segment-completing.svg [ Failure ]
 crbug.com/626703 external/wpt/svg/path/distance/pathLength-positive.svg [ Failure ]
 crbug.com/626703 external/wpt/svg/path/distance/pathLength-zero.svg [ Failure ]
diff --git a/third_party/WebKit/LayoutTests/external/WPT_BASE_MANIFEST.json b/third_party/WebKit/LayoutTests/external/WPT_BASE_MANIFEST.json
index 26c1931..606a9275 100644
--- a/third_party/WebKit/LayoutTests/external/WPT_BASE_MANIFEST.json
+++ b/third_party/WebKit/LayoutTests/external/WPT_BASE_MANIFEST.json
@@ -27029,6 +27029,18 @@
      {}
     ]
    ],
+   "css/css-align/content-distribution/place-content-shorthand-007.html": [
+    [
+     "/css/css-align/content-distribution/place-content-shorthand-007.html",
+     [
+      [
+       "/css/css-align/content-distribution/place-content-shorthand-007-ref.html",
+       "=="
+      ]
+     ],
+     {}
+    ]
+   ],
    "css/css-align/distribution-values/space-evenly-001.html": [
     [
      "/css/css-align/distribution-values/space-evenly-001.html",
@@ -33929,6 +33941,18 @@
      {}
     ]
    ],
+   "css/css-display/display-contents-fieldset-nested-legend.html": [
+    [
+     "/css/css-display/display-contents-fieldset-nested-legend.html",
+     [
+      [
+       "/css/css-display/display-contents-fieldset-nested-legend-ref.html",
+       "=="
+      ]
+     ],
+     {}
+    ]
+   ],
    "css/css-display/display-contents-fieldset.html": [
     [
      "/css/css-display/display-contents-fieldset.html",
@@ -67013,6 +67037,18 @@
      {}
     ]
    ],
+   "css/css-ui/text-overflow-026.html": [
+    [
+     "/css/css-ui/text-overflow-026.html",
+     [
+      [
+       "/css/css-ui/text-overflow-026-ref.html",
+       "=="
+      ]
+     ],
+     {}
+    ]
+   ],
    "css/css-values/attr-color-invalid-cast.html": [
     [
      "/css/css-values/attr-color-invalid-cast.html",
@@ -67169,6 +67205,18 @@
      {}
     ]
    ],
+   "css/css-values/calc-ch-ex-lang.html": [
+    [
+     "/css/css-values/calc-ch-ex-lang.html",
+     [
+      [
+       "/css/css-values/calc-ch-ex-lang-ref.html",
+       "=="
+      ]
+     ],
+     {}
+    ]
+   ],
    "css/css-values/calc-in-calc.html": [
     [
      "/css/css-values/calc-in-calc.html",
@@ -67229,6 +67277,18 @@
      {}
     ]
    ],
+   "css/css-values/calc-rem-lang.html": [
+    [
+     "/css/css-values/calc-rem-lang.html",
+     [
+      [
+       "/css/css-values/calc-rem-lang-ref.html",
+       "=="
+      ]
+     ],
+     {}
+    ]
+   ],
    "css/css-values/ch-unit-001.html": [
     [
      "/css/css-values/ch-unit-001.html",
@@ -98752,6 +98812,11 @@
      {}
     ]
    ],
+   "css/css-align/content-distribution/place-content-shorthand-007-ref.html": [
+    [
+     {}
+    ]
+   ],
    "css/css-align/reference/ttwf-reftest-alignContent-ref.html": [
     [
      {}
@@ -100412,6 +100477,11 @@
      {}
     ]
    ],
+   "css/css-display/display-contents-fieldset-nested-legend-ref.html": [
+    [
+     {}
+    ]
+   ],
    "css/css-display/display-contents-flex-001-ref.html": [
     [
      {}
@@ -111542,6 +111612,11 @@
      {}
     ]
    ],
+   "css/css-scoping/slotted-invalidation-expected.txt": [
+    [
+     {}
+    ]
+   ],
    "css/css-scoping/slotted-with-pseudo-element-ref.html": [
     [
      {}
@@ -117812,6 +117887,11 @@
      {}
     ]
    ],
+   "css/css-ui/text-overflow-026-ref.html": [
+    [
+     {}
+    ]
+   ],
    "css/css-ui/text-overflow-ref.html": [
     [
      {}
@@ -117822,6 +117902,16 @@
      {}
     ]
    ],
+   "css/css-values/calc-ch-ex-lang-ref.html": [
+    [
+     {}
+    ]
+   ],
+   "css/css-values/calc-rem-lang-ref.html": [
+    [
+     {}
+    ]
+   ],
    "css/css-values/calc-serialization-expected.txt": [
     [
      {}
@@ -139747,6 +139837,11 @@
      {}
     ]
    ],
+   "html/semantics/scripting-1/the-script-element/module/resources/fast-module.js": [
+    [
+     {}
+    ]
+   ],
    "html/semantics/scripting-1/the-script-element/module/resources/import-non-utf8-with-charset-header.js": [
     [
      {}
@@ -139802,6 +139897,11 @@
      {}
     ]
    ],
+   "html/semantics/scripting-1/the-script-element/module/resources/slow-module.js": [
+    [
+     {}
+    ]
+   ],
    "html/semantics/scripting-1/the-script-element/module/set-currentScript-on-window.js": [
     [
      {}
@@ -148207,6 +148307,11 @@
      {}
     ]
    ],
+   "service-workers/service-worker/fetch-response-taint.https-expected.txt": [
+    [
+     {}
+    ]
+   ],
    "service-workers/service-worker/import-scripts-redirect.https-expected.txt": [
     [
      {}
@@ -148357,11 +148462,6 @@
      {}
     ]
    ],
-   "service-workers/service-worker/registration-updateviacache.https-expected.txt": [
-    [
-     {}
-    ]
-   ],
    "service-workers/service-worker/resource-timing.https-expected.txt": [
     [
      {}
@@ -148372,6 +148472,16 @@
      {}
     ]
    ],
+   "service-workers/service-worker/resources/about-blank-replacement-blank-dynamic-nested-frame.html": [
+    [
+     {}
+    ]
+   ],
+   "service-workers/service-worker/resources/about-blank-replacement-blank-nested-frame.html": [
+    [
+     {}
+    ]
+   ],
    "service-workers/service-worker/resources/about-blank-replacement-frame.py": [
     [
      {}
@@ -148387,6 +148497,11 @@
      {}
     ]
    ],
+   "service-workers/service-worker/resources/about-blank-replacement-srcdoc-nested-frame.html": [
+    [
+     {}
+    ]
+   ],
    "service-workers/service-worker/resources/about-blank-replacement-uncontrolled-nested-frame.html": [
     [
      {}
@@ -149477,6 +149592,11 @@
      {}
     ]
    ],
+   "service-workers/service-worker/unregister-then-register-new-script.https-expected.txt": [
+    [
+     {}
+    ]
+   ],
    "service-workers/service-worker/update-after-oneday.https-expected.txt": [
     [
      {}
@@ -151397,6 +151517,11 @@
      {}
     ]
    ],
+   "web-animations/interfaces/KeyframeEffect/composite-expected.txt": [
+    [
+     {}
+    ]
+   ],
    "web-animations/interfaces/KeyframeEffect/constructor-expected.txt": [
     [
      {}
@@ -167921,6 +168046,12 @@
      {}
     ]
    ],
+   "credential-management/require_securecontext.html": [
+    [
+     "/credential-management/require_securecontext.html",
+     {}
+    ]
+   ],
    "css/css-align/content-distribution/parse-align-content-001.html": [
     [
      "/css/css-align/content-distribution/parse-align-content-001.html",
@@ -170179,6 +170310,12 @@
      {}
     ]
    ],
+   "css/css-scoping/slotted-invalidation.html": [
+    [
+     "/css/css-scoping/slotted-invalidation.html",
+     {}
+    ]
+   ],
    "css/css-scoping/slotted-parsing.html": [
     [
      "/css/css-scoping/slotted-parsing.html",
@@ -174673,6 +174810,12 @@
      {}
     ]
    ],
+   "custom-elements/parser/parser-constructs-custom-elements-with-is.html": [
+    [
+     "/custom-elements/parser/parser-constructs-custom-elements-with-is.html",
+     {}
+    ]
+   ],
    "custom-elements/parser/parser-constructs-custom-elements.html": [
     [
      "/custom-elements/parser/parser-constructs-custom-elements.html",
@@ -189497,6 +189640,14 @@
      {}
     ]
    ],
+   "html/semantics/scripting-1/the-script-element/module/inline-async-execorder.html": [
+    [
+     "/html/semantics/scripting-1/the-script-element/module/inline-async-execorder.html",
+     {
+      "timeout": "long"
+     }
+    ]
+   ],
    "html/semantics/scripting-1/the-script-element/module/instantiation-error-1.html": [
     [
      "/html/semantics/scripting-1/the-script-element/module/instantiation-error-1.html",
@@ -240800,6 +240951,10 @@
    "3ce3b0a2eaa10928aec1f32c9e3bcbe2af5fafba",
    "testharness"
   ],
+  "credential-management/require_securecontext.html": [
+   "4a266e0c663a12ace13f6f08a7899236b489f698",
+   "testharness"
+  ],
   "credential-management/support/echoing-nester.html": [
    "408bf741f31a9f69a2a9a50d93877f6a999cd9d9",
    "support"
@@ -254660,6 +254815,14 @@
    "5eaf145e4c91b972937ee364ba07be05cb44d1fd",
    "testharness"
   ],
+  "css/css-align/content-distribution/place-content-shorthand-007-ref.html": [
+   "6008fc2ca235c4b4c171ace405fd312647be3313",
+   "support"
+  ],
+  "css/css-align/content-distribution/place-content-shorthand-007.html": [
+   "5268627f55928b969e022a626961958ac8f92e05",
+   "reftest"
+  ],
   "css/css-align/default-alignment/justify-items-legacy-001.html": [
    "bcf17f709a9b87ef728262b658d1dfa65afc93bb",
    "testharness"
@@ -259248,6 +259411,14 @@
    "c874f59947d37659e640d4e0abb8a0dc0f03927d",
    "reftest"
   ],
+  "css/css-display/display-contents-fieldset-nested-legend-ref.html": [
+   "89fbd146ffbd862ba3d0f058d8d8c9d8024da0fa",
+   "support"
+  ],
+  "css/css-display/display-contents-fieldset-nested-legend.html": [
+   "45be585ab1523c180b3ba159d25d0dadd80456ac",
+   "reftest"
+  ],
   "css/css-display/display-contents-fieldset.html": [
    "353abc0ce5abe98a1678fbd5832bf16a0d8b5094",
    "reftest"
@@ -273876,6 +274047,14 @@
    "46913ea7e47811b11be898de5c3bd0a330ea6637",
    "testharness"
   ],
+  "css/css-scoping/slotted-invalidation-expected.txt": [
+   "ba0ab97c9e166125c81cf46fba09387c5333b874",
+   "support"
+  ],
+  "css/css-scoping/slotted-invalidation.html": [
+   "c500e1ceba1b293d45df5f66fd89d4a5d9ceb952",
+   "testharness"
+  ],
   "css/css-scoping/slotted-parsing.html": [
    "6bac5b15011d7177a40f7ca3e3c5f7e410643920",
    "testharness"
@@ -288428,6 +288607,14 @@
    "b4a2e0d1b86fd8893421de4335c9b6f36df1fc4d",
    "reftest"
   ],
+  "css/css-ui/text-overflow-026-ref.html": [
+   "03c0337af58ba7bada64ab36721d9f1fe2f9a2f3",
+   "support"
+  ],
+  "css/css-ui/text-overflow-026.html": [
+   "5087fe90cb3ef8e340be316f1534cb6dba3e0d17",
+   "reftest"
+  ],
   "css/css-ui/text-overflow-ref.html": [
    "db55b0b95a7406e9c4f00081b3e2cbe6b07363f7",
    "support"
@@ -288500,6 +288687,14 @@
    "70627dbbfc5af5fb859fdf1362f0004b38c64e34",
    "reftest"
   ],
+  "css/css-values/calc-ch-ex-lang-ref.html": [
+   "218e1cb6782b554de35aad70913cddb8e7d71da2",
+   "support"
+  ],
+  "css/css-values/calc-ch-ex-lang.html": [
+   "d15f42e237b281793ac808e06af92217d4f9593e",
+   "reftest"
+  ],
   "css/css-values/calc-in-calc.html": [
    "be08a1510714e8b4fbc4d35582db5708924d06b2",
    "reftest"
@@ -288524,6 +288719,14 @@
    "080551c1bee3d7bf54dda2c3d5b7e5a9fbd8aed6",
    "reftest"
   ],
+  "css/css-values/calc-rem-lang-ref.html": [
+   "08bbc95f3078421a489e1e93cc7a4f035af40d5b",
+   "support"
+  ],
+  "css/css-values/calc-rem-lang.html": [
+   "6fa668d2bcaf01f5c4680e3e14a0e86160d1b5d5",
+   "reftest"
+  ],
   "css/css-values/calc-serialization-expected.txt": [
    "d38b12521063bf2abf97c7481a84977c796296a7",
    "support"
@@ -301053,7 +301256,7 @@
    "testharness"
   ],
   "custom-elements/Document-createElement.html": [
-   "074c9f703cc7feb1dfc3d07aedd08460bd591d42",
+   "14960ee9498f6ff23c1c94d3351a8ef383e60067",
    "testharness"
   ],
   "custom-elements/HTMLElement-constructor.html": [
@@ -301069,7 +301272,7 @@
    "testharness"
   ],
   "custom-elements/attribute-changed-callback.html": [
-   "1ad26231aa638a0e0f9b76d77bdd93a3712dda98",
+   "320fb2bb26e7495d0829c39c113df3ea7ec1f4ef",
    "testharness"
   ],
   "custom-elements/connected-callbacks.html": [
@@ -301124,6 +301327,10 @@
    "dc0ca4a066d9a05362a81b263594965763919e46",
    "testharness"
   ],
+  "custom-elements/parser/parser-constructs-custom-elements-with-is.html": [
+   "17145d44113ea88688060c6cfd10d162cd97e28b",
+   "testharness"
+  ],
   "custom-elements/parser/parser-constructs-custom-elements.html": [
    "228d4a90d57dc942692becc6f126ec9130b3a4e0",
    "testharness"
@@ -301133,7 +301340,7 @@
    "testharness"
   ],
   "custom-elements/parser/parser-sets-attributes-and-children.html": [
-   "422bd43f10b48f0450b20fd4b0de046d465bec38",
+   "8049449173e4082b2f4ccadfe552abadadc0834a",
    "testharness"
   ],
   "custom-elements/parser/parser-uses-constructed-element.html": [
@@ -301289,7 +301496,7 @@
    "testharness"
   ],
   "custom-elements/upgrading/Node-cloneNode.html": [
-   "cc121ea56de1b8e1074062b5dda69f57e2add665",
+   "264a2631a79370bce8392657ba52c8b0c949b7e1",
    "testharness"
   ],
   "custom-elements/upgrading/upgrading-enqueue-reactions.html": [
@@ -306929,7 +307136,7 @@
    "testharness"
   ],
   "fetch/api/response/response-init-002.html": [
-   "9806050696657f48e609bbc943ba15a78d6464d1",
+   "5b87fa0d008f633d73bd87ab1755eee719b104cc",
    "testharness"
   ],
   "fetch/api/response/response-static-error.html": [
@@ -308401,7 +308608,7 @@
    "testharness"
   ],
   "html/browsers/browsing-the-web/scroll-to-fragid/scroll-to-anchor-name.html": [
-   "8de758988400b4b1acad6bb4c94069b4d0167c20",
+   "9bc91bc9bb368e8bf42810ed8aed936a6c9d581a",
    "testharness"
   ],
   "html/browsers/browsing-the-web/scroll-to-fragid/scroll-to-id-top.html": [
@@ -323972,6 +324179,10 @@
    "15b0b32d86bc6411b29c5d978db71053c00a1d65",
    "testharness"
   ],
+  "html/semantics/scripting-1/the-script-element/module/inline-async-execorder.html": [
+   "790fc3e9e9b9661da1e88d536e50f540792ee729",
+   "testharness"
+  ],
   "html/semantics/scripting-1/the-script-element/module/instantiation-error-1.html": [
    "b48335aa61dc13c34d2a77806f20663e2156bc6f",
    "testharness"
@@ -324208,6 +324419,10 @@
    "f09db3d2acdf3aba3fc8c67b2f089a0ba506c799",
    "support"
   ],
+  "html/semantics/scripting-1/the-script-element/module/resources/fast-module.js": [
+   "218ea0b166fa79df83ee7ac7aff3bca8437b44aa",
+   "support"
+  ],
   "html/semantics/scripting-1/the-script-element/module/resources/import-non-utf8-with-charset-header.js": [
    "5ff227dc83335d8a3e8da0161993c1de239ee7f8",
    "support"
@@ -324252,6 +324467,10 @@
    "a148d34314c2734fd49bf69d201006618fdac78f",
    "support"
   ],
+  "html/semantics/scripting-1/the-script-element/module/resources/slow-module.js": [
+   "6a68189c41bb8a69fc0468bb048a50f8b8961101",
+   "support"
+  ],
   "html/semantics/scripting-1/the-script-element/module/script-for-event.html": [
    "c225684e0c7d09f9628aab589c8673b140994243",
    "testharness"
@@ -326953,7 +327172,7 @@
    "testharness"
   ],
   "http/resources/securedimage.py": [
-   "b03f45c4dad3a9cd0f0fb67a99a79be3ba64b199",
+   "d5aa250e8cba8384f47fca2c559aa6a310dff457",
    "support"
   ],
   "imagebitmap-renderingcontext/OWNERS": [
@@ -347093,11 +347312,11 @@
    "testharness"
   ],
   "service-workers/service-worker/about-blank-replacement.https-expected.txt": [
-   "9c2d84a4261cecfb71edd469d30cdf47e5708379",
+   "fded8485b910b8bca6dafbfab0b01d1ae00d0ae4",
    "support"
   ],
   "service-workers/service-worker/about-blank-replacement.https.html": [
-   "345259908d040e4f5d810ae7089dab8a8c909b0a",
+   "d2cc0fc99820308096d549d892962fe10b19f0ae",
    "testharness"
   ],
   "service-workers/service-worker/activate-event-after-install-state-change.https.html": [
@@ -347388,8 +347607,12 @@
    "b30618dfe4c10370865229cbe9606cce8ed42040",
    "testharness"
   ],
+  "service-workers/service-worker/fetch-response-taint.https-expected.txt": [
+   "5f2efb4ef948762ad45dd33c86964cbe070c3971",
+   "support"
+  ],
   "service-workers/service-worker/fetch-response-taint.https.html": [
-   "217383b4dddcc6f984c4cc7cd5f99e1f9b86cdd1",
+   "154a52255d0aae9a99879389afba6214b803b08d",
    "testharness"
   ],
   "service-workers/service-worker/fetch-response-xhr.https.html": [
@@ -347748,10 +347971,6 @@
    "04a6fd8d3ff62fa4d969b629eb5f541c6447ae12",
    "testharness"
   ],
-  "service-workers/service-worker/registration-updateviacache.https-expected.txt": [
-   "a2bfe6d6414cf0816391aa6830efcf09863053e1",
-   "support"
-  ],
   "service-workers/service-worker/registration-updateviacache.https.html": [
    "c1caf6840bc36eed4f4ece8e42702151e08b3754",
    "testharness"
@@ -347776,6 +347995,14 @@
    "567d0a7de3ef54adaa8339bb04632a2ecfcc57a5",
    "support"
   ],
+  "service-workers/service-worker/resources/about-blank-replacement-blank-dynamic-nested-frame.html": [
+   "bfd2c8e7acb010cd7b5a0076a9138d8584e5efab",
+   "support"
+  ],
+  "service-workers/service-worker/resources/about-blank-replacement-blank-nested-frame.html": [
+   "79cb319dbdbae7efb9abf3405c2bc76ad9f0bc0f",
+   "support"
+  ],
   "service-workers/service-worker/resources/about-blank-replacement-frame.py": [
    "2f22a4c92cfb7c7e8cfbe6f168872c2f5875867d",
    "support"
@@ -347788,6 +348015,10 @@
    "498a08b652ec0d867e8d2e173be954f69354a208",
    "support"
   ],
+  "service-workers/service-worker/resources/about-blank-replacement-srcdoc-nested-frame.html": [
+   "6a0d88da977057eb365dfc8bfb531558d7a1bd4a",
+   "support"
+  ],
   "service-workers/service-worker/resources/about-blank-replacement-uncontrolled-nested-frame.html": [
    "ab2ce3693bbc40943b7390c8d76f3601f52410ca",
    "support"
@@ -348732,8 +348963,12 @@
    "24cf65bf38dcdd90e24c20bd6be3823db1e9a601",
    "testharness"
   ],
+  "service-workers/service-worker/unregister-then-register-new-script.https-expected.txt": [
+   "faa8da73056499ee1f43ce3aa3fb1f428664ff28",
+   "support"
+  ],
   "service-workers/service-worker/unregister-then-register-new-script.https.html": [
-   "43964791edbb2b5cd3b3ed27b600e78412902240",
+   "ee8d7cd4e47cdb9bcf2b39c911593bc671df914d",
    "testharness"
   ],
   "service-workers/service-worker/unregister-then-register.https.html": [
@@ -348789,11 +349024,11 @@
    "testharness"
   ],
   "service-workers/service-worker/worker-interception.https-expected.txt": [
-   "fdb0f552918d830b4bab99b9e80d142bb84e180a",
+   "d880a66c3cea35ee82db031c353a81ed0278cb16",
    "support"
   ],
   "service-workers/service-worker/worker-interception.https.html": [
-   "2c5e8cb2b7be6d394aaa1400158d3f14895909f3",
+   "41f7e5e8da2c305370fddad83518cd0fa57547eb",
    "testharness"
   ],
   "service-workers/specgen.json": [
@@ -352617,7 +352852,7 @@
    "support"
   ],
   "web-animations/README.md": [
-   "6344565e53b2f9e8d6ee7658d1c5c5670e68fc98",
+   "9dfaf5979c3bf30bf075b3929ac3620954e83497",
    "support"
   ],
   "web-animations/animation-model/animation-types/accumulation-per-property.html": [
@@ -352681,7 +352916,7 @@
    "testharness"
   ],
   "web-animations/interfaces/Animatable/animate-expected.txt": [
-   "abe2a3dc989e0d16f53a8cd7f31a24731852d136",
+   "fbce268cd84f360db7a36749f48eb796362960c9",
    "support"
   ],
   "web-animations/interfaces/Animatable/animate-no-browsing-context-expected.txt": [
@@ -352769,7 +353004,7 @@
    "testharness"
   ],
   "web-animations/interfaces/Animation/playbackRate.html": [
-   "27d289f603953b3e39322287fb2a55f84dd8dc54",
+   "a298a65aaeb5a337fe894f0160493693f309c2a1",
    "testharness"
   ],
   "web-animations/interfaces/Animation/ready.html": [
@@ -352785,11 +353020,11 @@
    "testharness"
   ],
   "web-animations/interfaces/AnimationEffectTiming/direction.html": [
-   "11398d5ea40bb4137b4f5d4e6e6238af64caf3c5",
+   "642207ce454fb816cc47d14fbe29f65d92ddf6ed",
    "testharness"
   ],
   "web-animations/interfaces/AnimationEffectTiming/duration.html": [
-   "315810a1e73f9b4ef2cffea868fb766af5ee5c93",
+   "14abe09cb19080585a315115e387b85784c7d862",
    "testharness"
   ],
   "web-animations/interfaces/AnimationEffectTiming/easing.html": [
@@ -352797,7 +353032,7 @@
    "testharness"
   ],
   "web-animations/interfaces/AnimationEffectTiming/endDelay.html": [
-   "b36d9c8a4e4082e6a75ac5d8f336cf474cd75aab",
+   "a8609f22672b092178c2391d7ba7ef804112bef4",
    "testharness"
   ],
   "web-animations/interfaces/AnimationEffectTiming/fill.html": [
@@ -352817,11 +353052,11 @@
    "testharness"
   ],
   "web-animations/interfaces/AnimationEffectTiming/iterationStart.html": [
-   "734743adeec628da907ea2f6cc4ae3be3aab7329",
+   "393b37098ab470e75b1254b53875901e705d8d1b",
    "testharness"
   ],
   "web-animations/interfaces/AnimationEffectTiming/iterations.html": [
-   "c8705eb209d8a4912b5d3fd94a05c763b7707eca",
+   "1e8bb46b5a1eef496edda32b16c856baa16e9b30",
    "testharness"
   ],
   "web-animations/interfaces/AnimationPlaybackEvent/constructor-expected.txt": [
@@ -352856,16 +353091,20 @@
    "72cb7900f86611e9c2a1b0f4acd0f634555310b9",
    "testharness"
   ],
+  "web-animations/interfaces/KeyframeEffect/composite-expected.txt": [
+   "bdbc5995e5c8bd4f9bc2be80048d4f139c263a24",
+   "support"
+  ],
   "web-animations/interfaces/KeyframeEffect/composite.html": [
-   "7dd18327d8da81914adaf443086891ba3646d882",
+   "12fc2e8e7bcfb1eab6e162b68731ff6fcb767438",
    "testharness"
   ],
   "web-animations/interfaces/KeyframeEffect/constructor-expected.txt": [
-   "54e2bcc35dfd50361b58f817eef7d2dc826893b4",
+   "edc358f2e88d17412ac2e843efc88940860b9d82",
    "support"
   ],
   "web-animations/interfaces/KeyframeEffect/constructor.html": [
-   "4a80ea073da0a9c62dcb9587676445a2fba234e1",
+   "2f6449cbf2b47ae457efb23fb52b8fd1709837ac",
    "testharness"
   ],
   "web-animations/interfaces/KeyframeEffect/copy-constructor.html": [
@@ -352893,7 +353132,7 @@
    "support"
   ],
   "web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-001.html": [
-   "165b651cea12ab9e0825f4335e7f697ce1fc6247",
+   "f54c7c0da5728f88f37a067761af7ad815fea005",
    "testharness"
   ],
   "web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-002.html": [
@@ -352925,7 +353164,7 @@
    "support"
   ],
   "web-animations/resources/keyframe-tests.js": [
-   "52ffc50c4ebf0326db8f4e1d0cc1234f6c860dc2",
+   "b31029042fdfa77ba8bf0e9370f63a423fbe0da9",
    "support"
   ],
   "web-animations/resources/keyframe-utils.js": [
@@ -352937,11 +353176,11 @@
    "support"
   ],
   "web-animations/testcommon.js": [
-   "94130b39fda8e95ca495d297f9d47eefa6430a04",
+   "de3f89d5ed07d00d453746df5d13387d15f05016",
    "support"
   ],
   "web-animations/timing-model/animation-effects/active-time.html": [
-   "68ca985984ed6f868cebb539dfde6d7ddba6c824",
+   "f05ff3594dde7248c84db42f8a80a6d0136b5f54",
    "testharness"
   ],
   "web-animations/timing-model/animation-effects/current-iteration-expected.txt": [
@@ -352969,7 +353208,7 @@
    "testharness"
   ],
   "web-animations/timing-model/animation-effects/simple-iteration-progress-expected.txt": [
-   "d0d2980c7836fd5782d91b518c41c444acc56472",
+   "0467ff08867c5f9940f380f2bba0a1739c7d83ab",
    "support"
   ],
   "web-animations/timing-model/animation-effects/simple-iteration-progress.html": [
@@ -352985,7 +353224,7 @@
    "testharness"
   ],
   "web-animations/timing-model/animations/current-time.html": [
-   "390e2ba8d6de9bfea5f26cd2e7a42ccdf73f1a35",
+   "52d23e752878c821754b2c2b752e7393882609e2",
    "testharness"
   ],
   "web-animations/timing-model/animations/finishing-an-animation.html": [
@@ -353009,7 +353248,7 @@
    "testharness"
   ],
   "web-animations/timing-model/animations/playing-an-animation.html": [
-   "6ee1b850154ce22fffafa686fc2fdfef9dded38b",
+   "1ae05a904e5b4fbcf1d904f02825f836da7b4c18",
    "testharness"
   ],
   "web-animations/timing-model/animations/reversing-an-animation-expected.txt": [
@@ -353021,7 +353260,7 @@
    "testharness"
   ],
   "web-animations/timing-model/animations/set-the-animation-start-time.html": [
-   "10fea7d0b0dbe046d72b4048607816c9ebe37f7f",
+   "fa26feebcde00a5b0b63f8f3587acc313a58f26a",
    "testharness"
   ],
   "web-animations/timing-model/animations/set-the-target-effect-of-an-animation-expected.txt": [
@@ -353037,7 +353276,7 @@
    "support"
   ],
   "web-animations/timing-model/animations/set-the-timeline-of-an-animation.html": [
-   "ef8ce243226296718453e10d89b4cfd68b2d765e",
+   "bd33cb8638aa373b17cda20906af5aea2f5a7503",
    "testharness"
   ],
   "web-animations/timing-model/animations/updating-the-finished-state.html": [
diff --git a/third_party/WebKit/LayoutTests/external/wpt/credential-management/require_securecontext.html b/third_party/WebKit/LayoutTests/external/wpt/credential-management/require_securecontext.html
new file mode 100644
index 0000000..b1f3103d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/credential-management/require_securecontext.html
@@ -0,0 +1,13 @@
+<!doctype html>
+<meta charset=utf-8>
+<title>Test that Credential Management requires secure contexts</title>
+<link rel="help" href="https://w3c.github.io/webappsec-credential-management/#idl-index">
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script>
+"use strict";
+  test(() => {
+    assert_false(isSecureContext);
+    assert_false('credentials' in navigator);
+  }, "Credential Management must not be accessible in insecure contexts");
+</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/floats-clear/clear-applies-to-008-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/floats-clear/clear-applies-to-008-ref.xht
index 6a17a530..e947a1a 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/floats-clear/clear-applies-to-008-ref.xht
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/floats-clear/clear-applies-to-008-ref.xht
@@ -9,6 +9,8 @@
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
 
   <style type="text/css"><![CDATA[
+  /* Disable kerning because kerning may differ for different node tree. */
+  html { font-kerning: none; font-feature-settings: "kern" off; }
   body {margin-bottom: 0px;}
 
   div {height: 10em;}
@@ -23,4 +25,4 @@
   <div>PASS</div>
 
  </body>
-</html>
\ No newline at end of file
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/floats-clear/clear-applies-to-008.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/floats-clear/clear-applies-to-008.xht
index 59a718a..1ff09c6 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/floats-clear/clear-applies-to-008.xht
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/floats-clear/clear-applies-to-008.xht
@@ -11,6 +11,8 @@
 
   <meta name="assert" content="The 'clear' property does not apply to elements with a display of 'inline'." />
   <style type="text/css">
+   /* Disable kerning because kerning may differ for different node tree. */
+   html { font-kerning: none; font-feature-settings: "kern" off; }
    .float { float: left; height: 10em; }
    .clear { clear: left; }
   </style>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/floats-clear/clear-applies-to-012.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/floats-clear/clear-applies-to-012.xht
index fb76e91..ecff648 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/floats-clear/clear-applies-to-012.xht
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/floats-clear/clear-applies-to-012.xht
@@ -42,8 +42,8 @@
         <p>Test passes if there is a filled blue square to the right of this text.</p>
 
         <div>
-				    <span class="block-descendant">a</span>
-				    <span class="block-descendant">b</span>
+				    <span class="block-descendant">&nbsp;a</span>
+				    <span class="block-descendant">&nbsp;b</span>
         </div>
 
     </body>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/floats-clear/float-applies-to-008-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/floats-clear/float-applies-to-008-ref.xht
index 1d7dde1..addfe5ee 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/floats-clear/float-applies-to-008-ref.xht
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/floats-clear/float-applies-to-008-ref.xht
@@ -10,17 +10,15 @@
 
   <style type="text/css"><![CDATA[
   div {text-align: right;}
-
-  span {background-color: blue;}
   ]]></style>
 
  </head>
 
  <body>
 
-  <p>Test passes if there is a short blue stripe on the right side of the page.</p>
+  <p>Test passes if Filler Text can be seen on the right side of the page.</p>
 
-  <div><span>Filler Text</span></div>
+  <div>Filler Text</div>
 
  </body>
 </html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/floats-clear/float-applies-to-008.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/floats-clear/float-applies-to-008.xht
index 4c78d57b..0405348 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/floats-clear/float-applies-to-008.xht
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/floats-clear/float-applies-to-008.xht
@@ -1,26 +1,25 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
-    <head>
-        <title>CSS Test: Float applied to element with 'display' set to inline</title>
-        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
-        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-12-14 -->
-        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-float" />
-        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#float-position" />
-		<link rel="match" href="float-applies-to-008-ref.xht" />
+  <head>
+    <title>CSS Test: Float applied to element with 'display' set to inline</title>
+    <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+    <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-12-14 -->
+    <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-float" />
+    <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#float-position" />
+    <link rel="match" href="float-applies-to-008-ref.xht" />
 
-        <meta name="flags" content="" />
-        <meta name="assert" content="The 'float' property applies to elements with a display of inline." />
-        <style type="text/css">
-            div
-            {
-                background: blue;
-                display: inline;
-                float: right;
-            }
-        </style>
-    </head>
-    <body>
-        <p>Test passes if there is a short blue stripe on the right side of the page.</p>
-        <div>Filler Text</div>
-    </body>
+    <meta name="flags" content="" />
+    <meta name="assert" content="The 'float' property applies to elements with a display of inline." />
+    <style type="text/css">
+      div
+      {
+        display: inline;
+        float: right;
+      }
+    </style>
+  </head>
+  <body>
+    <p>Test passes if Filler Text can be seen on the right side of the page.</p>
+    <div>Filler Text</div>
+  </body>
 </html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/floats-clear/float-applies-to-012.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/floats-clear/float-applies-to-012.xht
index 9650741c..21bc2dc1 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/floats-clear/float-applies-to-012.xht
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/floats-clear/float-applies-to-012.xht
@@ -1,41 +1,41 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
-    <head>
-        <title>CSS Test: Float applied to element with 'display' set to inline-block</title>
-        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
-        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-12-14 -->
-        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-float" />
-        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#float-position" />
-        <link rel="match" href="../reference/float-applies-to-001-ref.xht" />
+  <head>
+    <title>CSS Test: Float applied to element with 'display' set to inline-block</title>
+    <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+    <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-12-14 -->
+    <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-float" />
+    <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#float-position" />
+    <link rel="match" href="../reference/float-applies-to-001-ref.xht" />
 
-        <meta name="flags" content="" />
-        <meta name="assert" content="The 'float' property applies to elements with a display of inline-block." />
-        <style type="text/css">
-            span#inline-block
-            {
-                background: blue;
-                display: inline-block;
-                float: right;
-                height: 1in;
-                width: 1in;
-            }
+    <meta name="flags" content="" />
+    <meta name="assert" content="The 'float' property applies to elements with a display of inline-block." />
+    <style type="text/css">
+      span#inline-block
+      {
+        background: blue;
+        display: inline-block;
+        float: right;
+        height: 1in;
+        width: 1in;
+      }
 
-            span.block-descendant
-            {
-                color: blue;
-                display: block;
-            }
-        </style>
-    </head>
-    <body>
-        <p>Test passes if there is a filled blue square on the right side of the page.</p>
+      span.block-descendant
+      {
+        color: blue;
+        display: block;
+      }
+    </style>
+  </head>
+  <body>
+    <p>Test passes if there is a filled blue square on the right side of the page.</p>
 
-        <div>
-            <span id="inline-block">
-				        <span class="block-descendant">a</span>
-				        <span class="block-descendant">b</span>
-        	  </span>
-        </div>
+    <div>
+      <span id="inline-block">
+	<span class="block-descendant">&nbsp;a</span>
+	<span class="block-descendant">&nbsp;b</span>
+      </span>
+    </div>
 
-    </body>
+  </body>
 </html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/floats-clear/floats-028-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/floats-clear/floats-028-ref.xht
index e6fd0ff..a975a6b 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/floats-clear/floats-028-ref.xht
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/floats-clear/floats-028-ref.xht
@@ -8,22 +8,20 @@
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
 
   <style type="text/css"><![CDATA[
-  div#wrapper
-  {
-  border: black solid 5px;
-  bottom: 17px;
-  height: 192px;
-  left: 24px;
-  position: relative;
-  width: 192px;
-  }
+    div#wrapper {
+      border: solid 5px black;
+      height: 2in;
+      margin: 0.25in;
+      position: absolute;
+      top: 10px;
+      width: 2in;
+   }
 
-  div > div
-  {
-  background-color: blue;
-  height: 120px;
-  width: 120px;
-  }
+   div > div {
+     background-color: blue;
+     height: 120px;
+     width: 120px;
+   }
 
   ]]></style>
 
@@ -38,4 +36,4 @@
   </div>
 
  </body>
-</html>
\ No newline at end of file
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/floats-clear/floats-028.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/floats-clear/floats-028.xht
index 39006ea..8dd14fb 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/floats-clear/floats-028.xht
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/floats-clear/floats-028.xht
@@ -33,4 +33,4 @@
             <span>Filler Text</span>
         </div>
     </body>
-</html>
\ No newline at end of file
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/floats-clear/floats-036-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/floats-clear/floats-036-ref.xht
index 0c54201..0de561ab 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/floats-clear/floats-036-ref.xht
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/floats-clear/floats-036-ref.xht
@@ -6,6 +6,10 @@
 
   <title>CSS Reftest Reference</title>
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+  <style>
+    /* Disable kerning because kerning may differ for different node tree. */
+    html { font-kerning: none; font-feature-settings: "kern" off; }
+  </style>
 
  </head>
 
@@ -16,4 +20,4 @@
   <div>Filler TextFiller Text</div>
 
  </body>
-</html>
\ No newline at end of file
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/floats-clear/floats-036.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/floats-clear/floats-036.xht
index de47a27b..c0a91a8 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/floats-clear/floats-036.xht
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/floats-clear/floats-036.xht
@@ -9,6 +9,8 @@
         <meta name="flags" content="" />
         <meta name="assert" content="A floated elements top edge will be aligned with the top of a line box." />
         <style type="text/css">
+            /* Disable kerning because kerning may differ for different node tree. */
+            html { font-kerning: none; font-feature-settings: "kern" off; }
             div
             {
                 width: 5in;
@@ -26,4 +28,4 @@
             <span id="span1">Filler Text</span>
         </div>
     </body>
-</html>
\ No newline at end of file
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/normal-flow/inline-table-002-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/normal-flow/inline-table-002-ref.xht
index c333d3a..42a4110f 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/normal-flow/inline-table-002-ref.xht
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/normal-flow/inline-table-002-ref.xht
@@ -4,7 +4,5 @@
 <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
 </head>
 <body>
-<p>abcde</p>
-
-
-</body></html>
\ No newline at end of file
+<p>a<span style="display:inline-table;">bcd</span>e</p>
+</body></html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/normal-flow/inline-table-valign-001-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/normal-flow/inline-table-valign-001-ref.xht
index 243ad0f7..07d9f5e 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/normal-flow/inline-table-valign-001-ref.xht
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/normal-flow/inline-table-valign-001-ref.xht
@@ -4,8 +4,6 @@
 <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" />
 <style type="text/css">
 span#table { display: inline-table; }
-span#rowgroup { display: table-row-group; }
-span#row { display: table-row; }
 span#cell { display: table-cell; }
 span#table, span#rowgroup, span#row, span#cell {
   border: 4px solid white;
@@ -19,8 +17,11 @@
 </head>
 <body>
 <table border=""><tbody><tr><td>
-<p><span id="table"><span id="rowgroup"><span id="row"><span id="cell">abcde<span id="block">x</span></span></span></span></span></p>
+        <p>
+          a<span id="table"><span id="cell">bcd</span></span>e
+          <span id="block">x</span>
+        </p>
 </td></tr></tbody></table>
 
 
-</body></html>
\ No newline at end of file
+</body></html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/normal-flow/width-inherit-001.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/normal-flow/width-inherit-001.xht
index 18583f4..c958d8b6 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/normal-flow/width-inherit-001.xht
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/normal-flow/width-inherit-001.xht
@@ -23,6 +23,8 @@
       background: orange;
     }
     .control {
+      position: absolute;
+      top: 82px;
       width: 9.375em;
       height: 1.875em;
       background: blue;
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-011-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-011-ref.xht
index 0e421c4..e14b766 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-011-ref.xht
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-011-ref.xht
@@ -32,7 +32,7 @@
 
  <body>
 
-  <div id="first">____ ____</div>
+  <div id="first">&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;</div>
 
   <div id="second">FAIL PASS</div>
 
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-011.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-011.xht
index 111795b97..1900af4 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-011.xht
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-011.xht
@@ -16,9 +16,9 @@
   </style>
  </head>
  <body>
-  <p>FAIL ____</p>
-  <p>#___ P___</p>
-  <p>_##_ _A__</p>
-  <p>___# __SS</p>
+  <p>FAIL &nbsp;&nbsp;&nbsp;&nbsp;</p>
+  <p>#&nbsp;&nbsp;&nbsp; P&nbsp;&nbsp;&nbsp;</p>
+  <p>&nbsp;##&nbsp; &nbsp;A&nbsp;&nbsp;</p>
+  <p>&nbsp;&nbsp;&nbsp;# &nbsp;&nbsp;SS</p>
 </body>
 </html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-012.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-012.xht
index 8aacf30..03b47f92 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-012.xht
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-012.xht
@@ -18,10 +18,10 @@
  </head>
  <body>
   <div>
-   <p>FAIL ____</p>
-   <p>#___ P___</p>
-   <p>_##_ _A__</p>
-   <p>___# __SS</p>
+   <p>FAIL &nbsp;&nbsp;&nbsp;&nbsp;</p>
+   <p>#&nbsp;&nbsp;&nbsp; P&nbsp;&nbsp;&nbsp;</p>
+   <p>&nbsp;##&nbsp; &nbsp;A&nbsp;&nbsp;</p>
+   <p>&nbsp;&nbsp;&nbsp;# &nbsp;&nbsp;SS</p>
   </div>
 
 
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-027.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-027.xht
index 20fcb2a3..f9fecbe6 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-027.xht
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-027.xht
@@ -9,7 +9,7 @@
   <link rel="match" href="../reference/ref-if-there-is-no-red.xht" />
 
   <style type="text/css">
-  body {margin-top: 1em; font: 1em/1.25 serif;}
+  body {margin-top: 1em; }
 
    .test { position: absolute; background: red; }
    table { background: white; color: black; margin: auto; border-spacing: 0px; }
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-031-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-031-ref.xht
index 8e5300f..841ed97 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-031-ref.xht
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-031-ref.xht
@@ -8,6 +8,10 @@
 
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
 
+  <style>
+    /* Disable kerning because kerning may differ for different node tree. */
+    html { font-kerning: none; font-feature-settings: "kern" off; }
+  </style>
  </head>
 
  <body>
@@ -17,4 +21,4 @@
   <div>Filler Text Filler Text Filler Text Filler Text Filler Text</div>
 
  </body>
-</html>
\ No newline at end of file
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-031.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-031.xht
index 235260ba..11f5375 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-031.xht
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-031.xht
@@ -10,6 +10,8 @@
         <meta name="flags" content="" />
         <meta name="assert" content="Relatively positioned element with auto positioning render as though they were positioned in flow." />
         <style type="text/css">
+            /* Disable kerning because kerning may differ for different node tree. */
+            html { font-kerning: none; font-feature-settings: "kern" off; }
             div
             {
                 width: 5in;
@@ -26,4 +28,4 @@
             <span>Filler Text </span><span id="span1">Filler Text</span> Filler Text<span> Filler Text </span>Filler Text
         </div>
     </body>
-</html>
\ No newline at end of file
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/positioning-float-001-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/positioning-float-001-ref.xht
index 5655e5f..aaa2ce88 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/positioning-float-001-ref.xht
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/positioning-float-001-ref.xht
@@ -9,6 +9,9 @@
   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
 
   <style type="text/css"><![CDATA[
+  /* Disable kerning because kerning may differ for different node tree. */
+  html { font-kerning: none; font-feature-settings: "kern" off; }
+
   div {font-size: 3em;}
   ]]></style>
 
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/positioning-float-001.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/positioning-float-001.xht
index 0b0ee55..ababe89 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/positioning-float-001.xht
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/positioning-float-001.xht
@@ -9,6 +9,9 @@
         <meta name="flags" content="" />
         <meta name="assert" content="Floating a box will first lay out the box then shift it to the left." />
         <style type="text/css">
+            /* Disable kerning because kerning may differ for different node tree. */
+            html { font-kerning: none; font-feature-settings: "kern" off; }
+
             div
             {
                 font-size: 3em;
@@ -24,4 +27,4 @@
         <p>Test passes if there is the word "P A S S".</p>
         <div>S <span>P A&nbsp;</span>S</div>
     </body>
-</html>
\ No newline at end of file
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-align/content-distribution/place-content-shorthand-007-ref.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-align/content-distribution/place-content-shorthand-007-ref.html
new file mode 100644
index 0000000..67727f4
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-align/content-distribution/place-content-shorthand-007-ref.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Test Reference</title>
+<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
+<style>
+div {
+  width: 400px;
+  height: 400px;
+  background: blue;
+  position: relative;
+}
+span {
+  background: green;
+  width: 200px;
+  height: 200px;
+  position: absolute;
+  bottom: 0;
+  left: 100px;
+}
+</style>
+Should see a green square centered and at the bottom of the blue square.
+<div><span></span></div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-align/content-distribution/place-content-shorthand-007.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-align/content-distribution/place-content-shorthand-007.html
new file mode 100644
index 0000000..be954c97
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-align/content-distribution/place-content-shorthand-007.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Box Alignment: place-content shorthand with fallback</title>
+<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
+<link rel="help" href="https://drafts.csswg.org/css-align/#propdef-place-content">
+<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1430622">
+<link rel="match" href="place-content-shorthand-007-ref.html">
+<style>
+div {
+  display: grid;
+  grid: 200px / 200px;
+  width: 400px;
+  height: 400px;
+  background: blue;
+  place-content: end space-evenly;
+}
+span {
+  background: green;
+}
+</style>
+Should see a green square centered and at the bottom of the blue square.
+<div><span></span></div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-display/display-contents-fieldset-nested-legend-ref.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-display/display-contents-fieldset-nested-legend-ref.html
new file mode 100644
index 0000000..6f547b3
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-display/display-contents-fieldset-nested-legend-ref.html
@@ -0,0 +1,6 @@
+<!doctype html>
+<meta charset="utf-8">
+<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
+<link rel="author" title="Mats Palmgren" href="mailto:mats@mozilla.com">
+<title>CSS Test Reference</title>
+<fieldset style="color: green">P<legend style="padding: 0">legend</legend>ASS</fieldset>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-display/display-contents-fieldset-nested-legend.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-display/display-contents-fieldset-nested-legend.html
new file mode 100644
index 0000000..a3bd2fc
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-display/display-contents-fieldset-nested-legend.html
@@ -0,0 +1,24 @@
+<!doctype html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<meta charset="utf-8">
+<link rel="match" href="display-contents-fieldset-nested-legend-ref.html">
+<link rel="help" href="https://drafts.csswg.org/css-display/#unbox">
+<link rel="help" href="https://drafts.csswg.org/css-display/#valdef-display-contents">
+<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1427292">
+<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
+<link rel="author" title="Mats Palmgren" href="mailto:mats@mozilla.com">
+<title>CSS Test: display: contents on legend</title>
+<style>
+fieldset {
+  color: red;
+}
+.contents {
+  display: contents;
+  color: green;
+  border: 10px solid red;
+}
+</style>
+<fieldset><legend class="contents">P<legend>legend</legend>ASS</legend></fieldset>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-multicol/multicol-gap-percentage-001.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-multicol/multicol-gap-percentage-001.html
new file mode 100644
index 0000000..b086eba2
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-multicol/multicol-gap-percentage-001.html
@@ -0,0 +1,131 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Multi-column Layout Test: column-gap supports percentages</title>
+<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
+<link rel="help" href="https://www.w3.org/TR/css-multicol-1/#column-gap">
+<meta name="assert" content="This test checks the behavior of precentage column-gap in different situations depending on the multicol container size.">
+<style>
+.multicol {
+  position: relative;
+  font: 20px/1 Ahem;
+  margin: 10px;
+  column-count: 2;
+  column-gap: 25%;
+  background: yellow;
+}
+
+.fixed200 {
+  width: 200px;
+}
+
+.inlineBlock {
+  display: inline-block;
+}
+
+.wrapper200 {
+  width: 200px;
+}
+
+.wrapper8 {
+  width: 8px;
+}
+
+.marginTopBottom {
+  margin: 10px 0;
+}
+
+.multicol > :nth-child(1) { background: magenta; }
+.multicol > :nth-child(2) { background: cyan; }
+</style>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/resources/check-layout-th.js"></script>
+
+<body onload="checkLayout('.multicol')">
+
+<div id="log"></div>
+
+<h3>Multicol container: fixed width</h3>
+
+<div class="multicol fixed200" data-expected-width="200" data-expected-height="20">
+  <div data-offset-x="0" data-offset-y="0" data-expected-width="75" data-expected-height="20">X</div>
+  <div data-offset-x="125" data-offset-y="0" data-expected-width="75" data-expected-height="20">X</div>
+</div>
+
+<div class="multicol fixed200"
+    data-expected-width="200" data-expected-height="40">
+  <div data-offset-x="0" data-offset-y="0" data-expected-width="75" data-expected-height="40">XX X X</div>
+  <div data-offset-x="125" data-offset-y="0" data-expected-width="75" data-expected-height="40">XX X X</div>
+</div>
+
+<div class="multicol fixed200"
+    data-expected-width="200" data-expected-height="20">
+  <div data-offset-x="0" data-offset-y="0" data-expected-width="75" data-expected-height="20">XXXXX</div>
+  <div data-offset-x="125" data-offset-y="0" data-expected-width="75" data-expected-height="20">XXXXX</div>
+</div>
+
+<h3>Multicol container: intrinsic width</h3>
+
+<div class="multicol inlineBlock"
+    data-expected-width="40" data-expected-height="20">
+  <div data-offset-x="0" data-offset-y="0" data-expected-width="15" data-expected-height="20">X</div>
+  <div data-offset-x="25" data-offset-y="0" data-expected-width="15" data-expected-height="20">X</div>
+</div>
+
+<div class="multicol inlineBlock"
+    data-expected-width="240" data-expected-height="40">
+  <div data-offset-x="0" data-offset-y="0" data-expected-width="90" data-expected-height="40">XX X X</div>
+  <div data-offset-x="150" data-offset-y="0" data-expected-width="90" data-expected-height="40">XX X X</div>
+</div>
+
+<div class="multicol inlineBlock"
+    data-expected-width="200" data-expected-height="20">
+  <div data-offset-x="0" data-offset-y="0" data-expected-width="75" data-expected-height="20">XXXXX</div>
+  <div data-offset-x="125" data-offset-y="0" data-expected-width="75" data-expected-height="20">XXXXX</div>
+</div>
+
+<h3>Multicol container: auto width</h3>
+
+<div class="wrapper200">
+
+  <div class="multicol marginTopBottom"
+      data-expected-width="200" data-expected-height="20">
+    <div data-offset-x="0" data-offset-y="0" data-expected-width="75" data-expected-height="20">X</div>
+    <div data-offset-x="125" data-offset-y="0" data-expected-width="75" data-expected-height="20">X</div>
+  </div>
+
+  <div class="multicol marginTopBottom"
+      data-expected-width="200" data-expected-height="40">
+    <div data-offset-x="0" data-offset-y="0" data-expected-width="75" data-expected-height="40">XX X X</div>
+    <div data-offset-x="125" data-offset-y="0" data-expected-width="75" data-expected-height="40">XX X X</div>
+  </div>
+
+  <div class="multicol marginTopBottom"
+      data-expected-width="200" data-expected-height="20">
+    <div data-offset-x="0" data-offset-y="0" data-expected-width="75" data-expected-height="20">XXXXX</div>
+    <div data-offset-x="125" data-offset-y="0" data-expected-width="75" data-expected-height="20">XXXXX</div>
+  </div>
+
+</div>
+
+<div class="wrapper8">
+
+  <div class="multicol marginTopBottom"
+      data-expected-width="8" data-expected-height="20">
+    <div data-offset-x="0" data-offset-y="0" data-expected-width="3" data-expected-height="20">X</div>
+    <div data-offset-x="5" data-offset-y="0" data-expected-width="3" data-expected-height="20">X</div>
+  </div>
+
+  <div class="multicol marginTopBottom"
+      data-expected-width="8" data-expected-height="60">
+    <div data-offset-x="0" data-offset-y="0" data-expected-width="3" data-expected-height="60">XX X X</div>
+    <div data-offset-x="5" data-offset-y="0" data-expected-width="3" data-expected-height="60">XX X X</div>
+  </div>
+
+  <div class="multicol marginTopBottom"
+      data-expected-width="8" data-expected-height="20">
+    <div data-offset-x="0" data-offset-y="0" data-expected-width="3" data-expected-height="20">XXXXX</div>
+    <div data-offset-x="5" data-offset-y="0" data-expected-width="3" data-expected-height="20">XXXXX</div>
+  </div>
+
+</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-scoping/slotted-invalidation-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/css/css-scoping/slotted-invalidation-expected.txt
new file mode 100644
index 0000000..e0bb3e9
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-scoping/slotted-invalidation-expected.txt
@@ -0,0 +1,4 @@
+This is a testharness.js-based test.
+FAIL CSS Test: Style invalidation for ::slotted() assert_equals: expected "rgb(0, 128, 0)" but got "rgb(255, 0, 0)"
+Harness: the test ran to completion.
+
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-scoping/slotted-invalidation.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-scoping/slotted-invalidation.html
new file mode 100644
index 0000000..f8471062
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-scoping/slotted-invalidation.html
@@ -0,0 +1,35 @@
+<!doctype html>
+<title>CSS Test: Style invalidation for ::slotted()</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<link rel="author" title="Rune Lillesveen" href="mailto:futhark@chromium.org">
+<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
+<link rel="help" href="https://drafts.csswg.org/css-scoping/#slotted-pseudo">
+<div id="host">
+  <div>
+    <span></span>
+    <span></span>
+  </div>
+  <div id="slotted">
+    <span></span>
+    <span></span>
+  </div>
+  <div>
+    <span></span>
+    <span></span>
+  </div>
+</div>
+<script>
+test(function() {
+  var root = host.attachShadow({"mode":"open"});
+  root.innerHTML = '<style>.outer ::slotted(#slotted) { background-color: red } .outer .inner::slotted(#slotted) { background-color: green }</style><div id="outer"><slot id="inner"></slot></div>';
+
+  assert_equals(window.getComputedStyle(slotted).backgroundColor, "rgba(0, 0, 0, 0)");
+
+  root.querySelector("#outer").className = "outer";
+  assert_equals(window.getComputedStyle(slotted).backgroundColor, "rgb(255, 0, 0)");
+
+  root.querySelector("#inner").className = "inner";
+  assert_equals(window.getComputedStyle(slotted).backgroundColor, "rgb(0, 128, 0)");
+})
+</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-ui/text-overflow-026-ref.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-ui/text-overflow-026-ref.html
new file mode 100644
index 0000000..f2db8c7
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-ui/text-overflow-026-ref.html
@@ -0,0 +1,62 @@
+<!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: text-overflow with leading white-space</title>
+  <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1403986">
+  <style type="text/css">
+html,body {
+  color:black; background-color:white; font:16px/1 monospace;
+}
+
+.ellipsize {
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  width: 100px;
+  border: 1px solid;
+}
+
+.inline-block {
+  display: inline-block;
+  background: red;
+}
+  </style>
+</head>
+<body>
+
+<pre>
+The test PASS if all of the following are true:
+1. there are no red areas
+2. the first two blocks display "PASS" but no ellipsis
+3. the last three blocks display an ellipsis
+</pre>
+
+<div class="ellipsize" style="text-overflow: clip">
+  <span style="margin-left:5px"></span><span class="inline-block" style="background:lime">
+    PASS PASS PASS PASS PASS</span>
+</div>
+
+<div class="ellipsize" style="text-overflow: clip">
+  <span style="margin-left:5px"></span>
+  <span class="inline-block" style="background:lime">
+    PASS PASS PASS PASS PASS</span>
+</div>
+
+<div class="ellipsize">
+  <span style="margin-left:10px"></span>&nbsp;&#x2026;
+</div>
+
+<div class="ellipsize">
+  &nbsp;&#x2026;
+</div>
+
+<div class="ellipsize">
+  a&#x2026;
+</div>
+
+</body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-ui/text-overflow-026.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-ui/text-overflow-026.html
new file mode 100644
index 0000000..2d1aa57
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-ui/text-overflow-026.html
@@ -0,0 +1,67 @@
+<!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: text-overflow with leading white-space</title>
+  <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1403986">
+  <link rel="help" href="https://www.w3.org/TR/css3-ui/#text-overflow" title="5.2. the 'text-overflow' property">
+  <link rel="match" href="text-overflow-026-ref.html">
+  <style type="text/css">
+html,body {
+  color:black; background-color:white; font:16px/1 monospace;
+}
+
+.ellipsize {
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  width: 100px;
+  border: 1px solid;
+}
+
+.inline-block {
+  display: inline-block;
+  background: red;
+}
+  </style>
+</head>
+<body>
+
+<pre>
+The test PASS if all of the following are true:
+1. there are no red areas
+2. the first two blocks display "PASS" but no ellipsis
+3. the last three blocks display an ellipsis
+</pre>
+
+<div class="ellipsize">
+  <span style="margin-left:5px"></span><span class="inline-block" style="background:lime">
+    PASS PASS PASS PASS PASS</span>
+</div>
+
+<div class="ellipsize">
+  <span style="margin-left:5px"></span>
+  <span class="inline-block" style="background:lime">
+    PASS PASS PASS PASS PASS</span>
+</div>
+
+<div class="ellipsize">
+  <span style="margin-left:10px"></span>&nbsp;<span class="inline-block">
+    FAIL FAIL FAIL FAIL FAIL FAIL FAIL FAIL </span>
+</div>
+
+<div class="ellipsize">
+  &nbsp;<span class="inline-block">
+    FAIL FAIL FAIL FAIL FAIL FAIL FAIL FAIL </span>
+</div>
+
+<div class="ellipsize">
+  a<span class="inline-block">
+    FAIL FAIL FAIL FAIL FAIL FAIL FAIL FAIL </span>
+</div>
+
+</body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-values/calc-ch-ex-lang-ref.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-values/calc-ch-ex-lang-ref.html
new file mode 100644
index 0000000..e0ac1ea
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-values/calc-ch-ex-lang-ref.html
@@ -0,0 +1,12 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CSS Test Reference</title>
+<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
+<style>
+div {
+  width: calc(1ex + 1ch + 1em);
+  height: calc(1ex + 1ch + 1em);
+  background: green;
+}
+</style>
+<div></div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-values/calc-ch-ex-lang.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-values/calc-ch-ex-lang.html
new file mode 100644
index 0000000..eb44747
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-values/calc-ch-ex-lang.html
@@ -0,0 +1,16 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CSS Test: Calc in font-size with ch / ex units across lang changes</title>
+<link rel="help" href="https://drafts.csswg.org/css-values/#ch">
+<link rel="help" href="https://drafts.csswg.org/css-values/#ex">
+<link rel="help" href="https://drafts.csswg.org/css-values/#funcdef-calc">
+<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1431031">
+<link rel="match" href="calc-ch-ex-lang-ref.html">
+<style>
+div[lang] {
+  font-size: calc(1ex + 1ch + 1em);
+}
+</style>
+<div lang="en">
+  <div style="width: 1em; height: 1em; background: green;"></div>
+</div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-values/calc-rem-lang-ref.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-values/calc-rem-lang-ref.html
new file mode 100644
index 0000000..a0f6add6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-values/calc-rem-lang-ref.html
@@ -0,0 +1,6 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CSS Test Reference</title>
+<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
+<p>You should see a green box twice-the-initial-font-size wide.</p>
+<div style="width: 2em; height: 2em; background: green;"></div>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-values/calc-rem-lang.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-values/calc-rem-lang.html
new file mode 100644
index 0000000..3994efc
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-values/calc-rem-lang.html
@@ -0,0 +1,17 @@
+<!doctype html>
+<html lang="en"><!-- The lang is important! -->
+<meta charset="utf-8">
+<title>CSS Test: Calc with rem and relative units on the root element</title>
+<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
+<link rel="help" href="https://drafts.csswg.org/css-values/#rem">
+<link rel="help" href="https://drafts.csswg.org/css-values/#funcdef-calc">
+<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1431031">
+<link rel="match" href="calc-rem-lang-ref.html">
+<style>
+  html {
+    font-size: calc(1rem + 1em);
+  }
+</style>
+<p style="font-size: initial">You should see a green box twice-the-initial-font-size wide.</p>
+<div style="width: 1em; height: 1em; background: green;"></div>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/custom-elements/Document-createElement.html b/third_party/WebKit/LayoutTests/external/wpt/custom-elements/Document-createElement.html
index e446c507..52a68e8 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/custom-elements/Document-createElement.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/custom-elements/Document-createElement.html
@@ -29,6 +29,21 @@
 
 }, 'document.createElement must create an instance of custom elements');
 
+test(function () {
+    class AutonomousCustomElement extends HTMLElement {};
+    class IsCustomElement extends HTMLElement {};
+
+    customElements.define('autonomous-custom-element', AutonomousCustomElement);
+    customElements.define('is-custom-element', IsCustomElement);
+
+    var instance = document.createElement('autonomous-custom-element', { is: "is-custom-element"});
+
+    assert_true(instance instanceof AutonomousCustomElement);
+    assert_equals(instance.localName, 'autonomous-custom-element');
+    assert_equals(instance.namespaceURI, 'http://www.w3.org/1999/xhtml', 'A custom element HTML must use HTML namespace');
+
+}, 'document.createElement must create an instance of autonomous custom elements when it has is attribute');
+
 function assert_reports(expected, testFunction, message) {
     var uncaughtError = null;
     window.onerror = function (message, url, lineNumber, columnNumber, error) { uncaughtError = error; return true; }
diff --git a/third_party/WebKit/LayoutTests/external/wpt/custom-elements/attribute-changed-callback.html b/third_party/WebKit/LayoutTests/external/wpt/custom-elements/attribute-changed-callback.html
index bd467912..5090bfb 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/custom-elements/attribute-changed-callback.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/custom-elements/attribute-changed-callback.html
@@ -11,6 +11,7 @@
 </head>
 <body>
 <div id="log"></div>
+<parser-created-element title></parser-created-element>
 <script>
 
 var customElement = define_new_custom_element(['title', 'id', 'r']);
@@ -218,6 +219,36 @@
     assert_attribute_log_entry(calls[0], {name: 'title', oldValue: null, newValue: 'hello', namespace: null});
 }, 'attributedChangedCallback must not be enqueued when mutating inline style declaration if the style attribute is not observed');
 
+test(function () {
+    var calls = [];
+    class CustomElement extends HTMLElement { }
+    CustomElement.prototype.attributeChangedCallback = function (...args) {
+        calls.push(create_attribute_changed_callback_log(this, ...args));
+    }
+    CustomElement.observedAttributes = ['title'];
+    customElements.define('parser-created-element', CustomElement);
+    assert_attribute_log_entry(calls[0], {name: 'title', oldValue: null, newValue: '', namespace: null});
+}, 'Upgrading a parser created element must enqueue and invoke attributeChangedCallback for an HTML attribute');
+
+test(function () {
+    var calls = [];
+    class CustomElement extends HTMLElement { }
+    CustomElement.prototype.attributeChangedCallback = function (...args) {
+        calls.push(create_attribute_changed_callback_log(this, ...args));
+    }
+    CustomElement.observedAttributes = ['title'];
+    customElements.define('cloned-element-with-attribute', CustomElement);
+
+    var instance = document.createElement('cloned-element-with-attribute');
+    assert_equals(calls.length, 0);
+    instance.title = '';
+    assert_attribute_log_entry(calls[0], {name: 'title', oldValue: null, newValue: '', namespace: null});
+
+    calls = [];
+    var clone = instance.cloneNode(false);
+    assert_attribute_log_entry(calls[0], {name: 'title', oldValue: null, newValue: '', namespace: null});
+}, 'Upgrading a cloned element must enqueue and invoke attributeChangedCallback for an HTML attribute');
+
 </script>
 </body>
 </html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/custom-elements/parser/parser-constructs-custom-elements-with-is.html b/third_party/WebKit/LayoutTests/external/wpt/custom-elements/parser/parser-constructs-custom-elements-with-is.html
new file mode 100644
index 0000000..96c0027
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/custom-elements/parser/parser-constructs-custom-elements-with-is.html
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Custom Elements: Changes to the HTML parser</title>
+<meta name="author" title="John Dai" href="mailto:jdai@mozilla.com">
+<meta name="assert" content="HTML parser creates a custom element which contains is attribute">
+<link rel="help" href="https://html.spec.whatwg.org/#create-an-element-for-the-token">
+<link rel="help" href="https://dom.spec.whatwg.org/#concept-create-element">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<autonomous-custom-element id="instance1" is="is-custom-element"></autonomous-custom-element>
+<script>
+
+class AutonomousCustomElement extends HTMLElement { };
+class IsCustomElement extends HTMLElement { };
+
+customElements.define('autonomous-custom-element', AutonomousCustomElement);
+customElements.define('is-custom-element', IsCustomElement);
+
+test(function () {
+    var customElement = document.getElementById('instance1');
+
+    assert_true(customElement instanceof HTMLElement, 'A resolved custom element must be an instance of HTMLElement');
+    assert_false(customElement instanceof HTMLUnknownElement, 'A resolved custom element must NOT be an instance of HTMLUnknownElement');
+    assert_true(customElement instanceof AutonomousCustomElement, 'A resolved custom element must be an instance of that custom element');
+    assert_equals(customElement.localName, 'autonomous-custom-element');
+    assert_equals(customElement.namespaceURI, 'http://www.w3.org/1999/xhtml', 'A custom element HTML must use HTML namespace');
+
+}, 'HTML parser must create a defined autonomous custom element when customElements.define comes after HTML parser creation');
+
+</script>
+<autonomous-custom-element id="instance2" is="is-custom-element"></autonomous-custom-element>
+<script>
+
+test(function () {
+    var customElement = document.getElementById('instance2');
+
+    assert_true(customElement instanceof HTMLElement, 'A resolved custom element must be an instance of HTMLElement');
+    assert_false(customElement instanceof HTMLUnknownElement, 'A resolved custom element must NOT be an instance of HTMLUnknownElement');
+    assert_true(customElement instanceof AutonomousCustomElement, 'A resolved custom element must be an instance of that custom element');
+    assert_equals(customElement.localName, 'autonomous-custom-element');
+    assert_equals(customElement.namespaceURI, 'http://www.w3.org/1999/xhtml', 'A custom element HTML must use HTML namespace');
+
+}, 'HTML parser must create a defined autonomous custom element when customElements.define comes before HTML parser creation');
+
+</script>
+</body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/custom-elements/parser/parser-sets-attributes-and-children.html b/third_party/WebKit/LayoutTests/external/wpt/custom-elements/parser/parser-sets-attributes-and-children.html
index ba33137..ef4689fa 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/custom-elements/parser/parser-sets-attributes-and-children.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/custom-elements/parser/parser-sets-attributes-and-children.html
@@ -8,6 +8,7 @@
 <link rel="help" href="https://dom.spec.whatwg.org/#concept-create-element">
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
+<script src="../resources/custom-elements-helpers.js"></script>
 </head>
 <body>
 <div id="log"></div>
@@ -15,6 +16,7 @@
 
 var numberOfAttributesInConstructor;
 var numberOfChildNodesInConstructor;
+var attributesChangedCalls = [];
 
 class MyCustomElement extends HTMLElement {
     constructor(...args) {
@@ -22,6 +24,14 @@
         numberOfAttributesInConstructor = this.attributes.length;
         numberOfChildNodesInConstructor = this.childNodes.length;
     }
+
+    attributeChangedCallback(...args) {
+        attributesChangedCalls.push(create_attribute_changed_callback_log(this, ...args));
+    }
+
+    static get observedAttributes() {
+        return ['id', 'class'];
+    }
 };
 customElements.define('my-custom-element', MyCustomElement);
 
@@ -54,6 +64,12 @@
     assert_equals(numberOfChildNodesInConstructor, 0, 'HTML parser must not append child nodes to a custom element before invoking the constructor');
 }, 'HTML parser must set the attributes or append children before calling constructor');
 
+test(function () {
+    assert_equals(attributesChangedCalls.length, 2);
+    assert_attribute_log_entry(attributesChangedCalls[0], {name: 'id', oldValue: null, newValue: 'custom-element-id', namespace: null});
+    assert_attribute_log_entry(attributesChangedCalls[1], {name: 'class', oldValue: null, newValue: 'class1 class2', namespace: null});
+}, 'HTML parser must enqueue attributeChanged reactions');
+
 </script>
 </body>
 </html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/custom-elements/upgrading/Node-cloneNode.html b/third_party/WebKit/LayoutTests/external/wpt/custom-elements/upgrading/Node-cloneNode.html
index 0d158fd5..0492e1f3 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/custom-elements/upgrading/Node-cloneNode.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/custom-elements/upgrading/Node-cloneNode.html
@@ -30,6 +30,25 @@
         'A cloned custom element must be an instance of the custom element');
 }, 'Node.prototype.cloneNode(false) must be able to clone a custom element');
 
+test(function () {
+    class AutonomousCustomElement extends HTMLElement {};
+    class IsCustomElement extends HTMLElement {};
+
+    customElements.define('autonomous-custom-element', AutonomousCustomElement);
+    customElements.define('is-custom-element', IsCustomElement);
+
+    var instance = document.createElement('autonomous-custom-element', { is: "is-custom-element"});
+    assert_true(instance instanceof HTMLElement);
+    assert_true(instance instanceof AutonomousCustomElement);
+
+    var clone = instance.cloneNode(false);
+    assert_not_equals(instance, clone);
+    assert_true(clone instanceof HTMLElement,
+        'A cloned custom element must be an instance of HTMLElement');
+    assert_true(clone instanceof AutonomousCustomElement,
+        'A cloned custom element must be an instance of the custom element');
+}, 'Node.prototype.cloneNode(false) must be able to clone as a autonomous custom element when it contains is attribute');
+
 test_with_window(function (contentWindow) {
     var contentDocument = contentWindow.document;
     class MyCustomElement extends contentWindow.HTMLElement {}
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fetch/api/response/response-init-002.html b/third_party/WebKit/LayoutTests/external/wpt/fetch/api/response/response-init-002.html
index 0bb2e8d..a48af83 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/fetch/api/response/response-init-002.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/fetch/api/response/response-init-002.html
@@ -65,6 +65,11 @@
         });
       }, "Testing empty Response Content-Type header");
 
+      test(function() {
+        var response = new Response(null, {status: 204});
+        assert_equals(response.body, null);
+      }, "Testing null Response body");
+
     </script>
   </body>
 </html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/browsers/browsing-the-web/scroll-to-fragid/scroll-to-anchor-name.html b/third_party/WebKit/LayoutTests/external/wpt/html/browsers/browsing-the-web/scroll-to-fragid/scroll-to-anchor-name.html
index 43dbaf9e..060aed1 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/html/browsers/browsing-the-web/scroll-to-fragid/scroll-to-anchor-name.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/html/browsers/browsing-the-web/scroll-to-fragid/scroll-to-anchor-name.html
@@ -8,6 +8,7 @@
 <a name="anchor1" style="position:absolute; top:200px;"></a>
 <div id="id-equals-anchor" style="position:absolute; top:300px;"></div>
 <a name="id-equals-anchor" style="position:absolute; top:400px;"></a>
+<a name="§1" style="position:absolute; top:400px;"></a>
 <div style="height:200em;"></div>
 <script>
 var steps = [{
@@ -21,6 +22,11 @@
         // id still takes precedence over anchor name
         assert_equals( scrollPosition(), 300 );
       }
+    },{
+      fragid:'§1',
+      handler: function(){
+        assert_equals( scrollPosition(), 400 );
+      }
     }];
 
 function scrollPosition(){
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/embedded-content/media-elements/mime-types/canPlayType-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/embedded-content/media-elements/mime-types/canPlayType-expected.txt
index 5096c82b..5747a93 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/embedded-content/media-elements/mime-types/canPlayType-expected.txt
+++ b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/embedded-content/media-elements/mime-types/canPlayType-expected.txt
@@ -1,8 +1,8 @@
 This is a testharness.js-based test.
 Found 59 tests; 46 PASS, 13 FAIL, 0 TIMEOUT, 0 NOTRUN.
 PASS utility code
-PASS application/octet-stream
-PASS video/x-new-fictional-format
+PASS application/octet-stream not supported
+PASS fictional formats and codecs not supported
 FAIL audio/mp4 (optional) assert_equals: audio/mp4 expected "maybe" but got ""
 FAIL audio/mp4; codecs="mp4a.40.2" (optional) assert_equals: audio/mp4; codecs="mp4a.40.2" expected "probably" but got ""
 PASS audio/mp4 with bogus codec
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/embedded-content/media-elements/mime-types/canPlayType.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/embedded-content/media-elements/mime-types/canPlayType.html
index 4f94cdd..56edf25 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/embedded-content/media-elements/mime-types/canPlayType.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/embedded-content/media-elements/mime-types/canPlayType.html
@@ -2,8 +2,13 @@
 <title>canPlayType</title>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
+<audio id="audio"></audio>
+<video id="video"></video>
 <div id="log"></div>
 <script>
+let VIDEO_ELEM = document.getElementById('video');
+let AUDIO_ELEM = document.getElementById('audio');
+
 function t(type, expected) {
   assert_equals(canPlayType(type), expected, type);
 }
@@ -22,12 +27,13 @@
 }, 'utility code');
 
 function canPlayType(type) {
-  var canPlay = document.createElement('audio').canPlayType(type);
-  assert_equals(canPlay, document.createElement('video').canPlayType(type),
+  let audioCanPlay = AUDIO_ELEM.canPlayType(type);
+  let videoCanPlay = VIDEO_ELEM.canPlayType(type);
+  assert_equals(audioCanPlay, videoCanPlay,
                 'audio.canPlayType() and video.canPlayType() agree');
-  assert_in_array(canPlay, ['', 'maybe', 'probably'],
+  assert_in_array(audioCanPlay, ['', 'maybe', 'probably'],
                   'return value is one of "", "maybe" and "probably"');
-  return canPlay;
+  return audioCanPlay;
 }
 
 test(function() {
@@ -37,20 +43,22 @@
   t('application/octet-stream; codecs="mp4a.40.2"', '');
   t('application/octet-stream; codecs="theora, vorbis"', '');
   t('application/octet-stream; codecs="avc1.42E01E, mp4a.40.2"', '');
-}, 'application/octet-stream');
+}, 'application/octet-stream not supported');
 
 test(function() {
+  t('application/marks-fantasmagorical-format', '');
   t('video/x-new-fictional-format', '');
   t('video/x-new-fictional-format;codecs="kittens,bunnies"', '');
-}, 'video/x-new-fictional-format');
+}, 'fictional formats and codecs not supported');
 
 function type_codecs_test(type, audioCodecs, videoCodecs) {
   var typeSupported = false;
   var codecSupported = false;
 
+  // Test 'type' without codecs.
+  // Spec: Generally, a user agent should never return "probably" for a type
+  // that allows the codecs parameter if that parameter is not present.
   test(function() {
-    // Spec: Generally, a user agent should never return "probably" for a type
-    // that allows the codecs parameter if that parameter is not present.
     t(type, 'maybe');
     t(type + ';', 'maybe');
     t(type + ';codecs', 'maybe');
@@ -66,9 +74,11 @@
     }, typeWithCodec + ' (optional)');
   }
 
+  // Test each audio and video codec separately.
   audioCodecs.forEach(test_codec);
   videoCodecs.forEach(test_codec);
 
+  // Test different pairings and orderings of audio+video codecs.
   if (audioCodecs.length > 0 && videoCodecs.length > 0) {
     test(function() {
       audioCodecs.forEach(function(ac) {
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/inline-async-execorder.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/inline-async-execorder.html
new file mode 100644
index 0000000..db03612
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/inline-async-execorder.html
@@ -0,0 +1,29 @@
+<html>
+  <head>
+    <title>Inline async module script execution order</title>
+    <meta name=timeout content=long>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+  </head>
+  <body>
+    <script>
+      let loaded = [];
+      let test = async_test("Inline async module script execution order");
+      window.addEventListener("load", test.step_func(function() {
+        assert_array_equals(loaded,
+                            ["fast", "fast", "fast", "slow", "slow", "slow"]);
+      test.done();
+      }));
+    </script>
+    <script type="module" async src="resources/slow-module.js?pipe=trickle(d2)&unique=1"></script>
+    <script type="module" async>
+      import "./resources/slow-module.js?pipe=trickle(d2)&unique=2";
+      loaded.push("slow");
+    </script>
+    <script type="module" async src="resources/fast-module.js?unique=1"></script>
+    <script type="module" async>
+      import "./resources/fast-module.js?unique=2";
+      loaded.push("fast");
+    </script>
+  </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/resources/fast-module.js b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/resources/fast-module.js
new file mode 100644
index 0000000..3a76cf7
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/resources/fast-module.js
@@ -0,0 +1 @@
+loaded.push("fast");
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/resources/slow-module.js b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/resources/slow-module.js
new file mode 100644
index 0000000..4623ef7
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/resources/slow-module.js
@@ -0,0 +1,3 @@
+// This module is imported with pipe=trickle(d2) to make it load more slowly
+// than fast-module.js
+loaded.push("slow");
diff --git a/third_party/WebKit/LayoutTests/external/wpt/http/resources/securedimage.py b/third_party/WebKit/LayoutTests/external/wpt/http/resources/securedimage.py
index 89cbd72..510ddca 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/http/resources/securedimage.py
+++ b/third_party/WebKit/LayoutTests/external/wpt/http/resources/securedimage.py
@@ -6,10 +6,12 @@
     if "authorization" not in request.headers:
         response.status = 401
         response.headers.set("WWW-Authenticate", "Basic")
+        return
     else:
         auth = request.headers.get("Authorization")
         if auth != "Basic dGVzdHVzZXI6dGVzdHBhc3M=":
             response.set_error(403, "Invalid username or password - " + auth)
+            return
 
     response.status = 301
     response.headers.set("Location", image_url)
diff --git a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/about-blank-replacement.https-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/about-blank-replacement.https-expected.txt
index 27d781c..5913659b 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/about-blank-replacement.https-expected.txt
+++ b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/about-blank-replacement.https-expected.txt
@@ -3,5 +3,8 @@
 FAIL Initial about:blank modified by parent is controlled, exposed to clients.matchAll(), and matches final Client. assert_false: result: failure: could not find about:blank client expected false got true
 FAIL Popup initial about:blank is controlled, exposed to clients.matchAll(), and matches final Client. assert_false: result: failure: could not find about:blank client expected false got true
 PASS Initial about:blank is controlled, exposed to clients.matchAll(), and final Client is not controlled by a service worker.
+FAIL Simple about:blank is controlled and is exposed to clients.matchAll(). promise_test: Unhandled rejection with value: object "TypeError: Cannot read property 'scriptURL' of null"
+FAIL Nested about:srcdoc is controlled and is exposed to clients.matchAll(). promise_test: Unhandled rejection with value: object "TypeError: Cannot read property 'scriptURL' of null"
+FAIL Dynamic about:blank is controlled and is exposed to clients.matchAll(). promise_test: Unhandled rejection with value: object "TypeError: Cannot read property 'scriptURL' of null"
 Harness: the test ran to completion.
 
diff --git a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/about-blank-replacement.https.html b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/about-blank-replacement.https.html
index 3acfe1b..e1fefaf 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/about-blank-replacement.https.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/about-blank-replacement.https.html
@@ -58,7 +58,7 @@
   });
 }
 
-async function doAsyncTest(t, scope, extraSearchParams) {
+async function doAsyncTest(t, scope) {
   let reg = await service_worker_unregister_and_register(t, worker, scope);
   await wait_for_state(t, reg.installing, 'activated');
 
@@ -70,20 +70,30 @@
   let initialResult = frame.contentWindow.nested().document.body.textContent;
   assert_false(initialResult.startsWith('failure:'), `result: ${initialResult}`);
 
+  assert_equals(frame.contentWindow.navigator.serviceWorker.controller.scriptURL,
+                frame.contentWindow.nested().navigator.serviceWorker.controller.scriptURL,
+                'nested about:blank should have same controlling service worker');
+
   // Next, ask the service worker to find the final client ID for the fully
   // loaded nested frame.
-  let nestedURL = new URL(scope, window.location);
-  nestedURL.searchParams.set('nested', true);
-  extraSearchParams = extraSearchParams || {};
-  for (let p in extraSearchParams) {
-    nestedURL.searchParams.set(p, extraSearchParams[p]);
-  }
+  let nestedURL = new URL(frame.contentWindow.nested().location);
   let finalResult = await getClientIdByURL(reg.active, nestedURL);
   assert_false(finalResult.startsWith('failure:'), `result: ${finalResult}`);
 
-  // The initial about:blank client and the final loaded client should have
-  // the same ID value.
-  assert_equals(initialResult, finalResult, 'client ID values should match');
+  // If the nested frame doesn't have a URL to load, then there is no fetch
+  // event and the body should be empty.  We can't verify the final client ID
+  // against anything.
+  if (nestedURL.href === 'about:blank' ||
+      nestedURL.href === 'about:srcdoc') {
+    assert_equals('', initialResult, 'about:blank text content should be blank');
+  }
+
+  // If the nested URL is not about:blank, though, then the fetch event handler
+  // should have populated the body with the client id of the initial about:blank.
+  // Verify the final client id matches.
+  else {
+    assert_equals(initialResult, finalResult, 'client ID values should match');
+  }
 
   frame.remove();
   await service_worker_unregister_and_done(t, scope);
@@ -101,8 +111,7 @@
   // worker can ping the client to verify its existence.  This ping-pong
   // check is performed during the initial load and when verifying the
   // final loaded client.
-  await doAsyncTest(t, 'resources/about-blank-replacement-ping-frame.py',
-                    { 'ping': true });
+  await doAsyncTest(t, 'resources/about-blank-replacement-ping-frame.py');
 }, 'Initial about:blank modified by parent is controlled, exposed to ' +
    'clients.matchAll(), and matches final Client.');
 
@@ -142,5 +151,27 @@
 }, 'Initial about:blank is controlled, exposed to clients.matchAll(), and ' +
    'final Client is not controlled by a service worker.');
 
+promise_test(async function(t) {
+  // Execute a test where the nested frame is an iframe without a src
+  // attribute.  This simple nested about:blank should still inherit the
+  // controller and be visible to clients.matchAll().
+  await doAsyncTest(t, 'resources/about-blank-replacement-blank-nested-frame.html');
+}, 'Simple about:blank is controlled and is exposed to clients.matchAll().');
+
+promise_test(async function(t) {
+  // Execute a test where the nested frame is an iframe using a non-empty
+  // srcdoc containing only a tag pair so its textContent is still empty.
+  // This nested iframe should still inherit the controller and be visible
+  // to clients.matchAll().
+  await doAsyncTest(t, 'resources/about-blank-replacement-srcdoc-nested-frame.html');
+}, 'Nested about:srcdoc is controlled and is exposed to clients.matchAll().');
+
+promise_test(async function(t) {
+  // Execute a test where the nested frame is dynamically added without a src
+  // attribute.  This simple nested about:blank should still inherit the
+  // controller and be visible to clients.matchAll().
+  await doAsyncTest(t, 'resources/about-blank-replacement-blank-dynamic-nested-frame.html');
+}, 'Dynamic about:blank is controlled and is exposed to clients.matchAll().');
+
 </script>
 </body>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/fetch-response-taint.https-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/fetch-response-taint.https-expected.txt
new file mode 100644
index 0000000..4aeacfa5
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/fetch-response-taint.https-expected.txt
@@ -0,0 +1,135 @@
+This is a testharness.js-based test.
+PASS initialize global state
+PASS fetching url:"https://web-platform.test:8444/service-workers/service-worker/resources/fetch-access-control.py?" mode:"same-origin" credentials:"omit" should succeed.
+PASS fetching url:"https://web-platform.test:8444/service-workers/service-worker/resources/fetch-access-control.py?" mode:"same-origin" credentials:"same-origin" should succeed.
+PASS fetching url:"https://web-platform.test:8444/service-workers/service-worker/resources/fetch-access-control.py?" mode:"same-origin" credentials:"include" should succeed.
+PASS fetching url:"https://web-platform.test:8444/service-workers/service-worker/resources/fetch-access-control.py?" mode:"no-cors" credentials:"omit" should succeed.
+PASS fetching url:"https://web-platform.test:8444/service-workers/service-worker/resources/fetch-access-control.py?" mode:"no-cors" credentials:"same-origin" should succeed.
+PASS fetching url:"https://web-platform.test:8444/service-workers/service-worker/resources/fetch-access-control.py?" mode:"no-cors" credentials:"include" should succeed.
+PASS fetching url:"https://web-platform.test:8444/service-workers/service-worker/resources/fetch-access-control.py?" mode:"cors" credentials:"omit" should succeed.
+PASS fetching url:"https://web-platform.test:8444/service-workers/service-worker/resources/fetch-access-control.py?" mode:"cors" credentials:"same-origin" should succeed.
+PASS fetching url:"https://web-platform.test:8444/service-workers/service-worker/resources/fetch-access-control.py?" mode:"cors" credentials:"include" should succeed.
+PASS url:"https://www1.web-platform.test:8444/service-workers/service-worker/resources/fetch-access-control.py?" mode:"same-origin" credentials:"omit" should fail.
+PASS url:"https://www1.web-platform.test:8444/service-workers/service-worker/resources/fetch-access-control.py?" mode:"same-origin" credentials:"same-origin" should fail.
+PASS url:"https://www1.web-platform.test:8444/service-workers/service-worker/resources/fetch-access-control.py?" mode:"same-origin" credentials:"include" should fail.
+PASS fetching url:"https://www1.web-platform.test:8444/service-workers/service-worker/resources/fetch-access-control.py?" mode:"no-cors" credentials:"omit" should succeed.
+PASS fetching url:"https://www1.web-platform.test:8444/service-workers/service-worker/resources/fetch-access-control.py?" mode:"no-cors" credentials:"same-origin" should succeed.
+PASS fetching url:"https://www1.web-platform.test:8444/service-workers/service-worker/resources/fetch-access-control.py?" mode:"no-cors" credentials:"include" should succeed.
+PASS url:"https://www1.web-platform.test:8444/service-workers/service-worker/resources/fetch-access-control.py?" mode:"cors" credentials:"omit" should fail.
+PASS url:"https://www1.web-platform.test:8444/service-workers/service-worker/resources/fetch-access-control.py?" mode:"cors" credentials:"same-origin" should fail.
+PASS url:"https://www1.web-platform.test:8444/service-workers/service-worker/resources/fetch-access-control.py?" mode:"cors" credentials:"include" should fail.
+PASS fetching url:"https://www1.web-platform.test:8444/service-workers/service-worker/resources/fetch-access-control.py?ACAOrigin=*" mode:"cors" credentials:"omit" should succeed.
+PASS fetching url:"https://www1.web-platform.test:8444/service-workers/service-worker/resources/fetch-access-control.py?ACAOrigin=*" mode:"cors" credentials:"same-origin" should succeed.
+PASS url:"https://www1.web-platform.test:8444/service-workers/service-worker/resources/fetch-access-control.py?ACAOrigin=*" mode:"cors" credentials:"include" should fail.
+PASS fetching url:"https://www1.web-platform.test:8444/service-workers/service-worker/resources/fetch-access-control.py?ACAOrigin=https://web-platform.test:8444&ACACredentials=true" mode:"cors" credentials:"include" should succeed.
+PASS fetching url:"https://web-platform.test:8444/?url=https%3A%2F%2Fweb-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"same-origin" credentials:"omit" should succeed.
+PASS fetching url:"https://web-platform.test:8444/?url=https%3A%2F%2Fweb-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"same-origin" credentials:"same-origin" should succeed.
+PASS fetching url:"https://web-platform.test:8444/?url=https%3A%2F%2Fweb-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"same-origin" credentials:"include" should succeed.
+PASS fetching url:"https://web-platform.test:8444/?url=https%3A%2F%2Fweb-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"no-cors" credentials:"omit" should succeed.
+PASS fetching url:"https://web-platform.test:8444/?url=https%3A%2F%2Fweb-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"no-cors" credentials:"same-origin" should succeed.
+PASS fetching url:"https://web-platform.test:8444/?url=https%3A%2F%2Fweb-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"no-cors" credentials:"include" should succeed.
+PASS fetching url:"https://web-platform.test:8444/?url=https%3A%2F%2Fweb-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"cors" credentials:"omit" should succeed.
+PASS fetching url:"https://web-platform.test:8444/?url=https%3A%2F%2Fweb-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"cors" credentials:"same-origin" should succeed.
+PASS fetching url:"https://web-platform.test:8444/?url=https%3A%2F%2Fweb-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"cors" credentials:"include" should succeed.
+PASS url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fweb-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"same-origin" credentials:"omit" should fail.
+PASS url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fweb-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"same-origin" credentials:"same-origin" should fail.
+PASS url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fweb-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"same-origin" credentials:"include" should fail.
+PASS fetching url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fweb-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"no-cors" credentials:"omit" should succeed.
+PASS fetching url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fweb-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"no-cors" credentials:"same-origin" should succeed.
+PASS fetching url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fweb-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"no-cors" credentials:"include" should succeed.
+PASS fetching url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fweb-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"cors" credentials:"omit" should succeed.
+PASS fetching url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fweb-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"cors" credentials:"same-origin" should succeed.
+PASS fetching url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fweb-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"cors" credentials:"include" should succeed.
+PASS fetching url:"https://web-platform.test:8444/?url=https%3A%2F%2Fweb-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=same-origin&" mode:"same-origin" credentials:"omit" should succeed.
+PASS fetching url:"https://web-platform.test:8444/?url=https%3A%2F%2Fweb-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=same-origin&" mode:"same-origin" credentials:"same-origin" should succeed.
+PASS fetching url:"https://web-platform.test:8444/?url=https%3A%2F%2Fweb-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=same-origin&" mode:"same-origin" credentials:"include" should succeed.
+PASS fetching url:"https://web-platform.test:8444/?url=https%3A%2F%2Fweb-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=same-origin&" mode:"no-cors" credentials:"omit" should succeed.
+PASS fetching url:"https://web-platform.test:8444/?url=https%3A%2F%2Fweb-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=same-origin&" mode:"no-cors" credentials:"same-origin" should succeed.
+PASS fetching url:"https://web-platform.test:8444/?url=https%3A%2F%2Fweb-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=same-origin&" mode:"no-cors" credentials:"include" should succeed.
+PASS fetching url:"https://web-platform.test:8444/?url=https%3A%2F%2Fweb-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=same-origin&" mode:"cors" credentials:"omit" should succeed.
+PASS fetching url:"https://web-platform.test:8444/?url=https%3A%2F%2Fweb-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=same-origin&" mode:"cors" credentials:"same-origin" should succeed.
+PASS fetching url:"https://web-platform.test:8444/?url=https%3A%2F%2Fweb-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=same-origin&" mode:"cors" credentials:"include" should succeed.
+PASS url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fweb-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=same-origin&" mode:"same-origin" credentials:"omit" should fail.
+PASS url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fweb-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=same-origin&" mode:"same-origin" credentials:"same-origin" should fail.
+PASS url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fweb-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=same-origin&" mode:"same-origin" credentials:"include" should fail.
+PASS fetching url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fweb-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=same-origin&" mode:"no-cors" credentials:"omit" should succeed.
+PASS fetching url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fweb-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=same-origin&" mode:"no-cors" credentials:"same-origin" should succeed.
+PASS fetching url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fweb-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=same-origin&" mode:"no-cors" credentials:"include" should succeed.
+PASS fetching url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fweb-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=same-origin&" mode:"cors" credentials:"omit" should succeed.
+PASS fetching url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fweb-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=same-origin&" mode:"cors" credentials:"same-origin" should succeed.
+PASS fetching url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fweb-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=same-origin&" mode:"cors" credentials:"include" should succeed.
+PASS url:"https://web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"same-origin" credentials:"omit" should fail.
+PASS url:"https://web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"same-origin" credentials:"same-origin" should fail.
+PASS url:"https://web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"same-origin" credentials:"include" should fail.
+PASS url:"https://web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"no-cors" credentials:"omit" should fail.
+PASS url:"https://web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"no-cors" credentials:"same-origin" should fail.
+PASS url:"https://web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"no-cors" credentials:"include" should fail.
+PASS url:"https://web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"cors" credentials:"omit" should fail.
+PASS url:"https://web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"cors" credentials:"same-origin" should fail.
+PASS url:"https://web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"cors" credentials:"include" should fail.
+PASS url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"same-origin" credentials:"omit" should fail.
+PASS url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"same-origin" credentials:"same-origin" should fail.
+PASS url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"same-origin" credentials:"include" should fail.
+PASS url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"no-cors" credentials:"omit" should fail.
+PASS url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"no-cors" credentials:"same-origin" should fail.
+PASS url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"no-cors" credentials:"include" should fail.
+PASS url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"cors" credentials:"omit" should fail.
+PASS url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"cors" credentials:"same-origin" should fail.
+PASS url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=same-origin&credentials=omit&" mode:"cors" credentials:"include" should fail.
+PASS url:"https://web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=no-cors&credentials=omit&" mode:"same-origin" credentials:"omit" should fail.
+PASS url:"https://web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=no-cors&credentials=omit&" mode:"same-origin" credentials:"same-origin" should fail.
+PASS url:"https://web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=no-cors&credentials=omit&" mode:"same-origin" credentials:"include" should fail.
+PASS fetching url:"https://web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=no-cors&credentials=omit&" mode:"no-cors" credentials:"omit" should succeed.
+PASS fetching url:"https://web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=no-cors&credentials=omit&" mode:"no-cors" credentials:"same-origin" should succeed.
+PASS fetching url:"https://web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=no-cors&credentials=omit&" mode:"no-cors" credentials:"include" should succeed.
+PASS url:"https://web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=no-cors&credentials=omit&" mode:"cors" credentials:"omit" should fail.
+PASS url:"https://web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=no-cors&credentials=omit&" mode:"cors" credentials:"same-origin" should fail.
+PASS url:"https://web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=no-cors&credentials=omit&" mode:"cors" credentials:"include" should fail.
+PASS url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=no-cors&credentials=omit&" mode:"same-origin" credentials:"omit" should fail.
+PASS url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=no-cors&credentials=omit&" mode:"same-origin" credentials:"same-origin" should fail.
+PASS url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=no-cors&credentials=omit&" mode:"same-origin" credentials:"include" should fail.
+PASS fetching url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=no-cors&credentials=omit&" mode:"no-cors" credentials:"omit" should succeed.
+PASS fetching url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=no-cors&credentials=omit&" mode:"no-cors" credentials:"same-origin" should succeed.
+PASS fetching url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=no-cors&credentials=omit&" mode:"no-cors" credentials:"include" should succeed.
+PASS url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=no-cors&credentials=omit&" mode:"cors" credentials:"omit" should fail.
+PASS url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=no-cors&credentials=omit&" mode:"cors" credentials:"same-origin" should fail.
+PASS url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3F&mode=no-cors&credentials=omit&" mode:"cors" credentials:"include" should fail.
+FAIL url:"https://web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3D*&mode=cors&credentials=omit&" mode:"same-origin" credentials:"omit" should fail. assert_unreached: Should have rejected: undefined Reached unreachable code
+FAIL url:"https://web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3D*&mode=cors&credentials=omit&" mode:"same-origin" credentials:"same-origin" should fail. assert_unreached: Should have rejected: undefined Reached unreachable code
+FAIL url:"https://web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3D*&mode=cors&credentials=omit&" mode:"same-origin" credentials:"include" should fail. assert_unreached: Should have rejected: undefined Reached unreachable code
+PASS fetching url:"https://web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3D*&mode=cors&credentials=omit&" mode:"no-cors" credentials:"omit" should succeed.
+PASS fetching url:"https://web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3D*&mode=cors&credentials=omit&" mode:"no-cors" credentials:"same-origin" should succeed.
+PASS fetching url:"https://web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3D*&mode=cors&credentials=omit&" mode:"no-cors" credentials:"include" should succeed.
+PASS fetching url:"https://web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3D*&mode=cors&credentials=omit&" mode:"cors" credentials:"omit" should succeed.
+PASS fetching url:"https://web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3D*&mode=cors&credentials=omit&" mode:"cors" credentials:"same-origin" should succeed.
+PASS fetching url:"https://web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3D*&mode=cors&credentials=omit&" mode:"cors" credentials:"include" should succeed.
+PASS url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3D*&mode=cors&credentials=omit&" mode:"same-origin" credentials:"omit" should fail.
+PASS url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3D*&mode=cors&credentials=omit&" mode:"same-origin" credentials:"same-origin" should fail.
+PASS url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3D*&mode=cors&credentials=omit&" mode:"same-origin" credentials:"include" should fail.
+PASS fetching url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3D*&mode=cors&credentials=omit&" mode:"no-cors" credentials:"omit" should succeed.
+PASS fetching url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3D*&mode=cors&credentials=omit&" mode:"no-cors" credentials:"same-origin" should succeed.
+PASS fetching url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3D*&mode=cors&credentials=omit&" mode:"no-cors" credentials:"include" should succeed.
+PASS fetching url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3D*&mode=cors&credentials=omit&" mode:"cors" credentials:"omit" should succeed.
+PASS fetching url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3D*&mode=cors&credentials=omit&" mode:"cors" credentials:"same-origin" should succeed.
+PASS fetching url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3D*&mode=cors&credentials=omit&" mode:"cors" credentials:"include" should succeed.
+FAIL url:"https://web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3Dhttps%3A%2F%2Fweb-platform.test%3A8444%26ACACredentials%3Dtrue&mode=cors&credentials=include&" mode:"same-origin" credentials:"omit" should fail. assert_unreached: Should have rejected: undefined Reached unreachable code
+FAIL url:"https://web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3Dhttps%3A%2F%2Fweb-platform.test%3A8444%26ACACredentials%3Dtrue&mode=cors&credentials=include&" mode:"same-origin" credentials:"same-origin" should fail. assert_unreached: Should have rejected: undefined Reached unreachable code
+FAIL url:"https://web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3Dhttps%3A%2F%2Fweb-platform.test%3A8444%26ACACredentials%3Dtrue&mode=cors&credentials=include&" mode:"same-origin" credentials:"include" should fail. assert_unreached: Should have rejected: undefined Reached unreachable code
+PASS fetching url:"https://web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3Dhttps%3A%2F%2Fweb-platform.test%3A8444%26ACACredentials%3Dtrue&mode=cors&credentials=include&" mode:"no-cors" credentials:"omit" should succeed.
+PASS fetching url:"https://web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3Dhttps%3A%2F%2Fweb-platform.test%3A8444%26ACACredentials%3Dtrue&mode=cors&credentials=include&" mode:"no-cors" credentials:"same-origin" should succeed.
+PASS fetching url:"https://web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3Dhttps%3A%2F%2Fweb-platform.test%3A8444%26ACACredentials%3Dtrue&mode=cors&credentials=include&" mode:"no-cors" credentials:"include" should succeed.
+PASS fetching url:"https://web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3Dhttps%3A%2F%2Fweb-platform.test%3A8444%26ACACredentials%3Dtrue&mode=cors&credentials=include&" mode:"cors" credentials:"omit" should succeed.
+PASS fetching url:"https://web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3Dhttps%3A%2F%2Fweb-platform.test%3A8444%26ACACredentials%3Dtrue&mode=cors&credentials=include&" mode:"cors" credentials:"same-origin" should succeed.
+PASS fetching url:"https://web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3Dhttps%3A%2F%2Fweb-platform.test%3A8444%26ACACredentials%3Dtrue&mode=cors&credentials=include&" mode:"cors" credentials:"include" should succeed.
+PASS url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3Dhttps%3A%2F%2Fweb-platform.test%3A8444%26ACACredentials%3Dtrue&mode=cors&credentials=include&" mode:"same-origin" credentials:"omit" should fail.
+PASS url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3Dhttps%3A%2F%2Fweb-platform.test%3A8444%26ACACredentials%3Dtrue&mode=cors&credentials=include&" mode:"same-origin" credentials:"same-origin" should fail.
+PASS url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3Dhttps%3A%2F%2Fweb-platform.test%3A8444%26ACACredentials%3Dtrue&mode=cors&credentials=include&" mode:"same-origin" credentials:"include" should fail.
+PASS fetching url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3Dhttps%3A%2F%2Fweb-platform.test%3A8444%26ACACredentials%3Dtrue&mode=cors&credentials=include&" mode:"no-cors" credentials:"omit" should succeed.
+PASS fetching url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3Dhttps%3A%2F%2Fweb-platform.test%3A8444%26ACACredentials%3Dtrue&mode=cors&credentials=include&" mode:"no-cors" credentials:"same-origin" should succeed.
+PASS fetching url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3Dhttps%3A%2F%2Fweb-platform.test%3A8444%26ACACredentials%3Dtrue&mode=cors&credentials=include&" mode:"no-cors" credentials:"include" should succeed.
+PASS fetching url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3Dhttps%3A%2F%2Fweb-platform.test%3A8444%26ACACredentials%3Dtrue&mode=cors&credentials=include&" mode:"cors" credentials:"omit" should succeed.
+PASS fetching url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3Dhttps%3A%2F%2Fweb-platform.test%3A8444%26ACACredentials%3Dtrue&mode=cors&credentials=include&" mode:"cors" credentials:"same-origin" should succeed.
+PASS fetching url:"https://www1.web-platform.test:8444/?url=https%3A%2F%2Fwww1.web-platform.test%3A8444%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3Dhttps%3A%2F%2Fweb-platform.test%3A8444%26ACACredentials%3Dtrue&mode=cors&credentials=include&" mode:"cors" credentials:"include" should succeed.
+PASS restore global state
+Harness: the test ran to completion.
+
diff --git a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/fetch-response-taint.https.html b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/fetch-response-taint.https.html
index a6e7f984..8ebee0c 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/fetch-response-taint.https.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/fetch-response-taint.https.html
@@ -193,6 +193,9 @@
   // Fetch to the other origin with same-origin mode should fail.
   if (origin == OTHER_ORIGIN && mode == 'same-origin') {
     ng_test(url, mode, credentials);
+  } else if (origin == BASE_ORIGIN && mode == 'same-origin') {
+    // Cors type response to a same-origin mode request should fail
+    ng_test(url, mode, credentials);
   } else {
     // The response from the SW should be cors.
     ok_test(url, mode, credentials, 'cors', 'undefined');
@@ -208,6 +211,9 @@
   // Fetch to the other origin with same-origin mode should fail.
   if (origin == OTHER_ORIGIN && mode == 'same-origin') {
     ng_test(url, mode, credentials);
+  } else if (origin == BASE_ORIGIN && mode == 'same-origin') {
+    // Cors type response to a same-origin mode request should fail
+    ng_test(url, mode, credentials);
   } else {
     // The response from the SW should be cors.
     ok_test(url, mode, credentials, 'cors', 'username1s');
diff --git a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/about-blank-replacement-blank-dynamic-nested-frame.html b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/about-blank-replacement-blank-dynamic-nested-frame.html
new file mode 100644
index 0000000..1e0c620
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/about-blank-replacement-blank-dynamic-nested-frame.html
@@ -0,0 +1,21 @@
+<!doctype html>
+<html>
+<body>
+<script>
+function nestedLoaded() {
+  parent.postMessage({ type: 'NESTED_LOADED' }, '*');
+}
+
+// dynamically add an about:blank iframe
+var f = document.createElement('iframe');
+f.onload = nestedLoaded;
+document.body.appendChild(f);
+
+// Helper routine to make it slightly easier for our parent to find
+// the nested frame.
+function nested() {
+  return f.contentWindow;
+}
+</script>
+</body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/about-blank-replacement-blank-nested-frame.html b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/about-blank-replacement-blank-nested-frame.html
new file mode 100644
index 0000000..99d07a48
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/about-blank-replacement-blank-nested-frame.html
@@ -0,0 +1,22 @@
+<!doctype html>
+<html>
+<body>
+<script>
+function nestedLoaded() {
+  parent.postMessage({ type: 'NESTED_LOADED' }, '*');
+}
+</script>
+<iframe id="nested" onload="nestedLoaded()"></iframe>
+<script>
+// Helper routine to make it slightly easier for our parent to find
+// the nested frame.
+function nested() {
+  return document.getElementById('nested').contentWindow;
+}
+
+// NOTE: Make sure not to touch the iframe directly here.  We want to
+//       test the case where the initial about:blank document is not
+//       directly accessed before load.
+</script>
+</body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/about-blank-replacement-srcdoc-nested-frame.html b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/about-blank-replacement-srcdoc-nested-frame.html
new file mode 100644
index 0000000..0122a00
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/about-blank-replacement-srcdoc-nested-frame.html
@@ -0,0 +1,22 @@
+<!doctype html>
+<html>
+<body>
+<script>
+function nestedLoaded() {
+  parent.postMessage({ type: 'NESTED_LOADED' }, '*');
+}
+</script>
+<iframe id="nested" srcdoc="<div></div>" onload="nestedLoaded()"></iframe>
+<script>
+// Helper routine to make it slightly easier for our parent to find
+// the nested frame.
+function nested() {
+  return document.getElementById('nested').contentWindow;
+}
+
+// NOTE: Make sure not to touch the iframe directly here.  We want to
+//       test the case where the initial about:blank document is not
+//       directly accessed before load.
+</script>
+</body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/unregister-then-register-new-script.https-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/unregister-then-register-new-script.https-expected.txt
new file mode 100644
index 0000000..1e948c51
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/unregister-then-register-new-script.https-expected.txt
@@ -0,0 +1,6 @@
+This is a testharness.js-based test.
+PASS Registering a new script URL while an unregistered registration is in use
+FAIL Registering a new script URL that 404s does resurrect an unregistered registration assert_unreached: unexpected rejection: Cannot read property 'scriptURL' of null Reached unreachable code
+FAIL Registering a new script URL that fails to install does resurrect an unregistered registration assert_unreached: unexpected rejection: Cannot read property 'scriptURL' of null Reached unreachable code
+Harness: the test ran to completion.
+
diff --git a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/unregister-then-register-new-script.https.html b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/unregister-then-register-new-script.https.html
index 385430c2d..582132a 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/unregister-then-register-new-script.https.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/unregister-then-register-new-script.https.html
@@ -90,9 +90,12 @@
           return registration.unregister();
         })
       .then(function() {
+          // Step 5.1 of Register clears the uninstall flag before fetching
+          // the script:
+          //
+          //  https://w3c.github.io/ServiceWorker/#register-algorithm
           var promise = navigator.serviceWorker.register('this-will-404',
                                                          { scope: scope });
-          iframe.remove();
           return promise;
         })
       .then(
@@ -100,17 +103,28 @@
           assert_unreached('register should reject the promise');
         },
         function() {
+          assert_equals(registration.installing, null,
+                        'registration.installing');
+          assert_equals(registration.waiting, null,
+                        'registration.waiting');
+          assert_equals(registration.active.scriptURL, normalizeURL(worker_url),
+                        'registration.active');
+          iframe.remove();
           return with_iframe(scope);
         })
       .then(function(frame) {
-          assert_equals(frame.contentWindow.navigator.serviceWorker.controller,
-                        null,
-                        'document should not load with a controller');
+          assert_equals(
+              frame.contentWindow.navigator.serviceWorker.controller.scriptURL,
+              normalizeURL(worker_url),
+              'the original worker should control a new document');
           frame.remove();
+          return registration.unregister();
+        })
+      .then(function() {
           t.done();
         })
       .catch(unreached_rejection(t));
-}, 'Registering a new script URL that 404s does not resurrect an ' +
+}, 'Registering a new script URL that 404s does resurrect an ' +
        'unregistered registration');
 
 async_test(function(t) {
@@ -131,9 +145,12 @@
           return registration.unregister();
         })
       .then(function() {
+          // Step 5.1 of Register clears the uninstall flag before firing
+          // the install event:
+          //
+          //  https://w3c.github.io/ServiceWorker/#register-algorithm
           var promise = navigator.serviceWorker.register(
               'resources/reject-install-worker.js', { scope: scope });
-          iframe.remove();
           return promise;
         })
       .then(function(r) {
@@ -141,12 +158,20 @@
           return wait_for_state(t, r.installing, 'redundant');
         })
       .then(function() {
+          assert_equals(registration.installing, null,
+                        'registration.installing');
+          assert_equals(registration.waiting, null,
+                        'registration.waiting');
+          assert_equals(registration.active.scriptURL, normalizeURL(worker_url),
+                        'registration.active');
+          iframe.remove();
           return with_iframe(scope);
         })
       .then(function(frame) {
-          assert_equals(frame.contentWindow.navigator.serviceWorker.controller,
-                        null,
-                        'document should not load with a controller');
+          assert_equals(
+              frame.contentWindow.navigator.serviceWorker.controller.scriptURL,
+              normalizeURL(worker_url),
+              'the original worker should control a new document');
           frame.remove();
           return registration.unregister();
         })
@@ -154,6 +179,6 @@
           t.done();
         })
       .catch(unreached_rejection(t));
-  }, 'Registering a new script URL that fails to install does not resurrect ' +
+  }, 'Registering a new script URL that fails to install does resurrect ' +
        'an unregistered registration');
 </script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/worker-interception.https-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/worker-interception.https-expected.txt
index f6d95f7..8e12b7c 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/worker-interception.https-expected.txt
+++ b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/worker-interception.https-expected.txt
@@ -1,7 +1,7 @@
 This is a testharness.js-based test.
 FAIL Verify worker script from uncontrolled document is intercepted by Service Worker promise_test: Unhandled rejection with value: undefined
 FAIL Verify worker script intercepted by same-origin response succeeds promise_test: Unhandled rejection with value: undefined
-FAIL Verify worker script intercepted by cors response succeeds promise_test: Unhandled rejection with value: undefined
+PASS Verify worker script intercepted by cors response fails
 PASS Verify worker script intercepted by no-cors cross-origin response fails
 PASS Verify worker loads from controlled document are intercepted by Service Worker
 Harness: the test ran to completion.
diff --git a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/worker-interception.https.html b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/worker-interception.https.html
index 3ec66a5..4f14746d 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/worker-interception.https.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/worker-interception.https.html
@@ -81,10 +81,16 @@
             });
         })
       .then(function(data) {
-          assert_equals(data, 'dummy-worker-script loaded');
+          assert_unreached('intercepted cors response to a same-origin mode ' +
+                           'worker load should fail');
           service_worker_unregister_and_done(t, scope);
-        });
-  }, 'Verify worker script intercepted by cors response succeeds');
+        })
+      .catch(function(e) {
+          assert_true(true, 'intercepted cors response to a same-origin mode ' +
+                            'worker load should fail');
+          service_worker_unregister_and_done(t, scope);
+       });
+  }, 'Verify worker script intercepted by cors response fails');
 
 promise_test(function(t) {
     var worker_url = 'resources/dummy-no-cors-worker.js';
diff --git a/third_party/WebKit/LayoutTests/external/wpt/web-animations/README.md b/third_party/WebKit/LayoutTests/external/wpt/web-animations/README.md
index 475f58a5..f6efbf9 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/web-animations/README.md
+++ b/third_party/WebKit/LayoutTests/external/wpt/web-animations/README.md
@@ -98,10 +98,19 @@
     Remember, even if we do need to make all tests take, say 200s each, text
     editors are very good at search and replace.
 
-*   Use the `assert_times_equal` assertion for comparing calculated times.
-    It tests times are equal using the precision recommended in the spec whilst
-    allowing implementations to override the function to meet their own
-    precision requirements.
+*   Use the `assert_times_equal` assertion for comparing times returned from
+    the API. This asserts that the time values are equal using a tolerance
+    based on the precision recommended in the spec. This tolerance is applied
+    to *both* of the values being compared. That is, it effectively allows
+    double the epsilon that is used when comparing with an absolute value.
+
+    For comparing a time value returned from the API to an absolute value, use
+    `assert_time_equals_literal`. This tests that the actual value is equal to
+    the expected value within the precision recommended in the spec.
+
+    Both `assert_times_equal` and `assert_time_equals_literal` are defined in a
+    way that implementations can override them to meet their own precision
+    requirements.
 
 *   There are quite a few bad tests in the repository. We're learning as
     we go. Don't just copy them blindly&mdash;please fix them!
diff --git a/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/Animatable/animate-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/Animatable/animate-expected.txt
index a766d2c..5a9ef92 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/Animatable/animate-expected.txt
+++ b/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/Animatable/animate-expected.txt
@@ -1,5 +1,5 @@
 This is a testharness.js-based test.
-Found 121 tests; 110 PASS, 11 FAIL, 0 TIMEOUT, 0 NOTRUN.
+Found 121 tests; 63 PASS, 58 FAIL, 0 TIMEOUT, 0 NOTRUN.
 PASS Element.animate() creates an Animation object
 PASS Element.animate() creates an Animation object in the relevant realm of the target element
 PASS Element.animate() creates an Animation object with a KeyframeEffect
@@ -8,64 +8,64 @@
 PASS Element.animate() accepts empty keyframe lists (input: [])
 PASS Element.animate() accepts empty keyframe lists (input: null)
 PASS Element.animate() accepts empty keyframe lists (input: undefined)
-PASS Element.animate() accepts a one property two value property-indexed keyframes specification
-FAIL Element.animate() accepts a one shorthand property two value property-indexed keyframes specification assert_equals: properties on ComputedKeyframe #0 should match expected "computedOffset,easing,margin,offset" but got "computedOffset,easing,marginBottom,marginLeft,marginRight,marginTop,offset"
-FAIL Element.animate() accepts a two property (one shorthand and one of its longhand components) two value property-indexed keyframes specification assert_equals: properties on ComputedKeyframe #0 should match expected "computedOffset,easing,margin,marginTop,offset" but got "computedOffset,easing,marginBottom,marginLeft,marginRight,marginTop,offset"
-PASS Element.animate() accepts a two property two value property-indexed keyframes specification
-PASS Element.animate() accepts a two property property-indexed keyframes specification with different numbers of values
-PASS Element.animate() accepts a property-indexed keyframes specification with an invalid value
-PASS Element.animate() accepts a one property two value property-indexed keyframes specification that needs to stringify its values
-PASS Element.animate() accepts a property-indexed keyframes specification with a CSS variable reference
-FAIL Element.animate() accepts a property-indexed keyframes specification with a CSS variable reference in a shorthand property assert_equals: properties on ComputedKeyframe #0 should match expected "computedOffset,easing,margin,offset" but got "computedOffset,easing,marginBottom,marginLeft,marginRight,marginTop,offset"
-PASS Element.animate() accepts a one property one value property-indexed keyframes specification
-PASS Element.animate() accepts a one property one non-array value property-indexed keyframes specification
-PASS Element.animate() accepts a one property two value property-indexed keyframes specification where the first value is invalid
-PASS Element.animate() accepts a one property two value property-indexed keyframes specification where the second value is invalid
-PASS Element.animate() accepts a property-indexed keyframe with a single offset
-PASS Element.animate() accepts a property-indexed keyframe with an array of offsets
-PASS Element.animate() accepts a property-indexed keyframe with an array of offsets that is too short
-PASS Element.animate() accepts a property-indexed keyframe with an array of offsets that is too long
-PASS Element.animate() accepts a property-indexed keyframe with an empty array of offsets
-PASS Element.animate() accepts a property-indexed keyframe with an array of offsets with an embedded null value
-PASS Element.animate() accepts a property-indexed keyframe with an array of offsets with a trailing null value
-PASS Element.animate() accepts a property-indexed keyframe with an array of offsets with leading and trailing null values
-PASS Element.animate() accepts a property-indexed keyframe with an array of offsets with adjacent null values
-PASS Element.animate() accepts a property-indexed keyframe with an array of offsets with all null values (and too many at that)
-PASS Element.animate() accepts a property-indexed keyframe with a single null offset
-PASS Element.animate() accepts a property-indexed keyframe with an array of offsets that is not strictly ascending in the unused part of the array
-PASS Element.animate() accepts a property-indexed keyframe without any specified easing
-PASS Element.animate() accepts a property-indexed keyframe with a single easing
-PASS Element.animate() accepts a property-indexed keyframe with an array of easings
-PASS Element.animate() accepts a property-indexed keyframe with an array of easings that is too short
-PASS Element.animate() accepts a property-indexed keyframe with a single-element array of easings
-PASS Element.animate() accepts a property-indexed keyframe with an empty array of easings
-PASS Element.animate() accepts a property-indexed keyframe with an array of easings that is too long
+FAIL Element.animate() accepts a one property two value property-indexed keyframes specification assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
+FAIL Element.animate() accepts a one shorthand property two value property-indexed keyframes specification assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,margin,offset" but got "computedOffset,easing,marginBottom,marginLeft,marginRight,marginTop,offset"
+FAIL Element.animate() accepts a two property (one shorthand and one of its longhand components) two value property-indexed keyframes specification assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,margin,marginTop,offset" but got "computedOffset,easing,marginBottom,marginLeft,marginRight,marginTop,offset"
+FAIL Element.animate() accepts a two property two value property-indexed keyframes specification assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset,top" but got "computedOffset,easing,left,offset,top"
+FAIL Element.animate() accepts a two property property-indexed keyframes specification with different numbers of values assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset,top" but got "computedOffset,easing,left,offset,top"
+FAIL Element.animate() accepts a property-indexed keyframes specification with an invalid value assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset,top" but got "computedOffset,easing,left,offset,top"
+FAIL Element.animate() accepts a one property two value property-indexed keyframes specification that needs to stringify its values assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,offset,opacity" but got "computedOffset,easing,offset,opacity"
+FAIL Element.animate() accepts a property-indexed keyframes specification with a CSS variable reference assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
+FAIL Element.animate() accepts a property-indexed keyframes specification with a CSS variable reference in a shorthand property assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,margin,offset" but got "computedOffset,easing,marginBottom,marginLeft,marginRight,marginTop,offset"
+FAIL Element.animate() accepts a one property one value property-indexed keyframes specification assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
+FAIL Element.animate() accepts a one property one non-array value property-indexed keyframes specification assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
+FAIL Element.animate() accepts a one property two value property-indexed keyframes specification where the first value is invalid assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,offset" but got "computedOffset,easing,offset"
+FAIL Element.animate() accepts a one property two value property-indexed keyframes specification where the second value is invalid assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
+FAIL Element.animate() accepts a property-indexed keyframe with a single offset assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
+FAIL Element.animate() accepts a property-indexed keyframe with an array of offsets assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
+FAIL Element.animate() accepts a property-indexed keyframe with an array of offsets that is too short assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
+FAIL Element.animate() accepts a property-indexed keyframe with an array of offsets that is too long assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
+FAIL Element.animate() accepts a property-indexed keyframe with an empty array of offsets assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
+FAIL Element.animate() accepts a property-indexed keyframe with an array of offsets with an embedded null value assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
+FAIL Element.animate() accepts a property-indexed keyframe with an array of offsets with a trailing null value assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
+FAIL Element.animate() accepts a property-indexed keyframe with an array of offsets with leading and trailing null values assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
+FAIL Element.animate() accepts a property-indexed keyframe with an array of offsets with adjacent null values assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
+FAIL Element.animate() accepts a property-indexed keyframe with an array of offsets with all null values (and too many at that) assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
+FAIL Element.animate() accepts a property-indexed keyframe with a single null offset assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
+FAIL Element.animate() accepts a property-indexed keyframe with an array of offsets that is not strictly ascending in the unused part of the array assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
+FAIL Element.animate() accepts a property-indexed keyframe without any specified easing assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
+FAIL Element.animate() accepts a property-indexed keyframe with a single easing assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
+FAIL Element.animate() accepts a property-indexed keyframe with an array of easings assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
+FAIL Element.animate() accepts a property-indexed keyframe with an array of easings that is too short assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
+FAIL Element.animate() accepts a property-indexed keyframe with a single-element array of easings assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
+FAIL Element.animate() accepts a property-indexed keyframe with an empty array of easings assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
+FAIL Element.animate() accepts a property-indexed keyframe with an array of easings that is too long assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
 PASS Element.animate() accepts a property-indexed keyframe with a single composite operation
 FAIL Element.animate() accepts a property-indexed keyframe with a composite array Failed to execute 'animate' on 'Element': Invalid composite value: 'accumulate'
 PASS Element.animate() accepts a property-indexed keyframe with a composite array that is too short
 FAIL Element.animate() accepts a property-indexed keyframe with a composite array that is too long Failed to execute 'animate' on 'Element': Invalid composite value: 'accumulate'
 PASS Element.animate() accepts a property-indexed keyframe with a single-element composite array
-PASS Element.animate() accepts a one property one keyframe sequence
-PASS Element.animate() accepts a one property two keyframe sequence
-PASS Element.animate() accepts a two property two keyframe sequence
-FAIL Element.animate() accepts a one shorthand property two keyframe sequence assert_equals: properties on ComputedKeyframe #0 should match expected "computedOffset,easing,margin,offset" but got "computedOffset,easing,marginBottom,marginLeft,marginRight,marginTop,offset"
-FAIL Element.animate() accepts a two property (a shorthand and one of its component longhands) two keyframe sequence assert_equals: properties on ComputedKeyframe #0 should match expected "computedOffset,easing,margin,marginTop,offset" but got "computedOffset,easing,marginBottom,marginLeft,marginRight,marginTop,offset"
-PASS Element.animate() accepts a two property keyframe sequence where one property is missing from the first keyframe
-PASS Element.animate() accepts a two property keyframe sequence where one property is missing from the last keyframe
-PASS Element.animate() accepts a one property two keyframe sequence that needs to stringify its values
-PASS Element.animate() accepts a keyframe sequence with a CSS variable reference
-FAIL Element.animate() accepts a keyframe sequence with a CSS variable reference in a shorthand property assert_equals: properties on ComputedKeyframe #0 should match expected "computedOffset,easing,margin,offset" but got "computedOffset,easing,marginBottom,marginLeft,marginRight,marginTop,offset"
-PASS Element.animate() accepts a keyframe sequence with duplicate values for a given interior offset
-PASS Element.animate() accepts a keyframe sequence with duplicate values for offsets 0 and 1
-PASS Element.animate() accepts a two property four keyframe sequence
-PASS Element.animate() accepts a single keyframe sequence with omitted offset
-PASS Element.animate() accepts a single keyframe sequence with null offset
-PASS Element.animate() accepts a single keyframe sequence with string offset
-PASS Element.animate() accepts a one property keyframe sequence with some omitted offsets
-PASS Element.animate() accepts a one property keyframe sequence with some null offsets
-PASS Element.animate() accepts a two property keyframe sequence with some omitted offsets
-PASS Element.animate() accepts a one property keyframe sequence with all omitted offsets
-PASS Element.animate() accepts a keyframe sequence with different easing values, but the same easing value for a given offset
+FAIL Element.animate() accepts a one property one keyframe sequence assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
+FAIL Element.animate() accepts a one property two keyframe sequence assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
+FAIL Element.animate() accepts a two property two keyframe sequence assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset,top" but got "computedOffset,easing,left,offset,top"
+FAIL Element.animate() accepts a one shorthand property two keyframe sequence assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,margin,offset" but got "computedOffset,easing,marginBottom,marginLeft,marginRight,marginTop,offset"
+FAIL Element.animate() accepts a two property (a shorthand and one of its component longhands) two keyframe sequence assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,margin,marginTop,offset" but got "computedOffset,easing,marginBottom,marginLeft,marginRight,marginTop,offset"
+FAIL Element.animate() accepts a two property keyframe sequence where one property is missing from the first keyframe assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
+FAIL Element.animate() accepts a two property keyframe sequence where one property is missing from the last keyframe assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset,top" but got "computedOffset,easing,left,offset,top"
+FAIL Element.animate() accepts a one property two keyframe sequence that needs to stringify its values assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,offset,opacity" but got "computedOffset,easing,offset,opacity"
+FAIL Element.animate() accepts a keyframe sequence with a CSS variable reference assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
+FAIL Element.animate() accepts a keyframe sequence with a CSS variable reference in a shorthand property assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,margin,offset" but got "computedOffset,easing,marginBottom,marginLeft,marginRight,marginTop,offset"
+FAIL Element.animate() accepts a keyframe sequence with duplicate values for a given interior offset assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
+FAIL Element.animate() accepts a keyframe sequence with duplicate values for offsets 0 and 1 assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
+FAIL Element.animate() accepts a two property four keyframe sequence assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
+FAIL Element.animate() accepts a single keyframe sequence with omitted offset assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
+FAIL Element.animate() accepts a single keyframe sequence with null offset assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
+FAIL Element.animate() accepts a single keyframe sequence with string offset assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
+FAIL Element.animate() accepts a one property keyframe sequence with some omitted offsets assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
+FAIL Element.animate() accepts a one property keyframe sequence with some null offsets assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
+FAIL Element.animate() accepts a two property keyframe sequence with some omitted offsets assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset,top" but got "computedOffset,easing,left,offset,top"
+FAIL Element.animate() accepts a one property keyframe sequence with all omitted offsets assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
+FAIL Element.animate() accepts a keyframe sequence with different easing values, but the same easing value for a given offset assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
 PASS Element.animate() accepts a keyframe sequence with different composite values, but the same composite value for a given offset
 PASS Element.animate() does not accept keyframes with an out-of-bounded positive offset
 PASS Element.animate() does not accept keyframes with an out-of-bounded negative offset
diff --git a/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/Animation/playbackRate.html b/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/Animation/playbackRate.html
index 9a3b762..be5bf96 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/Animation/playbackRate.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/Animation/playbackRate.html
@@ -14,16 +14,14 @@
                              previousAnimationCurrentTime,
                              previousTimelineCurrentTime,
                              description) {
-  const accuracy = 0.001; /* accuracy of DOMHighResTimeStamp */
   const animationCurrentTimeDifference =
     animation.currentTime - previousAnimationCurrentTime;
   const timelineCurrentTimeDifference =
     animation.timeline.currentTime - previousTimelineCurrentTime;
 
-  assert_approx_equals(animationCurrentTimeDifference,
-                       timelineCurrentTimeDifference * animation.playbackRate,
-                       accuracy,
-                       description);
+  assert_times_equal(animationCurrentTimeDifference,
+                     timelineCurrentTimeDifference * animation.playbackRate,
+                     description);
 }
 
 promise_test(t => {
diff --git a/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/AnimationEffectTiming/direction.html b/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/AnimationEffectTiming/direction.html
index 7bc315d..3238f5d 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/AnimationEffectTiming/direction.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/AnimationEffectTiming/direction.html
@@ -31,13 +31,13 @@
   const div = createDiv(t);
   const anim = div.animate(null, { duration: 10000, direction: 'normal' });
   anim.currentTime = 7000;
-  assert_times_equal(anim.effect.getComputedTiming().progress, 0.7,
-                     'progress before updating direction');
+  assert_time_equals_literal(anim.effect.getComputedTiming().progress, 0.7,
+                             'progress before updating direction');
 
   anim.effect.timing.direction = 'reverse';
 
-  assert_times_equal(anim.effect.getComputedTiming().progress, 0.3,
-                     'progress after updating direction');
+  assert_time_equals_literal(anim.effect.getComputedTiming().progress, 0.3,
+                             'progress after updating direction');
 }, 'Can be changed from \'normal\' to \'reverse\' while in progress');
 
 test(t => {
@@ -78,13 +78,13 @@
                              duration: 10000,
                              direction: 'normal' });
   anim.currentTime = 17000;
-  assert_times_equal(anim.effect.getComputedTiming().progress, 0.7,
-                     'progress before updating direction');
+  assert_time_equals_literal(anim.effect.getComputedTiming().progress, 0.7,
+                             'progress before updating direction');
 
   anim.effect.timing.direction = 'alternate';
 
-  assert_times_equal(anim.effect.getComputedTiming().progress, 0.3,
-                     'progress after updating direction');
+  assert_time_equals_literal(anim.effect.getComputedTiming().progress, 0.3,
+                             'progress after updating direction');
 }, 'Can be changed from \'normal\' to \'alternate\' while in progress');
 
 test(t => {
@@ -94,13 +94,13 @@
                              duration: 10000,
                              direction: 'alternate' });
   anim.currentTime = 17000;
-  assert_times_equal(anim.effect.getComputedTiming().progress, 0.3,
-                     'progress before updating direction');
+  assert_time_equals_literal(anim.effect.getComputedTiming().progress, 0.3,
+                             'progress before updating direction');
 
   anim.effect.timing.direction = 'alternate-reverse';
 
-  assert_times_equal(anim.effect.getComputedTiming().progress, 0.7,
-                     'progress after updating direction');
+  assert_time_equals_literal(anim.effect.getComputedTiming().progress, 0.7,
+                             'progress after updating direction');
 }, 'Can be changed from \'alternate\' to \'alternate-reverse\' while in'
    + ' progress');
 
diff --git a/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/AnimationEffectTiming/duration.html b/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/AnimationEffectTiming/duration.html
index 9caa0e36..42913f5 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/AnimationEffectTiming/duration.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/AnimationEffectTiming/duration.html
@@ -19,10 +19,10 @@
   const div = createDiv(t);
   const anim = div.animate({ opacity: [ 0, 1 ] }, 2000);
   anim.effect.timing.duration = 123.45;
-  assert_times_equal(anim.effect.timing.duration, 123.45,
-                     'set duration 123.45');
-  assert_times_equal(anim.effect.getComputedTiming().duration, 123.45,
-                     'getComputedTiming() after set duration 123.45');
+  assert_time_equals_literal(anim.effect.timing.duration, 123.45,
+                             'set duration 123.45');
+  assert_time_equals_literal(anim.effect.getComputedTiming().duration, 123.45,
+                             'getComputedTiming() after set duration 123.45');
 }, 'Can be set to a double value');
 
 test(t => {
@@ -176,8 +176,8 @@
   assert_equals(anim.effect.getComputedTiming().progress, 1,
                 'progress when animation is finished');
   anim.effect.timing.duration *= 2;
-  assert_times_equal(anim.effect.getComputedTiming().progress, 0.5,
-                     'progress after doubling the duration');
+  assert_time_equals_literal(anim.effect.getComputedTiming().progress, 0.5,
+                             'progress after doubling the duration');
   anim.effect.timing.duration = 0;
   assert_equals(anim.effect.getComputedTiming().progress, 1,
                 'progress after setting duration to zero');
diff --git a/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/AnimationEffectTiming/endDelay.html b/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/AnimationEffectTiming/endDelay.html
index b6793ed..3062c8c 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/AnimationEffectTiming/endDelay.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/AnimationEffectTiming/endDelay.html
@@ -19,10 +19,10 @@
   const div = createDiv(t);
   const anim = div.animate({ opacity: [ 0, 1 ] }, 2000);
   anim.effect.timing.endDelay = 123.45;
-  assert_times_equal(anim.effect.timing.endDelay, 123.45,
-                     'set endDelay 123.45');
-  assert_times_equal(anim.effect.getComputedTiming().endDelay, 123.45,
-                     'getComputedTiming() after set endDelay 123.45');
+  assert_time_equals_literal(anim.effect.timing.endDelay, 123.45,
+                             'set endDelay 123.45');
+  assert_time_equals_literal(anim.effect.getComputedTiming().endDelay, 123.45,
+                             'getComputedTiming() after set endDelay 123.45');
 }, 'Can be set to a positive number');
 
 test(t => {
diff --git a/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/AnimationEffectTiming/iterationStart.html b/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/AnimationEffectTiming/iterationStart.html
index 5521f1e..73bc481 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/AnimationEffectTiming/iterationStart.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/AnimationEffectTiming/iterationStart.html
@@ -24,7 +24,7 @@
                              duration: 100,
                              delay: 1 });
   anim.effect.timing.iterationStart = 2.5;
-  assert_times_equal(anim.effect.getComputedTiming().progress, 0.5);
+  assert_time_equals_literal(anim.effect.getComputedTiming().progress, 0.5);
   assert_equals(anim.effect.getComputedTiming().currentIteration, 2);
 }, 'Changing the value updates computed timing when backwards-filling');
 
@@ -37,7 +37,7 @@
                              duration: 100,
                              delay: 0 });
   anim.effect.timing.iterationStart = 2.5;
-  assert_times_equal(anim.effect.getComputedTiming().progress, 0.5);
+  assert_time_equals_literal(anim.effect.getComputedTiming().progress, 0.5);
   assert_equals(anim.effect.getComputedTiming().currentIteration, 2);
 }, 'Changing the value updates computed timing during the active phase');
 
@@ -51,7 +51,7 @@
                              delay: 0 });
   anim.finish();
   anim.effect.timing.iterationStart = 2.5;
-  assert_times_equal(anim.effect.getComputedTiming().progress, 0.5);
+  assert_time_equals_literal(anim.effect.getComputedTiming().progress, 0.5);
   assert_equals(anim.effect.getComputedTiming().currentIteration, 3);
 }, 'Changing the value updates computed timing when forwards-filling');
 
diff --git a/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/AnimationEffectTiming/iterations.html b/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/AnimationEffectTiming/iterations.html
index 3239062..3bfaf8e 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/AnimationEffectTiming/iterations.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/AnimationEffectTiming/iterations.html
@@ -70,10 +70,12 @@
 
   anim.effect.timing.iterations = 2;
 
-  assert_times_equal(anim.effect.getComputedTiming().progress, 0,
-                     'progress after adding an iteration');
-  assert_times_equal(anim.effect.getComputedTiming().currentIteration, 1,
-                     'current iteration after adding an iteration');
+  assert_time_equals_literal(anim.effect.getComputedTiming().progress,
+                             0,
+                             'progress after adding an iteration');
+  assert_time_equals_literal(anim.effect.getComputedTiming().currentIteration,
+                             1,
+                             'current iteration after adding an iteration');
 
   anim.effect.timing.iterations = 0;
 
diff --git a/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/KeyframeEffect/composite-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/KeyframeEffect/composite-expected.txt
new file mode 100644
index 0000000..be099f22
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/KeyframeEffect/composite-expected.txt
@@ -0,0 +1,7 @@
+This is a testharness.js-based test.
+PASS Default value
+PASS Change composite value
+FAIL Unspecified keyframe composite value when setting effect composite assert_equals: unspecified keyframe composite value should be null even if effect composite is set expected (object) null but got (undefined) undefined
+PASS Specified keyframe composite value when setting effect composite
+Harness: the test ran to completion.
+
diff --git a/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/KeyframeEffect/composite.html b/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/KeyframeEffect/composite.html
index 745f66b..82ac633 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/KeyframeEffect/composite.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/KeyframeEffect/composite.html
@@ -29,8 +29,8 @@
 
   anim.effect.composite = 'add';
   const keyframes = anim.effect.getKeyframes();
-  assert_equals(keyframes[0].composite, undefined,
-                'unspecified keyframe composite value should be absent even ' +
+  assert_equals(keyframes[0].composite, null,
+                'unspecified keyframe composite value should be null even ' +
                 'if effect composite is set');
 }, 'Unspecified keyframe composite value when setting effect composite');
 
diff --git a/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/KeyframeEffect/constructor-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/KeyframeEffect/constructor-expected.txt
index bce450f..38f74721 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/KeyframeEffect/constructor-expected.txt
+++ b/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/KeyframeEffect/constructor-expected.txt
@@ -1,74 +1,74 @@
 This is a testharness.js-based test.
-Found 167 tests; 149 PASS, 18 FAIL, 0 TIMEOUT, 0 NOTRUN.
+Found 167 tests; 102 PASS, 65 FAIL, 0 TIMEOUT, 0 NOTRUN.
 PASS A KeyframeEffectReadOnly can be constructed with no frames
 PASS easing values are parsed correctly when passed to the KeyframeEffectReadOnly constructor in KeyframeEffectOptions
 PASS Invalid easing values are correctly rejected when passed to the KeyframeEffectReadOnly constructor in KeyframeEffectOptions
 FAIL composite values are parsed correctly when passed to the KeyframeEffectReadOnly constructor in property-indexed keyframes Failed to construct 'KeyframeEffectReadOnly': Invalid composite value: 'accumulate'
 FAIL composite values are parsed correctly when passed to the KeyframeEffectReadOnly constructor in regular keyframes Failed to construct 'KeyframeEffectReadOnly': Invalid composite value: 'accumulate'
-FAIL composite value is absent if the composite operation specified on the keyframe effect is being used Failed to construct 'KeyframeEffectReadOnly': Invalid composite value: 'accumulate'
-PASS A KeyframeEffectReadOnly can be constructed with a one property two value property-indexed keyframes specification
+FAIL composite value is null if the composite operation specified on the keyframe effect is being used assert_equals: resulting composite for 'replace' expected (object) null but got (undefined) undefined
+FAIL A KeyframeEffectReadOnly can be constructed with a one property two value property-indexed keyframes specification assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
 PASS A KeyframeEffectReadOnly constructed with a one property two value property-indexed keyframes specification roundtrips
-FAIL A KeyframeEffectReadOnly can be constructed with a one shorthand property two value property-indexed keyframes specification assert_equals: properties on ComputedKeyframe #0 should match expected "computedOffset,easing,margin,offset" but got "computedOffset,easing,marginBottom,marginLeft,marginRight,marginTop,offset"
+FAIL A KeyframeEffectReadOnly can be constructed with a one shorthand property two value property-indexed keyframes specification assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,margin,offset" but got "computedOffset,easing,marginBottom,marginLeft,marginRight,marginTop,offset"
 PASS A KeyframeEffectReadOnly constructed with a one shorthand property two value property-indexed keyframes specification roundtrips
-FAIL A KeyframeEffectReadOnly can be constructed with a two property (one shorthand and one of its longhand components) two value property-indexed keyframes specification assert_equals: properties on ComputedKeyframe #0 should match expected "computedOffset,easing,margin,marginTop,offset" but got "computedOffset,easing,marginBottom,marginLeft,marginRight,marginTop,offset"
+FAIL A KeyframeEffectReadOnly can be constructed with a two property (one shorthand and one of its longhand components) two value property-indexed keyframes specification assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,margin,marginTop,offset" but got "computedOffset,easing,marginBottom,marginLeft,marginRight,marginTop,offset"
 PASS A KeyframeEffectReadOnly constructed with a two property (one shorthand and one of its longhand components) two value property-indexed keyframes specification roundtrips
-PASS A KeyframeEffectReadOnly can be constructed with a two property two value property-indexed keyframes specification
+FAIL A KeyframeEffectReadOnly can be constructed with a two property two value property-indexed keyframes specification assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset,top" but got "computedOffset,easing,left,offset,top"
 PASS A KeyframeEffectReadOnly constructed with a two property two value property-indexed keyframes specification roundtrips
-PASS A KeyframeEffectReadOnly can be constructed with a two property property-indexed keyframes specification with different numbers of values
+FAIL A KeyframeEffectReadOnly can be constructed with a two property property-indexed keyframes specification with different numbers of values assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset,top" but got "computedOffset,easing,left,offset,top"
 PASS A KeyframeEffectReadOnly constructed with a two property property-indexed keyframes specification with different numbers of values roundtrips
-PASS A KeyframeEffectReadOnly can be constructed with a property-indexed keyframes specification with an invalid value
+FAIL A KeyframeEffectReadOnly can be constructed with a property-indexed keyframes specification with an invalid value assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset,top" but got "computedOffset,easing,left,offset,top"
 PASS A KeyframeEffectReadOnly constructed with a property-indexed keyframes specification with an invalid value roundtrips
-PASS A KeyframeEffectReadOnly can be constructed with a one property two value property-indexed keyframes specification that needs to stringify its values
+FAIL A KeyframeEffectReadOnly can be constructed with a one property two value property-indexed keyframes specification that needs to stringify its values assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,offset,opacity" but got "computedOffset,easing,offset,opacity"
 PASS A KeyframeEffectReadOnly constructed with a one property two value property-indexed keyframes specification that needs to stringify its values roundtrips
-PASS A KeyframeEffectReadOnly can be constructed with a property-indexed keyframes specification with a CSS variable reference
+FAIL A KeyframeEffectReadOnly can be constructed with a property-indexed keyframes specification with a CSS variable reference assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
 PASS A KeyframeEffectReadOnly constructed with a property-indexed keyframes specification with a CSS variable reference roundtrips
-FAIL A KeyframeEffectReadOnly can be constructed with a property-indexed keyframes specification with a CSS variable reference in a shorthand property assert_equals: properties on ComputedKeyframe #0 should match expected "computedOffset,easing,margin,offset" but got "computedOffset,easing,marginBottom,marginLeft,marginRight,marginTop,offset"
+FAIL A KeyframeEffectReadOnly can be constructed with a property-indexed keyframes specification with a CSS variable reference in a shorthand property assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,margin,offset" but got "computedOffset,easing,marginBottom,marginLeft,marginRight,marginTop,offset"
 FAIL A KeyframeEffectReadOnly constructed with a property-indexed keyframes specification with a CSS variable reference in a shorthand property roundtrips assert_equals: properties on ComputedKeyframe #0 should match expected "computedOffset,easing,marginBottom,marginLeft,marginRight,marginTop,offset" but got "computedOffset,easing,offset"
-PASS A KeyframeEffectReadOnly can be constructed with a one property one value property-indexed keyframes specification
+FAIL A KeyframeEffectReadOnly can be constructed with a one property one value property-indexed keyframes specification assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
 PASS A KeyframeEffectReadOnly constructed with a one property one value property-indexed keyframes specification roundtrips
-PASS A KeyframeEffectReadOnly can be constructed with a one property one non-array value property-indexed keyframes specification
+FAIL A KeyframeEffectReadOnly can be constructed with a one property one non-array value property-indexed keyframes specification assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
 PASS A KeyframeEffectReadOnly constructed with a one property one non-array value property-indexed keyframes specification roundtrips
-PASS A KeyframeEffectReadOnly can be constructed with a one property two value property-indexed keyframes specification where the first value is invalid
+FAIL A KeyframeEffectReadOnly can be constructed with a one property two value property-indexed keyframes specification where the first value is invalid assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,offset" but got "computedOffset,easing,offset"
 PASS A KeyframeEffectReadOnly constructed with a one property two value property-indexed keyframes specification where the first value is invalid roundtrips
-PASS A KeyframeEffectReadOnly can be constructed with a one property two value property-indexed keyframes specification where the second value is invalid
+FAIL A KeyframeEffectReadOnly can be constructed with a one property two value property-indexed keyframes specification where the second value is invalid assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
 PASS A KeyframeEffectReadOnly constructed with a one property two value property-indexed keyframes specification where the second value is invalid roundtrips
-PASS A KeyframeEffectReadOnly can be constructed with a property-indexed keyframe with a single offset
+FAIL A KeyframeEffectReadOnly can be constructed with a property-indexed keyframe with a single offset assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
 PASS A KeyframeEffectReadOnly constructed with a property-indexed keyframe with a single offset roundtrips
-PASS A KeyframeEffectReadOnly can be constructed with a property-indexed keyframe with an array of offsets
+FAIL A KeyframeEffectReadOnly can be constructed with a property-indexed keyframe with an array of offsets assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
 PASS A KeyframeEffectReadOnly constructed with a property-indexed keyframe with an array of offsets roundtrips
-PASS A KeyframeEffectReadOnly can be constructed with a property-indexed keyframe with an array of offsets that is too short
+FAIL A KeyframeEffectReadOnly can be constructed with a property-indexed keyframe with an array of offsets that is too short assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
 PASS A KeyframeEffectReadOnly constructed with a property-indexed keyframe with an array of offsets that is too short roundtrips
-PASS A KeyframeEffectReadOnly can be constructed with a property-indexed keyframe with an array of offsets that is too long
+FAIL A KeyframeEffectReadOnly can be constructed with a property-indexed keyframe with an array of offsets that is too long assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
 PASS A KeyframeEffectReadOnly constructed with a property-indexed keyframe with an array of offsets that is too long roundtrips
-PASS A KeyframeEffectReadOnly can be constructed with a property-indexed keyframe with an empty array of offsets
+FAIL A KeyframeEffectReadOnly can be constructed with a property-indexed keyframe with an empty array of offsets assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
 PASS A KeyframeEffectReadOnly constructed with a property-indexed keyframe with an empty array of offsets roundtrips
-PASS A KeyframeEffectReadOnly can be constructed with a property-indexed keyframe with an array of offsets with an embedded null value
+FAIL A KeyframeEffectReadOnly can be constructed with a property-indexed keyframe with an array of offsets with an embedded null value assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
 PASS A KeyframeEffectReadOnly constructed with a property-indexed keyframe with an array of offsets with an embedded null value roundtrips
-PASS A KeyframeEffectReadOnly can be constructed with a property-indexed keyframe with an array of offsets with a trailing null value
+FAIL A KeyframeEffectReadOnly can be constructed with a property-indexed keyframe with an array of offsets with a trailing null value assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
 PASS A KeyframeEffectReadOnly constructed with a property-indexed keyframe with an array of offsets with a trailing null value roundtrips
-PASS A KeyframeEffectReadOnly can be constructed with a property-indexed keyframe with an array of offsets with leading and trailing null values
+FAIL A KeyframeEffectReadOnly can be constructed with a property-indexed keyframe with an array of offsets with leading and trailing null values assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
 PASS A KeyframeEffectReadOnly constructed with a property-indexed keyframe with an array of offsets with leading and trailing null values roundtrips
-PASS A KeyframeEffectReadOnly can be constructed with a property-indexed keyframe with an array of offsets with adjacent null values
+FAIL A KeyframeEffectReadOnly can be constructed with a property-indexed keyframe with an array of offsets with adjacent null values assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
 PASS A KeyframeEffectReadOnly constructed with a property-indexed keyframe with an array of offsets with adjacent null values roundtrips
-PASS A KeyframeEffectReadOnly can be constructed with a property-indexed keyframe with an array of offsets with all null values (and too many at that)
+FAIL A KeyframeEffectReadOnly can be constructed with a property-indexed keyframe with an array of offsets with all null values (and too many at that) assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
 PASS A KeyframeEffectReadOnly constructed with a property-indexed keyframe with an array of offsets with all null values (and too many at that) roundtrips
-PASS A KeyframeEffectReadOnly can be constructed with a property-indexed keyframe with a single null offset
+FAIL A KeyframeEffectReadOnly can be constructed with a property-indexed keyframe with a single null offset assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
 PASS A KeyframeEffectReadOnly constructed with a property-indexed keyframe with a single null offset roundtrips
-PASS A KeyframeEffectReadOnly can be constructed with a property-indexed keyframe with an array of offsets that is not strictly ascending in the unused part of the array
+FAIL A KeyframeEffectReadOnly can be constructed with a property-indexed keyframe with an array of offsets that is not strictly ascending in the unused part of the array assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
 PASS A KeyframeEffectReadOnly constructed with a property-indexed keyframe with an array of offsets that is not strictly ascending in the unused part of the array roundtrips
-PASS A KeyframeEffectReadOnly can be constructed with a property-indexed keyframe without any specified easing
+FAIL A KeyframeEffectReadOnly can be constructed with a property-indexed keyframe without any specified easing assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
 PASS A KeyframeEffectReadOnly constructed with a property-indexed keyframe without any specified easing roundtrips
-PASS A KeyframeEffectReadOnly can be constructed with a property-indexed keyframe with a single easing
+FAIL A KeyframeEffectReadOnly can be constructed with a property-indexed keyframe with a single easing assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
 PASS A KeyframeEffectReadOnly constructed with a property-indexed keyframe with a single easing roundtrips
-PASS A KeyframeEffectReadOnly can be constructed with a property-indexed keyframe with an array of easings
+FAIL A KeyframeEffectReadOnly can be constructed with a property-indexed keyframe with an array of easings assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
 PASS A KeyframeEffectReadOnly constructed with a property-indexed keyframe with an array of easings roundtrips
-PASS A KeyframeEffectReadOnly can be constructed with a property-indexed keyframe with an array of easings that is too short
+FAIL A KeyframeEffectReadOnly can be constructed with a property-indexed keyframe with an array of easings that is too short assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
 PASS A KeyframeEffectReadOnly constructed with a property-indexed keyframe with an array of easings that is too short roundtrips
-PASS A KeyframeEffectReadOnly can be constructed with a property-indexed keyframe with a single-element array of easings
+FAIL A KeyframeEffectReadOnly can be constructed with a property-indexed keyframe with a single-element array of easings assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
 PASS A KeyframeEffectReadOnly constructed with a property-indexed keyframe with a single-element array of easings roundtrips
-PASS A KeyframeEffectReadOnly can be constructed with a property-indexed keyframe with an empty array of easings
+FAIL A KeyframeEffectReadOnly can be constructed with a property-indexed keyframe with an empty array of easings assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
 PASS A KeyframeEffectReadOnly constructed with a property-indexed keyframe with an empty array of easings roundtrips
-PASS A KeyframeEffectReadOnly can be constructed with a property-indexed keyframe with an array of easings that is too long
+FAIL A KeyframeEffectReadOnly can be constructed with a property-indexed keyframe with an array of easings that is too long assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
 PASS A KeyframeEffectReadOnly constructed with a property-indexed keyframe with an array of easings that is too long roundtrips
 PASS A KeyframeEffectReadOnly can be constructed with a property-indexed keyframe with a single composite operation
 PASS A KeyframeEffectReadOnly constructed with a property-indexed keyframe with a single composite operation roundtrips
@@ -80,47 +80,47 @@
 FAIL A KeyframeEffectReadOnly constructed with a property-indexed keyframe with a composite array that is too long roundtrips Failed to construct 'KeyframeEffectReadOnly': Invalid composite value: 'accumulate'
 PASS A KeyframeEffectReadOnly can be constructed with a property-indexed keyframe with a single-element composite array
 PASS A KeyframeEffectReadOnly constructed with a property-indexed keyframe with a single-element composite array roundtrips
-PASS A KeyframeEffectReadOnly can be constructed with a one property one keyframe sequence
+FAIL A KeyframeEffectReadOnly can be constructed with a one property one keyframe sequence assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
 PASS A KeyframeEffectReadOnly constructed with a one property one keyframe sequence roundtrips
-PASS A KeyframeEffectReadOnly can be constructed with a one property two keyframe sequence
+FAIL A KeyframeEffectReadOnly can be constructed with a one property two keyframe sequence assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
 PASS A KeyframeEffectReadOnly constructed with a one property two keyframe sequence roundtrips
-PASS A KeyframeEffectReadOnly can be constructed with a two property two keyframe sequence
+FAIL A KeyframeEffectReadOnly can be constructed with a two property two keyframe sequence assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset,top" but got "computedOffset,easing,left,offset,top"
 PASS A KeyframeEffectReadOnly constructed with a two property two keyframe sequence roundtrips
-FAIL A KeyframeEffectReadOnly can be constructed with a one shorthand property two keyframe sequence assert_equals: properties on ComputedKeyframe #0 should match expected "computedOffset,easing,margin,offset" but got "computedOffset,easing,marginBottom,marginLeft,marginRight,marginTop,offset"
+FAIL A KeyframeEffectReadOnly can be constructed with a one shorthand property two keyframe sequence assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,margin,offset" but got "computedOffset,easing,marginBottom,marginLeft,marginRight,marginTop,offset"
 PASS A KeyframeEffectReadOnly constructed with a one shorthand property two keyframe sequence roundtrips
-FAIL A KeyframeEffectReadOnly can be constructed with a two property (a shorthand and one of its component longhands) two keyframe sequence assert_equals: properties on ComputedKeyframe #0 should match expected "computedOffset,easing,margin,marginTop,offset" but got "computedOffset,easing,marginBottom,marginLeft,marginRight,marginTop,offset"
+FAIL A KeyframeEffectReadOnly can be constructed with a two property (a shorthand and one of its component longhands) two keyframe sequence assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,margin,marginTop,offset" but got "computedOffset,easing,marginBottom,marginLeft,marginRight,marginTop,offset"
 PASS A KeyframeEffectReadOnly constructed with a two property (a shorthand and one of its component longhands) two keyframe sequence roundtrips
-PASS A KeyframeEffectReadOnly can be constructed with a two property keyframe sequence where one property is missing from the first keyframe
+FAIL A KeyframeEffectReadOnly can be constructed with a two property keyframe sequence where one property is missing from the first keyframe assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
 PASS A KeyframeEffectReadOnly constructed with a two property keyframe sequence where one property is missing from the first keyframe roundtrips
-PASS A KeyframeEffectReadOnly can be constructed with a two property keyframe sequence where one property is missing from the last keyframe
+FAIL A KeyframeEffectReadOnly can be constructed with a two property keyframe sequence where one property is missing from the last keyframe assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset,top" but got "computedOffset,easing,left,offset,top"
 PASS A KeyframeEffectReadOnly constructed with a two property keyframe sequence where one property is missing from the last keyframe roundtrips
-PASS A KeyframeEffectReadOnly can be constructed with a one property two keyframe sequence that needs to stringify its values
+FAIL A KeyframeEffectReadOnly can be constructed with a one property two keyframe sequence that needs to stringify its values assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,offset,opacity" but got "computedOffset,easing,offset,opacity"
 PASS A KeyframeEffectReadOnly constructed with a one property two keyframe sequence that needs to stringify its values roundtrips
-PASS A KeyframeEffectReadOnly can be constructed with a keyframe sequence with a CSS variable reference
+FAIL A KeyframeEffectReadOnly can be constructed with a keyframe sequence with a CSS variable reference assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
 PASS A KeyframeEffectReadOnly constructed with a keyframe sequence with a CSS variable reference roundtrips
-FAIL A KeyframeEffectReadOnly can be constructed with a keyframe sequence with a CSS variable reference in a shorthand property assert_equals: properties on ComputedKeyframe #0 should match expected "computedOffset,easing,margin,offset" but got "computedOffset,easing,marginBottom,marginLeft,marginRight,marginTop,offset"
+FAIL A KeyframeEffectReadOnly can be constructed with a keyframe sequence with a CSS variable reference in a shorthand property assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,margin,offset" but got "computedOffset,easing,marginBottom,marginLeft,marginRight,marginTop,offset"
 FAIL A KeyframeEffectReadOnly constructed with a keyframe sequence with a CSS variable reference in a shorthand property roundtrips assert_equals: properties on ComputedKeyframe #0 should match expected "computedOffset,easing,marginBottom,marginLeft,marginRight,marginTop,offset" but got "computedOffset,easing,offset"
-PASS A KeyframeEffectReadOnly can be constructed with a keyframe sequence with duplicate values for a given interior offset
+FAIL A KeyframeEffectReadOnly can be constructed with a keyframe sequence with duplicate values for a given interior offset assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
 PASS A KeyframeEffectReadOnly constructed with a keyframe sequence with duplicate values for a given interior offset roundtrips
-PASS A KeyframeEffectReadOnly can be constructed with a keyframe sequence with duplicate values for offsets 0 and 1
+FAIL A KeyframeEffectReadOnly can be constructed with a keyframe sequence with duplicate values for offsets 0 and 1 assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
 PASS A KeyframeEffectReadOnly constructed with a keyframe sequence with duplicate values for offsets 0 and 1 roundtrips
-PASS A KeyframeEffectReadOnly can be constructed with a two property four keyframe sequence
+FAIL A KeyframeEffectReadOnly can be constructed with a two property four keyframe sequence assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
 PASS A KeyframeEffectReadOnly constructed with a two property four keyframe sequence roundtrips
-PASS A KeyframeEffectReadOnly can be constructed with a single keyframe sequence with omitted offset
+FAIL A KeyframeEffectReadOnly can be constructed with a single keyframe sequence with omitted offset assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
 PASS A KeyframeEffectReadOnly constructed with a single keyframe sequence with omitted offset roundtrips
-PASS A KeyframeEffectReadOnly can be constructed with a single keyframe sequence with null offset
+FAIL A KeyframeEffectReadOnly can be constructed with a single keyframe sequence with null offset assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
 PASS A KeyframeEffectReadOnly constructed with a single keyframe sequence with null offset roundtrips
-PASS A KeyframeEffectReadOnly can be constructed with a single keyframe sequence with string offset
+FAIL A KeyframeEffectReadOnly can be constructed with a single keyframe sequence with string offset assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
 PASS A KeyframeEffectReadOnly constructed with a single keyframe sequence with string offset roundtrips
-PASS A KeyframeEffectReadOnly can be constructed with a one property keyframe sequence with some omitted offsets
+FAIL A KeyframeEffectReadOnly can be constructed with a one property keyframe sequence with some omitted offsets assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
 PASS A KeyframeEffectReadOnly constructed with a one property keyframe sequence with some omitted offsets roundtrips
-PASS A KeyframeEffectReadOnly can be constructed with a one property keyframe sequence with some null offsets
+FAIL A KeyframeEffectReadOnly can be constructed with a one property keyframe sequence with some null offsets assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
 PASS A KeyframeEffectReadOnly constructed with a one property keyframe sequence with some null offsets roundtrips
-PASS A KeyframeEffectReadOnly can be constructed with a two property keyframe sequence with some omitted offsets
+FAIL A KeyframeEffectReadOnly can be constructed with a two property keyframe sequence with some omitted offsets assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset,top" but got "computedOffset,easing,left,offset,top"
 PASS A KeyframeEffectReadOnly constructed with a two property keyframe sequence with some omitted offsets roundtrips
-PASS A KeyframeEffectReadOnly can be constructed with a one property keyframe sequence with all omitted offsets
+FAIL A KeyframeEffectReadOnly can be constructed with a one property keyframe sequence with all omitted offsets assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
 PASS A KeyframeEffectReadOnly constructed with a one property keyframe sequence with all omitted offsets roundtrips
-PASS A KeyframeEffectReadOnly can be constructed with a keyframe sequence with different easing values, but the same easing value for a given offset
+FAIL A KeyframeEffectReadOnly can be constructed with a keyframe sequence with different easing values, but the same easing value for a given offset assert_equals: properties on ComputedKeyframe #0 should match expected "composite,computedOffset,easing,left,offset" but got "computedOffset,easing,left,offset"
 PASS A KeyframeEffectReadOnly constructed with a keyframe sequence with different easing values, but the same easing value for a given offset roundtrips
 PASS A KeyframeEffectReadOnly can be constructed with a keyframe sequence with different composite values, but the same composite value for a given offset
 PASS A KeyframeEffectReadOnly constructed with a keyframe sequence with different composite values, but the same composite value for a given offset roundtrips
diff --git a/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/KeyframeEffect/constructor.html b/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/KeyframeEffect/constructor.html
index b257257b..dfdebde2 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/KeyframeEffect/constructor.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/KeyframeEffect/constructor.html
@@ -57,7 +57,7 @@
     assert_equals(effect.getKeyframes()[0].composite, composite,
                   `resulting composite for '${composite}'`);
   }
-  for (const composite of gBadCompositeValueTests) {
+  for (const composite of gBadKeyframeCompositeValueTests) {
     assert_throws(new TypeError, () => {
       new KeyframeEffectReadOnly(target, getKeyframe(composite));
     });
@@ -76,7 +76,7 @@
     assert_equals(effect.getKeyframes()[0].composite, composite,
                   `resulting composite for '${composite}'`);
   }
-  for (const composite of gBadCompositeValueTests) {
+  for (const composite of gBadKeyframeCompositeValueTests) {
     assert_throws(new TypeError, () => {
       new KeyframeEffectReadOnly(target, getKeyframes(composite));
     });
@@ -89,17 +89,17 @@
     const effect = new KeyframeEffectReadOnly(target, {
       left: ['10px', '20px']
     }, { composite: composite });
-    assert_equals(effect.getKeyframes()[0].composite, undefined,
+    assert_equals(effect.getKeyframes()[0].composite, null,
                   `resulting composite for '${composite}'`);
   }
-  for (const composite of gBadCompositeValueTests) {
+  for (const composite of gBadOptionsCompositeValueTests) {
     assert_throws(new TypeError, () => {
       new KeyframeEffectReadOnly(target, {
         left: ['10px', '20px']
       }, { composite: composite });
     });
   }
-}, 'composite value is absent if the composite operation specified on the ' +
+}, 'composite value is null if the composite operation specified on the ' +
    'keyframe effect is being used');
 
 for (const subtest of gKeyframesTests) {
diff --git a/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-001.html b/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-001.html
index e6c5c2a..523019d2 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-001.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-001.html
@@ -180,9 +180,27 @@
     { done: true },
   ]));
   assert_frame_lists_equal(effect.getKeyframes(), [
-    { offset: null, computedOffset: 0, easing: 'linear', left: '100px' },
-    { offset: null, computedOffset: 0.5, easing: 'linear', left: '300px' },
-    { offset: null, computedOffset: 1, easing: 'linear', left: '200px' },
+    {
+      offset: null,
+      computedOffset: 0,
+      easing: 'linear',
+      left: '100px',
+      composite: null,
+    },
+    {
+      offset: null,
+      computedOffset: 0.5,
+      easing: 'linear',
+      left: '300px',
+      composite: null,
+    },
+    {
+      offset: null,
+      computedOffset: 1,
+      easing: 'linear',
+      left: '200px',
+      composite: null,
+    },
   ]);
 }, 'Keyframes are read from a custom iterator');
 
@@ -197,9 +215,27 @@
   keyframes.offset = '0.1';
   const effect = new KeyframeEffect(null, keyframes);
   assert_frame_lists_equal(effect.getKeyframes(), [
-    { offset: null, computedOffset: 0, easing: 'linear', left: '100px' },
-    { offset: null, computedOffset: 0.5, easing: 'linear', left: '300px' },
-    { offset: null, computedOffset: 1, easing: 'linear', left: '200px' },
+    {
+      offset: null,
+      computedOffset: 0,
+      easing: 'linear',
+      left: '100px',
+      composite: null,
+    },
+    {
+      offset: null,
+      computedOffset: 0.5,
+      easing: 'linear',
+      left: '300px',
+      composite: null,
+    },
+    {
+      offset: null,
+      computedOffset: 1,
+      easing: 'linear',
+      left: '200px',
+      composite: null,
+    },
   ]);
 }, '\'easing\' and \'offset\' are ignored on iterable objects');
 
@@ -211,11 +247,29 @@
     { done: true },
   ]));
   assert_frame_lists_equal(effect.getKeyframes(), [
-    { offset: null, computedOffset: 0, easing: 'linear', left: '100px',
-      top: '200px' },
-    { offset: null, computedOffset: 0.5, easing: 'linear', left: '300px' },
-    { offset: null, computedOffset: 1, easing: 'linear', left: '200px',
-      top: '100px' },
+    {
+      offset: null,
+      computedOffset: 0,
+      easing: 'linear',
+      left: '100px',
+      top: '200px',
+      composite: null,
+    },
+    {
+      offset: null,
+      computedOffset: 0.5,
+      easing: 'linear',
+      left: '300px',
+      composite: null,
+    },
+    {
+      offset: null,
+      computedOffset: 1,
+      easing: 'linear',
+      left: '200px',
+      top: '100px',
+      composite: null,
+    },
   ]);
 }, 'Keyframes are read from a custom iterator with multiple properties'
    + ' specified');
@@ -228,9 +282,27 @@
     { done: true },
   ]));
   assert_frame_lists_equal(effect.getKeyframes(), [
-    { offset: null, computedOffset: 0, easing: 'linear', left: '100px' },
-    { offset: 0.75, computedOffset: 0.75, easing: 'linear', left: '250px' },
-    { offset: null, computedOffset: 1, easing: 'linear', left: '200px' },
+    {
+      offset: null,
+      computedOffset: 0,
+      easing: 'linear',
+      left: '100px',
+      composite: null,
+    },
+    {
+      offset: 0.75,
+      computedOffset: 0.75,
+      easing: 'linear',
+      left: '250px',
+      composite: null,
+    },
+    {
+      offset: null,
+      computedOffset: 1,
+      easing: 'linear',
+      left: '200px',
+      composite: null,
+    },
   ]);
 }, 'Keyframes are read from a custom iterator with where an offset is'
    + ' specified');
@@ -253,7 +325,7 @@
     { done: true },
   ]));
   assert_frame_lists_equal(effect.getKeyframes(), [
-    { offset: null, computedOffset: 1, easing: 'linear' }
+    { offset: null, computedOffset: 1, easing: 'linear', composite: null }
   ]);
 }, 'A list of values returned from a custom iterator should be ignored');
 
@@ -270,8 +342,20 @@
   const effect = new KeyframeEffect(null, [keyframe, { height: '200px' }]);
 
   assert_frame_lists_equal(effect.getKeyframes(), [
-    { offset: null, computedOffset: 0, easing: 'linear', height: '100px' },
-    { offset: null, computedOffset: 1, easing: 'linear', height: '200px' },
+    {
+      offset: null,
+      computedOffset: 0,
+      easing: 'linear',
+      height: '100px',
+      composite: null,
+    },
+    {
+      offset: null,
+      computedOffset: 1,
+      easing: 'linear',
+      height: '200px',
+      composite: null,
+    },
   ]);
 }, 'Only enumerable properties on keyframes are read');
 
@@ -289,8 +373,20 @@
   const effect = new KeyframeEffect(null, [keyframe, { top: '200px' }]);
 
   assert_frame_lists_equal(effect.getKeyframes(), [
-    { offset: null, computedOffset: 0, easing: 'linear', top: '100px' },
-    { offset: null, computedOffset: 1, easing: 'linear', top: '200px' },
+    {
+      offset: null,
+      computedOffset: 0,
+      easing: 'linear',
+      top: '100px',
+      composite: null,
+    },
+    {
+      offset: null,
+      computedOffset: 1,
+      easing: 'linear',
+      top: '200px',
+      composite: null,
+    },
   ]);
 }, 'Only properties defined directly on keyframes are read');
 
@@ -305,8 +401,20 @@
   const effect = new KeyframeEffect(null, keyframes);
 
   assert_frame_lists_equal(effect.getKeyframes(), [
-    { offset: null, computedOffset: 0, easing: 'linear', height: '100px' },
-    { offset: null, computedOffset: 1, easing: 'linear', height: '200px' },
+    {
+      offset: null,
+      computedOffset: 0,
+      easing: 'linear',
+      height: '100px',
+      composite: null,
+    },
+    {
+      offset: null,
+      computedOffset: 1,
+      easing: 'linear',
+      height: '200px',
+      composite: null,
+    },
   ]);
 }, 'Only enumerable properties on property-indexed keyframes are read');
 
@@ -324,8 +432,20 @@
   const effect = new KeyframeEffect(null, keyframes);
 
   assert_frame_lists_equal(effect.getKeyframes(), [
-    { offset: null, computedOffset: 0, easing: 'linear', top: '100px' },
-    { offset: null, computedOffset: 1, easing: 'linear', top: '200px' },
+    {
+      offset: null,
+      computedOffset: 0,
+      easing: 'linear',
+      top: '100px',
+      composite: null,
+    },
+    {
+      offset: null,
+      computedOffset: 1,
+      easing: 'linear',
+      top: '200px',
+      composite: null,
+    },
   ]);
 }, 'Only properties defined directly on property-indexed keyframes are read');
 
diff --git a/third_party/WebKit/LayoutTests/external/wpt/web-animations/resources/keyframe-tests.js b/third_party/WebKit/LayoutTests/external/wpt/web-animations/resources/keyframe-tests.js
index 3aa1c6db..f32f5ce 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/web-animations/resources/keyframe-tests.js
+++ b/third_party/WebKit/LayoutTests/external/wpt/web-animations/resources/keyframe-tests.js
@@ -12,14 +12,18 @@
 // ------------------------------
 
 const gGoodKeyframeCompositeValueTests = [
-  'replace', 'add', 'accumulate', undefined
+  'replace', 'add', 'accumulate', null
+];
+
+const gBadKeyframeCompositeValueTests = [
+  'unrecognised', 'replace ', 'Replace'
 ];
 
 const gGoodOptionsCompositeValueTests = [
   'replace', 'add', 'accumulate'
 ];
 
-const gBadCompositeValueTests = [
+const gBadOptionsCompositeValueTests = [
   'unrecognised', 'replace ', 'Replace', null
 ];
 
@@ -50,9 +54,7 @@
   // Object.assign instead.
   const result = {};
   Object.assign(result, offset, props, { easing });
-  if (composite) {
-    result.composite = composite;
-  }
+  result.composite = composite || null;
   return result;
 };
 
diff --git a/third_party/WebKit/LayoutTests/external/wpt/web-animations/testcommon.js b/third_party/WebKit/LayoutTests/external/wpt/web-animations/testcommon.js
index 51b84dd..be3827fd 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/web-animations/testcommon.js
+++ b/third_party/WebKit/LayoutTests/external/wpt/web-animations/testcommon.js
@@ -21,10 +21,18 @@
 // times based on their precision requirements.
 if (!window.assert_times_equal) {
   window.assert_times_equal = (actual, expected, description) => {
-    assert_approx_equals(actual, expected, TIME_PRECISION, description);
+    assert_approx_equals(actual, expected, TIME_PRECISION * 2, description);
   };
 }
 
+// Allow implementations to substitute an alternative method for comparing
+// a time value based on its precision requirements with a fixed value.
+if (!window.assert_time_equals_literal) {
+  window.assert_time_equals_literal = (actual, expected, description) => {
+    assert_approx_equals(actual, expected, TIME_PRECISION, description);
+  }
+}
+
 // creates div element, appends it to the document body and
 // removes the created element during test cleanup
 function createDiv(test, doc) {
diff --git a/third_party/WebKit/LayoutTests/external/wpt/web-animations/timing-model/animation-effects/active-time.html b/third_party/WebKit/LayoutTests/external/wpt/web-animations/timing-model/animation-effects/active-time.html
index 3e3b528..a2feb23 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/web-animations/timing-model/animation-effects/active-time.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/web-animations/timing-model/animation-effects/active-time.html
@@ -25,19 +25,19 @@
 test(t => {
   const anim = createDiv(t).animate(null, 1000);
   anim.currentTime = 500;
-  assert_times_equal(anim.effect.getComputedTiming().progress, 0.5);
+  assert_time_equals_literal(anim.effect.getComputedTiming().progress, 0.5);
 }, 'Active time in active phase and no start delay is the local time');
 
 test(t => {
   const anim = createDiv(t).animate(null, { duration: 1000, delay: 500 });
   anim.currentTime = 1000;
-  assert_times_equal(anim.effect.getComputedTiming().progress, 0.5);
+  assert_time_equals_literal(anim.effect.getComputedTiming().progress, 0.5);
 }, 'Active time in active phase and positive start delay is the local time'
    + ' minus the start delay');
 
 test(t => {
   const anim = createDiv(t).animate(null, { duration: 1000, delay: -500 });
-  assert_times_equal(anim.effect.getComputedTiming().progress, 0.5);
+  assert_time_equals_literal(anim.effect.getComputedTiming().progress, 0.5);
 }, 'Active time in active phase and negative start delay is the local time'
    + ' minus the start delay');
 
@@ -58,7 +58,7 @@
                                             fill: 'forwards' });
   anim.finish();
   assert_equals(anim.effect.getComputedTiming().currentIteration, 2);
-  assert_times_equal(anim.effect.getComputedTiming().progress, 0.3);
+  assert_time_equals_literal(anim.effect.getComputedTiming().progress, 0.3);
 }, 'Active time in after phase with forwards fill is the active duration');
 
 test(t => {
@@ -79,7 +79,7 @@
                                             fill: 'forwards' });
   anim.finish();
   assert_equals(anim.effect.getComputedTiming().currentIteration, 2);
-  assert_times_equal(anim.effect.getComputedTiming().progress, 0.3);
+  assert_time_equals_literal(anim.effect.getComputedTiming().progress, 0.3);
 }, 'Active time in after phase with forwards fill and positive end delay'
    + ' is the active duration');
 
@@ -91,7 +91,7 @@
                                             fill: 'forwards' });
   anim.finish();
   assert_equals(anim.effect.getComputedTiming().currentIteration, 1);
-  assert_times_equal(anim.effect.getComputedTiming().progress, 0.5);
+  assert_time_equals_literal(anim.effect.getComputedTiming().progress, 0.5);
 }, 'Active time in after phase with forwards fill and negative end delay'
    + ' is the active duration + end delay');
 
@@ -127,7 +127,7 @@
                                             fill: 'both' });
   anim.finish();
   assert_equals(anim.effect.getComputedTiming().currentIteration, 2);
-  assert_times_equal(anim.effect.getComputedTiming().progress, 0.3);
+  assert_time_equals_literal(anim.effect.getComputedTiming().progress, 0.3);
 }, 'Active time in after phase with \'both\' fill is the active duration');
 
 test(t => {
diff --git a/third_party/WebKit/LayoutTests/external/wpt/web-animations/timing-model/animation-effects/simple-iteration-progress-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/web-animations/timing-model/animation-effects/simple-iteration-progress-expected.txt
index 823352a..9648069 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/web-animations/timing-model/animation-effects/simple-iteration-progress-expected.txt
+++ b/third_party/WebKit/LayoutTests/external/wpt/web-animations/timing-model/animation-effects/simple-iteration-progress-expected.txt
@@ -21,7 +21,7 @@
 PASS Test fractional iterations: iterations:3.5 iterationStart:0 duration:100 delay:1 fill:both
 PASS Test fractional iterations: iterations:3.5 iterationStart:0 duration:Infinity delay:1 fill:both
 PASS Test fractional iterations: iterations:3.5 iterationStart:2.5 duration:0 delay:1 fill:both
-FAIL Test fractional iterations: iterations:3.5 iterationStart:2.5 duration:100 delay:1 fill:both assert_approx_equals: Value of progress in the after phase expected 1 +/- 0.0005 but got 5.551115123125783e-16
+FAIL Test fractional iterations: iterations:3.5 iterationStart:2.5 duration:100 delay:1 fill:both assert_approx_equals: Value of progress in the after phase expected 1 +/- 0.001 but got 5.551115123125783e-16
 PASS Test fractional iterations: iterations:3.5 iterationStart:2.5 duration:Infinity delay:1 fill:both
 PASS Test fractional iterations: iterations:3.5 iterationStart:3 duration:0 delay:1 fill:both
 PASS Test fractional iterations: iterations:3.5 iterationStart:3 duration:100 delay:1 fill:both
@@ -29,7 +29,7 @@
 PASS Test infinity iterations: iterations:Infinity iterationStart:0 duration:0 delay:1 fill:both
 PASS Test infinity iterations: iterations:Infinity iterationStart:0 duration:100 delay:1 fill:both
 PASS Test infinity iterations: iterations:Infinity iterationStart:0 duration:Infinity delay:1 fill:both
-FAIL Test infinity iterations: iterations:Infinity iterationStart:2.5 duration:0 delay:1 fill:both assert_approx_equals: Value of progress in the after phase expected 0.5 +/- 0.0005 but got 1
+FAIL Test infinity iterations: iterations:Infinity iterationStart:2.5 duration:0 delay:1 fill:both assert_approx_equals: Value of progress in the after phase expected 0.5 +/- 0.001 but got 1
 PASS Test infinity iterations: iterations:Infinity iterationStart:2.5 duration:100 delay:1 fill:both
 PASS Test infinity iterations: iterations:Infinity iterationStart:2.5 duration:Infinity delay:1 fill:both
 PASS Test infinity iterations: iterations:Infinity iterationStart:3 duration:0 delay:1 fill:both
@@ -40,13 +40,13 @@
 PASS Test end delay: duration:100 delay:1 fill:both endDelay:-100
 PASS Test end delay: duration:100 delay:1 fill:both endDelay:-200
 PASS Test end delay: iterationStart:0.5 duration:100 delay:1 fill:both endDelay:50
-FAIL Test end delay: iterationStart:0.5 duration:100 delay:1 fill:both endDelay:-50 assert_approx_equals: Value of progress in the after phase expected 0 +/- 0.0005 but got 1
+FAIL Test end delay: iterationStart:0.5 duration:100 delay:1 fill:both endDelay:-50 assert_approx_equals: Value of progress in the after phase expected 0 +/- 0.001 but got 1
 PASS Test end delay: iterationStart:0.5 duration:100 delay:1 fill:both endDelay:-100
-FAIL Test end delay: iterations:2 duration:100 delay:1 fill:both endDelay:-100 assert_approx_equals: Value of progress in the after phase expected 0 +/- 0.0005 but got 1
+FAIL Test end delay: iterations:2 duration:100 delay:1 fill:both endDelay:-100 assert_approx_equals: Value of progress in the after phase expected 0 +/- 0.001 but got 1
 PASS Test end delay: iterations:1 iterationStart:2 duration:100 delay:1 fill:both endDelay:-50
-FAIL Test end delay: iterations:1 iterationStart:2 duration:100 delay:1 fill:both endDelay:-100 assert_approx_equals: Value of progress in the after phase expected 0 +/- 0.0005 but got 1
+FAIL Test end delay: iterations:1 iterationStart:2 duration:100 delay:1 fill:both endDelay:-100 assert_approx_equals: Value of progress in the after phase expected 0 +/- 0.001 but got 1
 PASS Test negative playback rate: duration:1 delay:1 fill:both playbackRate:-1
-FAIL Test negative playback rate: duration:0 delay:1 fill:both playbackRate:-1 assert_approx_equals: Value of progress in the before phase expected 0 +/- 0.0005 but got 1
+FAIL Test negative playback rate: duration:0 delay:1 fill:both playbackRate:-1 assert_approx_equals: Value of progress in the before phase expected 0 +/- 0.001 but got 1
 PASS Test negative playback rate: duration:0 iterations:0 delay:1 fill:both playbackRate:-1
 Harness: the test ran to completion.
 
diff --git a/third_party/WebKit/LayoutTests/external/wpt/web-animations/timing-model/animations/current-time.html b/third_party/WebKit/LayoutTests/external/wpt/web-animations/timing-model/animations/current-time.html
index d2f5075..08f90d9f 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/web-animations/timing-model/animations/current-time.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/web-animations/timing-model/animations/current-time.html
@@ -68,7 +68,7 @@
 
   return animation.ready.then(() => waitForAnimationFrames(1))
   .then(() => {
-    assert_times_equal(animation.currentTime, 0);
+    assert_time_equals_literal(animation.currentTime, 0);
   });
 }, 'The current time does not progress if playback rate is 0');
 
diff --git a/third_party/WebKit/LayoutTests/external/wpt/web-animations/timing-model/animations/playing-an-animation.html b/third_party/WebKit/LayoutTests/external/wpt/web-animations/timing-model/animations/playing-an-animation.html
index 2beed47..10641920 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/web-animations/timing-model/animations/playing-an-animation.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/web-animations/timing-model/animations/playing-an-animation.html
@@ -14,26 +14,26 @@
 test(t => {
   const animation = createDiv(t).animate(null, 100 * MS_PER_SEC);
   animation.currentTime = 1 * MS_PER_SEC;
-  assert_times_equal(animation.currentTime, 1 * MS_PER_SEC);
+  assert_time_equals_literal(animation.currentTime, 1 * MS_PER_SEC);
   animation.play();
-  assert_times_equal(animation.currentTime, 1 * MS_PER_SEC);
+  assert_time_equals_literal(animation.currentTime, 1 * MS_PER_SEC);
 }, 'Playing a running animation leaves the current time unchanged');
 
 test(t => {
   const animation = createDiv(t).animate(null, 100 * MS_PER_SEC);
   animation.finish();
-  assert_times_equal(animation.currentTime, 100 * MS_PER_SEC);
+  assert_time_equals_literal(animation.currentTime, 100 * MS_PER_SEC);
   animation.play();
-  assert_times_equal(animation.currentTime, 0);
+  assert_time_equals_literal(animation.currentTime, 0);
 }, 'Playing a finished animation seeks back to the start');
 
 test(t => {
   const animation = createDiv(t).animate(null, 100 * MS_PER_SEC);
   animation.playbackRate = -1;
   animation.currentTime = 0;
-  assert_times_equal(animation.currentTime, 0);
+  assert_time_equals_literal(animation.currentTime, 0);
   animation.play();
-  assert_times_equal(animation.currentTime, 100 * MS_PER_SEC);
+  assert_time_equals_literal(animation.currentTime, 100 * MS_PER_SEC);
 }, 'Playing a finished and reversed animation seeks to end');
 
 test(t => {
diff --git a/third_party/WebKit/LayoutTests/external/wpt/web-animations/timing-model/animations/set-the-animation-start-time.html b/third_party/WebKit/LayoutTests/external/wpt/web-animations/timing-model/animations/set-the-animation-start-time.html
index 1526be0..d2a311d 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/web-animations/timing-model/animations/set-the-animation-start-time.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/web-animations/timing-model/animations/set-the-animation-start-time.html
@@ -80,9 +80,9 @@
 
   // If we set the start time, however, we should clear the hold time.
   animation.startTime = document.timeline.currentTime - 2000;
-  assert_times_equal(animation.currentTime, 2000,
-                     'The current time is calculated from the start time,'
-                     + ' not the hold time');
+  assert_time_equals_literal(animation.currentTime, 2000,
+                             'The current time is calculated from the start'
+                             + ' time, not the hold time');
 
   // Sanity check
   assert_equals(animation.playState, 'running',
@@ -99,13 +99,14 @@
   // are resolved).
   animation.startTime = document.timeline.currentTime - 1000;
   assert_equals(animation.playState, 'running');
-  assert_times_equal(animation.currentTime, 1000,
-                     'Current time is resolved for a running animation')
+  assert_time_equals_literal(animation.currentTime, 1000,
+                             'Current time is resolved for a running animation');
 
   // Clear start time
   animation.startTime = null;
-  assert_times_equal(animation.currentTime, 1000,
-                     'Hold time is set after start time is made unresolved');
+  assert_time_equals_literal(animation.currentTime, 1000,
+                             'Hold time is set after start time is made'
+                             + ' unresolved');
   assert_equals(animation.playState, 'paused',
                 'Animation reports it is paused after setting an unresolved'
                 + ' start time');
diff --git a/third_party/WebKit/LayoutTests/external/wpt/web-animations/timing-model/animations/set-the-timeline-of-an-animation.html b/third_party/WebKit/LayoutTests/external/wpt/web-animations/timing-model/animations/set-the-timeline-of-an-animation.html
index 8a44213..24f201d 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/web-animations/timing-model/animations/set-the-timeline-of-an-animation.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/web-animations/timing-model/animations/set-the-timeline-of-an-animation.html
@@ -26,7 +26,7 @@
   animation.timeline = document.timeline;
 
   assert_equals(animation.playState, 'paused');
-  assert_times_equal(animation.currentTime, 50 * MS_PER_SEC);
+  assert_time_equals_literal(animation.currentTime, 50 * MS_PER_SEC);
 }, 'After setting timeline on paused animation it is still paused');
 
 test(t => {
@@ -39,7 +39,7 @@
   animation.timeline = document.timeline;
 
   assert_equals(animation.playState, 'paused');
-  assert_times_equal(animation.currentTime, 200 * MS_PER_SEC);
+  assert_time_equals_literal(animation.currentTime, 200 * MS_PER_SEC);
 }, 'After setting timeline on animation paused outside active interval'
    + ' it is still paused');
 
@@ -141,7 +141,7 @@
 
   assert_false(animation.pending);
   assert_equals(animation.playState, 'paused');
-  assert_times_equal(animation.currentTime, 50 * MS_PER_SEC);
+  assert_time_equals_literal(animation.currentTime, 50 * MS_PER_SEC);
 }, 'After clearing timeline on paused animation it is still paused');
 
 test(t => {
diff --git a/third_party/WebKit/LayoutTests/external/wpt/webrtc/RTCPeerConnection-getStats.https-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/webrtc/RTCPeerConnection-getStats.https-expected.txt
index 3a80c7f..2dd58006 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/webrtc/RTCPeerConnection-getStats.https-expected.txt
+++ b/third_party/WebKit/LayoutTests/external/wpt/webrtc/RTCPeerConnection-getStats.https-expected.txt
@@ -11,6 +11,6 @@
 FAIL getStats() with no argument should return stats for no-stream tracks assert_true: Expect stats report to have stats object with id RTCMediaStreamTrack_sender_5 expected true got false
 FAIL getStats() on track associated with RtpSender should return stats report containing outbound-rtp stats promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'getStats' on 'RTCPeerConnection': The callback provided as parameter 1 is not a function."
 FAIL getStats() on track associated with RtpReceiver should return stats report containing inbound-rtp stats pc.addTransceiver is not a function
-FAIL getStats() with connected peer connections having tracks and data channel should return all mandatory to implement stats assert_unreached: test failed with error: Error: assert_equals: Expect dictionary.issuerCertificateId to be string expected "string" but got "undefined" Reached unreachable code
+FAIL getStats() with connected peer connections having tracks and data channel should return all mandatory to implement stats assert_unreached: test failed with error: Error: assert_true: Expect dictionary.dataChannelIdentifier to be integer expected true got false Reached unreachable code
 Harness: the test ran to completion.
 
diff --git a/third_party/WebKit/LayoutTests/external/wpt/webrtc/RTCStats-helper.js b/third_party/WebKit/LayoutTests/external/wpt/webrtc/RTCStats-helper.js
index c2be1b3..e91b40b6 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/webrtc/RTCStats-helper.js
+++ b/third_party/WebKit/LayoutTests/external/wpt/webrtc/RTCStats-helper.js
@@ -178,7 +178,7 @@
 
   assert_optional_unsigned_int_field(stats, 'firCount');
   assert_optional_unsigned_int_field(stats, 'pliCount');
-  assert_unsigned_int_field(stats, 'nackCount');
+  assert_optional_unsigned_int_field(stats, 'nackCount');
   assert_optional_unsigned_int_field(stats, 'sliCount');
   assert_optional_unsigned_int_field(stats, 'qpSum');
 }
@@ -211,15 +211,15 @@
   validateRtcStats(statsReport, stats);
 
   assert_unsigned_int_field(stats, 'payloadType');
-  assert_enum_field(stats, 'codecType', ['encode', 'decode']);
+  assert_optional_enum_field(stats, 'codecType', ['encode', 'decode']);
 
   validateOptionalIdField(statsReport, stats, 'transportId', 'transport');
 
   assert_optional_string_field(stats, 'mimeType');
   assert_unsigned_int_field(stats, 'clockRate');
-  assert_unsigned_int_field(stats, 'channels');
+  assert_optional_unsigned_int_field(stats, 'channels');
 
-  assert_string_field(stats, 'sdpFmtpLine');
+  assert_optional_string_field(stats, 'sdpFmtpLine');
   assert_optional_string_field(stats, 'implementation');
 }
 
@@ -365,7 +365,9 @@
 
   assert_optional_number_field(stats, 'lastPacketSentTimestamp');
   assert_optional_number_field(stats, 'targetBitrate');
-  assert_unsigned_int_field(stats, 'framesEncoded');
+  if (stats['mediaType'] == 'video') {
+    assert_unsigned_int_field(stats, 'framesEncoded');
+  }
   assert_optional_number_field(stats, 'totalEncodeTime');
   assert_optional_number_field(stats, 'averageRTCPInterval');
 }
@@ -526,35 +528,38 @@
 
   assert_optional_enum_field(stats, 'kind', ['audio', 'video']);
   assert_optional_number_field(stats, 'estimatedPlayoutTimestamp');
+  if (stats['kind'] === 'video') {
+    assert_unsigned_int_field(stats, 'frameWidth');
+    assert_unsigned_int_field(stats, 'frameHeight');
+    assert_number_field(stats, 'framesPerSecond');
+    if (stats['framesSent']) {
+      assert_optional_unsigned_int_field(stats, 'framesCaptured');
+      assert_unsigned_int_field(stats, 'framesSent');
+      assert_optional_unsigned_int_field(stats, 'keyFramesSent');
+    } else {
+      assert_unsigned_int_field(stats, 'framesReceived');
+      assert_optional_unsigned_int_field(stats, 'keyFramesReceived');
+      assert_unsigned_int_field(stats, 'framesDecoded');
+      assert_unsigned_int_field(stats, 'framesDropped');
+      assert_unsigned_int_field(stats, 'framesCorrupted');
+    }
 
-  assert_unsigned_int_field(stats, 'frameWidth');
-  assert_unsigned_int_field(stats, 'frameHeight');
-  assert_number_field(stats, 'framesPerSecond');
+    assert_optional_unsigned_int_field(stats, 'partialFramesLost');
+    assert_optional_unsigned_int_field(stats, 'fullFramesLost');
+  } else {
+    assert_number_field(stats, 'audioLevel');
+    assert_optional_number_field(stats, 'totalAudioEnergy');
+    assert_optional_boolean_field(stats, 'voiceActivityFlag');
+    assert_optional_number_field(stats, 'echoReturnLoss');
+    assert_optional_number_field(stats, 'echoReturnLossEnhancement');
 
-  assert_optional_unsigned_int_field(stats, 'framesCaptured');
-  assert_unsigned_int_field(stats, 'framesSent');
-  assert_optional_unsigned_int_field(stats, 'keyFramesSent');
-  assert_unsigned_int_field(stats, 'framesReceived');
-  assert_optional_unsigned_int_field(stats, 'keyFramesReceived');
-  assert_unsigned_int_field(stats, 'framesDecoded');
-  assert_unsigned_int_field(stats, 'framesDropped');
-  assert_unsigned_int_field(stats, 'framesCorrupted');
-
-  assert_optional_unsigned_int_field(stats, 'partialFramesLost');
-  assert_optional_unsigned_int_field(stats, 'fullFramesLost');
-
-  assert_number_field(stats, 'audioLevel');
-  assert_optional_number_field(stats, 'totalAudioEnergy');
-  assert_optional_boolean_field(stats, 'voiceActivityFlag');
-  assert_optional_number_field(stats, 'echoReturnLoss');
-  assert_optional_number_field(stats, 'echoReturnLossEnhancement');
-
-  assert_optional_unsigned_int_field(stats, 'totalSamplesSent');
-  assert_optional_unsigned_int_field(stats, 'totalSamplesReceived');
-  assert_optional_number_field(stats, 'totalSamplesDuration');
-  assert_optional_unsigned_int_field(stats, 'concealedSamples');
-  assert_optional_unsigned_int_field(stats, 'concealmentEvents');
-  assert_optional_number_field(stats, 'jitterBufferDelay');
+    assert_optional_unsigned_int_field(stats, 'totalSamplesSent');
+    assert_optional_unsigned_int_field(stats, 'totalSamplesReceived');
+    assert_optional_number_field(stats, 'totalSamplesDuration');
+    assert_optional_unsigned_int_field(stats, 'concealedSamples');
+    assert_optional_unsigned_int_field(stats, 'concealmentEvents');
+    assert_optional_number_field(stats, 'jitterBufferDelay');
+  }
 
   assert_optional_enum_field(stats, 'priority',
     ['very-low', 'low', 'medium', 'high']);
@@ -651,7 +656,8 @@
   assert_unsigned_int_field(stats, 'bytesSent');
   assert_unsigned_int_field(stats, 'bytesReceived');
 
-  validateIdField(statsReport, stats, 'rtcpTransportStatsId', 'transport');
+  validateOptionalIdField(statsReport, stats, 'rtcpTransportStatsId',
+                          'transport');
 
   assert_optional_enum_field(stats, 'iceRole',
     ['controlling', 'controlled']);
@@ -721,7 +727,7 @@
     ['host', 'srflx', 'prflx', 'relay']);
 
   assert_int_field(stats, 'priority');
-  assert_string_field(stats, 'url');
+  assert_optional_string_field(stats, 'url');
   assert_optional_string_field(stats, 'relayProtocol');
   assert_optional_boolean_field(stats, 'deleted');
 }
@@ -788,7 +794,7 @@
   assert_optional_unsigned_int_field(stats, 'packetsSent');
   assert_optional_unsigned_int_field(stats, 'packetsReceived');
   assert_unsigned_int_field(stats, 'bytesSent');
-  assert_unsigned_int_field(stats, 'byteReceived');
+  assert_unsigned_int_field(stats, 'bytesReceived');
 
   assert_optional_number_field(stats, 'lastPacketSentTimestamp');
   assert_optional_number_field(stats, 'lastPacketReceivedTimestamp');
@@ -834,5 +840,5 @@
   assert_string_field(stats, 'fingerprint');
   assert_string_field(stats, 'fingerprintAlgorithm');
   assert_string_field(stats, 'base64Certificate');
-  assert_string_field(stats, 'issuerCertificateId');
+  assert_optional_string_field(stats, 'issuerCertificateId');
 }
diff --git a/third_party/WebKit/LayoutTests/fast/forms/autocapitalize.html b/third_party/WebKit/LayoutTests/fast/forms/autocapitalize.html
index 4b6092b..5bffddd 100644
--- a/third_party/WebKit/LayoutTests/fast/forms/autocapitalize.html
+++ b/third_party/WebKit/LayoutTests/fast/forms/autocapitalize.html
@@ -1,5 +1,6 @@
 <!DOCTYPE html>
 <html>
+<link rel="help" href="https://html.spec.whatwg.org/multipage/interaction.html#autocapitalization">
 <body>
 <script src="../../resources/testharness.js"></script>
 <script src="../../resources/testharnessreport.js"></script>
@@ -7,15 +8,20 @@
 
 test(function() {
     assert_true('autocapitalize' in document.createElement('input'));
-}, "Test that the autocapitalize is avaible on HTMLInputElement.")
+}, "Test that the autocapitalize is available on HTMLInputElement.")
 
 test(function() {
     assert_true('autocapitalize' in document.createElement('textarea'));
-}, "Test that the autocapitalize is avaible on HTMLTextAreaElement.")
+}, "Test that the autocapitalize is available on HTMLTextAreaElement.")
+
+test(function() {
+    assert_true('autocapitalize' in document.createElement('div'));
+}, "Test that the autocapitalize is available on div.")
 
 test(function() {
   var elements = [ document.createElement('input'),
-                   document.createElement('textarea') ];
+                   document.createElement('textarea'),
+                   document.createElement('div') ];
 
   elements.forEach(function(e) {
     e.autocapitalize = 'on';
@@ -28,25 +34,34 @@
 
 test(function() {
   var elements = [ document.createElement('input'),
-                   document.createElement('textarea') ];
+                   document.createElement('textarea'),
+                   document.createElement('div') ];
   var knownValues = [ 'none', 'characters', 'words', 'sentences' ];
 
-  var defaultValue = 'sentences';
   elements.forEach(function(e) {
     // Default value.
-    assert_equals(e.autocapitalize, defaultValue);
+    assert_equals(e.autocapitalize, '');
+
+    // Empty value.
+    e.autocapitalize = '';
+    assert_equals(e.autocapitalize, '');
+    assert_equals(e.getAttribute('autocapitalize'), '');
+    e.setAttribute('autocapitalize', '');
+    assert_equals(e.autocapitalize, '');
+    assert_equals(e.getAttribute('autocapitalize'), '');
+    assert_equals(e.autocapitalize, '');
 
     // Invalid value.
     e.autocapitalize = 'foo';
-    assert_equals(e.autocapitalize, defaultValue);
+    assert_equals(e.autocapitalize, 'sentences');
     assert_equals(e.getAttribute('autocapitalize'), 'foo');
     e.setAttribute('autocapitalize', 'bar');
-    assert_equals(e.autocapitalize, defaultValue);
+    assert_equals(e.autocapitalize, 'sentences');
     assert_equals(e.getAttribute('autocapitalize'), 'bar');
 
     // Default value.
     e.removeAttribute('autocapitalize');
-    assert_equals(defaultValue, e.autocapitalize);
+    assert_equals(e.autocapitalize, '');
     assert_equals(e.getAttribute('autocapitalize'), null);
 
     // Case insensitive.
@@ -74,26 +89,50 @@
 }, "Test reflection of autocapitalize.");
 
 test(function() {
-  var testData = [
-    // Types with sentences as default value.
-    { type: 'text', value: 'sentences' },
-    { type: 'search', value: 'sentences' },
-    // Types supporting the features with none as default value.
-    { type: 'email', value: 'none' },
-    { type: 'url', value: 'none' },
-    { type: 'tel', value: 'none' },
-    // Other types that do not support the value.
-    { type: 'number', value: 'none' },
-    { type: 'date', value: 'none' },
-    { type: 'color', value: 'none' }
-  ];
+var testData = [ 'text',
+                 'search',
+                 'email',
+                 'url',
+                 'tel',
+                 'number',
+                 'date',
+                 'color',
+                 'password' ];
 
   testData.forEach(function(data) {
-    var input = document.createElement('input');
-    input.type = data.type;
-    assert_equals(input.autocapitalize, data.value);
+    const input = document.createElement('input');
+    input.type = data;
+    assert_equals(input.autocapitalize, '');
+
+    // Verify that wrapping the input element in a form doesn't change the
+    // defaults.
+    const form = document.createElement('form');
+    form.appendChild(input);
+    assert_equals(input.autocapitalize, '');
   });
-}, "Test the default value depending on <input> type.")
+}, "Test that the IDL attribute returns the empty string if the content "
++ "attribute is not set.")
+
+test(function() {
+  const testData = [ 'text',
+                     'search',
+                     'email',
+                     'url',
+                     'tel',
+                     'number',
+                     'date',
+                     'color',
+                     'password' ];
+
+  testData.forEach(function(data) {
+    const input = document.createElement('input');
+    input.setAttribute('type', data);
+    input.setAttribute('autocapitalize', 'sentences');
+
+    assert_equals(input.autocapitalize, 'sentences');
+  });
+}, "Verify that even input types that are never autocapitalized support the "
++ "IDL interface.")
 
 </script>
 </body>
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/elements/dom-search-crash.js b/third_party/WebKit/LayoutTests/http/tests/devtools/elements/dom-search-crash.js
index 87f22f8..3e7b290 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/elements/dom-search-crash.js
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/elements/dom-search-crash.js
@@ -11,7 +11,7 @@
 
   TestRunner.runTestSuite([
     function testSetUp(next) {
-      TestRunner.domModel.requestDocument(next);
+      TestRunner.domModel.requestDocument().then(next);
     },
 
     function testNoCrash(next) {
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/elements/elements-panel-search.js b/third_party/WebKit/LayoutTests/http/tests/devtools/elements/elements-panel-search.js
index 800c969..9f9f09e1 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/elements/elements-panel-search.js
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/elements/elements-panel-search.js
@@ -72,7 +72,7 @@
   }
 
   function setUp(next) {
-    TestRunner.domModel.requestDocument(step2);
+    TestRunner.domModel.requestDocument().then(step2);
 
     function step2() {
       TestRunner.evaluateInPage('initializeShadowDOM()', next);
diff --git a/third_party/WebKit/LayoutTests/http/tests/navigation/image-css-load-in-subframe-unload-handler-expected.txt b/third_party/WebKit/LayoutTests/http/tests/navigation/image-css-load-in-subframe-unload-handler-expected.txt
new file mode 100644
index 0000000..c2541f4
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/navigation/image-css-load-in-subframe-unload-handler-expected.txt
@@ -0,0 +1 @@
+PASS if no crash.
diff --git a/third_party/WebKit/LayoutTests/http/tests/navigation/image-css-load-in-subframe-unload-handler.html b/third_party/WebKit/LayoutTests/http/tests/navigation/image-css-load-in-subframe-unload-handler.html
new file mode 100644
index 0000000..f2f4614f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/navigation/image-css-load-in-subframe-unload-handler.html
@@ -0,0 +1,14 @@
+<html>
+<body>
+PASS if no crash.
+<iframe id="i" name="i" src="resources/image-css-load-in-subframe-unload-handler-helper.html"></iframe>
+<script>
+if (window.testRunner)
+  testRunner.dumpAsText();
+
+window.onload = function() {
+  document.getElementById("i").remove();
+}
+</script>
+</body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/http/tests/navigation/resources/image-css-load-in-subframe-unload-handler-helper.html b/third_party/WebKit/LayoutTests/http/tests/navigation/resources/image-css-load-in-subframe-unload-handler-helper.html
new file mode 100644
index 0000000..e3eb500
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/navigation/resources/image-css-load-in-subframe-unload-handler-helper.html
@@ -0,0 +1,10 @@
+<html>
+<body>
+<script>
+window.onunload = function() {
+  document.body.style = "background-image: url('this-shouldnt-crash.jpg')";
+  document.body.offsetLeft;
+}
+</script>
+</body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/media/W3C/audio/canPlayType/canPlayType_application_octet_stream-expected.txt b/third_party/WebKit/LayoutTests/media/W3C/audio/canPlayType/canPlayType_application_octet_stream-expected.txt
deleted file mode 100644
index f864955c..0000000
--- a/third_party/WebKit/LayoutTests/media/W3C/audio/canPlayType/canPlayType_application_octet_stream-expected.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-audio.canPlayType() - application/octet-stream must always return the empty string
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS true is true
-PASS successfullyParsed is true
-
-TEST COMPLETE
-spec reference
-
-
diff --git a/third_party/WebKit/LayoutTests/media/W3C/audio/canPlayType/canPlayType_application_octet_stream.html b/third_party/WebKit/LayoutTests/media/W3C/audio/canPlayType/canPlayType_application_octet_stream.html
deleted file mode 100644
index 648d88f1..0000000
--- a/third_party/WebKit/LayoutTests/media/W3C/audio/canPlayType/canPlayType_application_octet_stream.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!doctype html>
-<html>
- <head>
-  <title>audio.canPlayType() - application/octet-stream must always return the empty string</title>
-  <script src="../../w3cwrapper.js"></script>
- </head>
- <body>
-  <p><a href="http://dev.w3.org/html5/spec/Overview.html#dom-navigator-canplaytype">spec reference</a></p>
-  <audio id="a">
-  </audio>
-  <div id="log"></div>
-  <script>
-test(function() {
- assert_true(
-  document.getElementById("a").canPlayType("application/octet-stream") == "",
-  "audioElement.canPlayType('application/octet-stream') should return the empty string");
-});
-  </script>
- </body>
-</html>
diff --git a/third_party/WebKit/LayoutTests/media/W3C/audio/canPlayType/canPlayType_application_octet_stream_with_codecs_1-expected.txt b/third_party/WebKit/LayoutTests/media/W3C/audio/canPlayType/canPlayType_application_octet_stream_with_codecs_1-expected.txt
deleted file mode 100644
index 4852bb13..0000000
--- a/third_party/WebKit/LayoutTests/media/W3C/audio/canPlayType/canPlayType_application_octet_stream_with_codecs_1-expected.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-audio.canPlayType() - can never play application/octet-stream with a codecs parameter
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS "" is ""
-PASS successfullyParsed is true
-
-TEST COMPLETE
-spec reference
-
-
diff --git a/third_party/WebKit/LayoutTests/media/W3C/audio/canPlayType/canPlayType_application_octet_stream_with_codecs_1.html b/third_party/WebKit/LayoutTests/media/W3C/audio/canPlayType/canPlayType_application_octet_stream_with_codecs_1.html
deleted file mode 100644
index 5c1767d..0000000
--- a/third_party/WebKit/LayoutTests/media/W3C/audio/canPlayType/canPlayType_application_octet_stream_with_codecs_1.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<!doctype html>
-<html>
- <head>
-  <title>audio.canPlayType() - can never play application/octet-stream with a codecs parameter</title>
-  <script src="../../w3cwrapper.js"></script>
- </head>
- <body>
-  <p><a href="http://dev.w3.org/html5/spec/Overview.html#mime-types">spec reference</a></p>
-  <audio id="a">
-  </audio>
-  <div id="log"></div>
-  <script>
-test(function() {
- assert_equals(
-  document.getElementById("a").canPlayType('application/octet-stream; codecs="vorbis"'),
-  "",
-  "audioElement.canPlayType('application/octet-stream; codecs=...') should always return the empty string");
-});
-  </script>
- </body>
-</html>
diff --git a/third_party/WebKit/LayoutTests/media/W3C/audio/canPlayType/canPlayType_application_octet_stream_with_codecs_2-expected.txt b/third_party/WebKit/LayoutTests/media/W3C/audio/canPlayType/canPlayType_application_octet_stream_with_codecs_2-expected.txt
deleted file mode 100644
index 4852bb13..0000000
--- a/third_party/WebKit/LayoutTests/media/W3C/audio/canPlayType/canPlayType_application_octet_stream_with_codecs_2-expected.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-audio.canPlayType() - can never play application/octet-stream with a codecs parameter
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS "" is ""
-PASS successfullyParsed is true
-
-TEST COMPLETE
-spec reference
-
-
diff --git a/third_party/WebKit/LayoutTests/media/W3C/audio/canPlayType/canPlayType_application_octet_stream_with_codecs_2.html b/third_party/WebKit/LayoutTests/media/W3C/audio/canPlayType/canPlayType_application_octet_stream_with_codecs_2.html
deleted file mode 100644
index 1abfe73..0000000
--- a/third_party/WebKit/LayoutTests/media/W3C/audio/canPlayType/canPlayType_application_octet_stream_with_codecs_2.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<!doctype html>
-<html>
- <head>
-  <title>audio.canPlayType() - can never play application/octet-stream with a codecs parameter</title>
-  <script src="../../w3cwrapper.js"></script>
- </head>
- <body>
-  <p><a href="http://dev.w3.org/html5/spec/Overview.html#a-type-that-the-user-agent-knows-it-cannot-render">spec reference</a></p>
-  <audio id="a">
-  </audio>
-  <div id="log"></div>
-  <script>
-test(function() {
- assert_equals(
-  document.getElementById("a").canPlayType('application/octet-stream; codecs="mp4a.40.2"'),
-  "",
-  "audioElement.canPlayType('application/octet-stream; codecs=...') should always return the empty string");
-});
-  </script>
- </body>
-</html>
diff --git a/third_party/WebKit/LayoutTests/media/W3C/audio/canPlayType/canPlayType_bogus_type-expected.txt b/third_party/WebKit/LayoutTests/media/W3C/audio/canPlayType/canPlayType_bogus_type-expected.txt
deleted file mode 100644
index 3fdc32f..0000000
--- a/third_party/WebKit/LayoutTests/media/W3C/audio/canPlayType/canPlayType_bogus_type-expected.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-audio.canPlayType() - bogus format
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS "" is ""
-PASS successfullyParsed is true
-
-TEST COMPLETE
-spec reference
-
-
diff --git a/third_party/WebKit/LayoutTests/media/W3C/audio/canPlayType/canPlayType_bogus_type.html b/third_party/WebKit/LayoutTests/media/W3C/audio/canPlayType/canPlayType_bogus_type.html
deleted file mode 100644
index 011da44..0000000
--- a/third_party/WebKit/LayoutTests/media/W3C/audio/canPlayType/canPlayType_bogus_type.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<!doctype html>
-<html>
- <head>
-  <title>audio.canPlayType() - bogus format</title>
-  <script src="../../w3cwrapper.js"></script>
- </head>
- <body>
-  <p><a href="http://dev.w3.org/html5/spec/Overview.html#dom-navigator-canplaytype">spec reference</a></p>
-  <audio id="a">
-  </audio>
-  <div id="log"></div>
-  <script>
-test(function() {
- assert_equals(
-  document.getElementById("a").canPlayType("application/marks-fantasmagorical-format"),
-  "",
-  "audioElement.canPlayType() should return the empty string on a bogus format");
-});
-  </script>
- </body>
-</html>
diff --git a/third_party/WebKit/LayoutTests/media/W3C/audio/canPlayType/canPlayType_method_exists-expected.txt b/third_party/WebKit/LayoutTests/media/W3C/audio/canPlayType/canPlayType_method_exists-expected.txt
deleted file mode 100644
index c82c936..0000000
--- a/third_party/WebKit/LayoutTests/media/W3C/audio/canPlayType/canPlayType_method_exists-expected.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-audio.canPlayType() - existence of method
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS true is true
-PASS successfullyParsed is true
-
-TEST COMPLETE
-spec reference
-
-
diff --git a/third_party/WebKit/LayoutTests/media/W3C/audio/canPlayType/canPlayType_method_exists.html b/third_party/WebKit/LayoutTests/media/W3C/audio/canPlayType/canPlayType_method_exists.html
deleted file mode 100644
index 377ef57..0000000
--- a/third_party/WebKit/LayoutTests/media/W3C/audio/canPlayType/canPlayType_method_exists.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!doctype html>
-<html>
- <head>
-  <title>audio.canPlayType() - existence of method</title>
-  <script src="../../w3cwrapper.js"></script>
- </head>
- <body>
-  <p><a href="http://dev.w3.org/html5/spec/Overview.html#dom-navigator-canplaytype">spec reference</a></p>
-  <audio id="a">
-  </audio>
-  <div id="log"></div>
-  <script>
-test(function() {
- assert_true(
-  !!document.getElementById("a").canPlayType,
-  "audioElement.canPlayType method exists");
-});
-  </script>
- </body>
-</html>
diff --git a/third_party/WebKit/LayoutTests/media/W3C/audio/canPlayType/canPlayType_supported_but_no_codecs_parameter_1-expected.txt b/third_party/WebKit/LayoutTests/media/W3C/audio/canPlayType/canPlayType_supported_but_no_codecs_parameter_1-expected.txt
deleted file mode 100644
index c10c22c2..0000000
--- a/third_party/WebKit/LayoutTests/media/W3C/audio/canPlayType/canPlayType_supported_but_no_codecs_parameter_1-expected.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-audio.canPlayType() - supported format w/o codecs parameter
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS "maybe" is "maybe"
-PASS successfullyParsed is true
-
-TEST COMPLETE
-spec reference
-
-
diff --git a/third_party/WebKit/LayoutTests/media/W3C/audio/canPlayType/canPlayType_supported_but_no_codecs_parameter_1.html b/third_party/WebKit/LayoutTests/media/W3C/audio/canPlayType/canPlayType_supported_but_no_codecs_parameter_1.html
deleted file mode 100644
index 708700b4..0000000
--- a/third_party/WebKit/LayoutTests/media/W3C/audio/canPlayType/canPlayType_supported_but_no_codecs_parameter_1.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!doctype html>
-<html>
- <head>
-  <title>audio.canPlayType() - supported format w/o codecs parameter</title>
-  <script src="../../w3cwrapper.js"></script>
- </head>
- <body>
-  <p><a href="http://dev.w3.org/html5/spec/Overview.html#dom-navigator-canplaytype">spec reference</a></p>
-  <audio id="a">
-  </audio>
-  <div id="log"></div>
-  <script>
-test(function() {
- var v = document.getElementById("a");
- if (v.canPlayType('audio/ogg; codecs="vorbis"') == "probably") {
-  assert_equals(
-   v.canPlayType("audio/ogg"),
-   "maybe",
-   "audioElement.canPlayType() should return 'maybe' on supported format w/o codecs parameter");
- }
-});
-  </script>
- </body>
-</html>
diff --git a/third_party/WebKit/LayoutTests/media/W3C/audio/canPlayType/canPlayType_supported_but_no_codecs_parameter_2-expected.txt b/third_party/WebKit/LayoutTests/media/W3C/audio/canPlayType/canPlayType_supported_but_no_codecs_parameter_2-expected.txt
deleted file mode 100644
index 045897d..0000000
--- a/third_party/WebKit/LayoutTests/media/W3C/audio/canPlayType/canPlayType_supported_but_no_codecs_parameter_2-expected.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-audio.canPlayType() - supported format w/o codecs parameter
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS successfullyParsed is true
-
-TEST COMPLETE
-spec reference
-
-
diff --git a/third_party/WebKit/LayoutTests/media/W3C/audio/canPlayType/canPlayType_supported_but_no_codecs_parameter_2.html b/third_party/WebKit/LayoutTests/media/W3C/audio/canPlayType/canPlayType_supported_but_no_codecs_parameter_2.html
deleted file mode 100644
index 7ec8218..0000000
--- a/third_party/WebKit/LayoutTests/media/W3C/audio/canPlayType/canPlayType_supported_but_no_codecs_parameter_2.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!doctype html>
-<html>
- <head>
-  <title>audio.canPlayType() - supported format w/o codecs parameter</title>
-  <script src="../../w3cwrapper.js"></script>
- </head>
- <body>
-  <p><a href="http://dev.w3.org/html5/spec/Overview.html#dom-navigator-canplaytype">spec reference</a></p>
-  <audio id="a">
-  </audio>
-  <div id="log"></div>
-  <script>
-test(function() {
- var v = document.getElementById("a");
- if (v.canPlayType('audio/mp4; codecs="mp4a.40.2"') == "probably") {
-  assert_equals(
-   v.canPlayType("audio/mp4"),
-   "maybe",
-   "audioElement.canPlayType() should return 'maybe' on supported format w/o codecs parameter");
- }
-});
-  </script>
- </body>
-</html>
diff --git a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_application_octet_stream-expected.txt b/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_application_octet_stream-expected.txt
deleted file mode 100644
index 571bdf32..0000000
--- a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_application_octet_stream-expected.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-video.canPlayType() - application/octet-stream must always return the empty string
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS true is true
-PASS successfullyParsed is true
-
-TEST COMPLETE
-spec reference
-
-
diff --git a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_application_octet_stream.html b/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_application_octet_stream.html
deleted file mode 100644
index 8241a600..0000000
--- a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_application_octet_stream.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!doctype html>
-<html>
- <head>
-  <title>video.canPlayType() - application/octet-stream must always return the empty string</title>
-  <script src="../../w3cwrapper.js"></script>
- </head>
- <body>
-  <p><a href="http://dev.w3.org/html5/spec/Overview.html#dom-navigator-canplaytype">spec reference</a></p>
-  <video id="v">
-  </video>
-  <div id="log"></div>
-  <script>
-test(function() {
- assert_true(
-  document.getElementById("v").canPlayType("application/octet-stream") == "",
-  "videoElement.canPlayType('application/octet-stream') should return the empty string");
-});
-  </script>
- </body>
-</html>
diff --git a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_application_octet_stream_with_codecs_1-expected.txt b/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_application_octet_stream_with_codecs_1-expected.txt
deleted file mode 100644
index b18cb727..0000000
--- a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_application_octet_stream_with_codecs_1-expected.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-video.canPlayType() - can never play application/octet-stream with a codecs parameter
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS "" is ""
-PASS successfullyParsed is true
-
-TEST COMPLETE
-spec reference
-
-
diff --git a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_application_octet_stream_with_codecs_1.html b/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_application_octet_stream_with_codecs_1.html
deleted file mode 100644
index d4565159..0000000
--- a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_application_octet_stream_with_codecs_1.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<!doctype html>
-<html>
- <head>
-  <title>video.canPlayType() - can never play application/octet-stream with a codecs parameter</title>
-  <script src="../../w3cwrapper.js"></script>
- </head>
- <body>
-  <p><a href="http://dev.w3.org/html5/spec/Overview.html#mime-types">spec reference</a></p>
-  <video id="v">
-  </video>
-  <div id="log"></div>
-  <script>
-test(function() {
- assert_equals(
-  document.getElementById("v").canPlayType('application/octet-stream; codecs="vp8, vorbis"'),
-  "",
-  "videoElement.canPlayType('application/octet-stream; codecs=...') should always return the empty string");
-});
-  </script>
- </body>
-</html>
diff --git a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_application_octet_stream_with_codecs_2-expected.txt b/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_application_octet_stream_with_codecs_2-expected.txt
deleted file mode 100644
index b18cb727..0000000
--- a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_application_octet_stream_with_codecs_2-expected.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-video.canPlayType() - can never play application/octet-stream with a codecs parameter
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS "" is ""
-PASS successfullyParsed is true
-
-TEST COMPLETE
-spec reference
-
-
diff --git a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_application_octet_stream_with_codecs_2.html b/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_application_octet_stream_with_codecs_2.html
deleted file mode 100644
index 0bf887f..0000000
--- a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_application_octet_stream_with_codecs_2.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<!doctype html>
-<html>
- <head>
-  <title>video.canPlayType() - can never play application/octet-stream with a codecs parameter</title>
-  <script src="../../w3cwrapper.js"></script>
- </head>
- <body>
-  <p><a href="http://dev.w3.org/html5/spec/Overview.html#a-type-that-the-user-agent-knows-it-cannot-render">spec reference</a></p>
-  <video id="v">
-  </video>
-  <div id="log"></div>
-  <script>
-test(function() {
- assert_equals(
-  document.getElementById("v").canPlayType('application/octet-stream; codecs="theora, vorbis"'),
-  "",
-  "videoElement.canPlayType('application/octet-stream; codecs=...') should always return the empty string");
-});
-  </script>
- </body>
-</html>
diff --git a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_application_octet_stream_with_codecs_3-expected.txt b/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_application_octet_stream_with_codecs_3-expected.txt
deleted file mode 100644
index b18cb727..0000000
--- a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_application_octet_stream_with_codecs_3-expected.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-video.canPlayType() - can never play application/octet-stream with a codecs parameter
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS "" is ""
-PASS successfullyParsed is true
-
-TEST COMPLETE
-spec reference
-
-
diff --git a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_application_octet_stream_with_codecs_3.html b/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_application_octet_stream_with_codecs_3.html
deleted file mode 100644
index 7c2b643..0000000
--- a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_application_octet_stream_with_codecs_3.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<!doctype html>
-<html>
- <head>
-  <title>video.canPlayType() - can never play application/octet-stream with a codecs parameter</title>
-  <script src="../../w3cwrapper.js"></script>
- </head>
- <body>
-  <p><a href="http://dev.w3.org/html5/spec/Overview.html#a-type-that-the-user-agent-knows-it-cannot-render">spec reference</a></p>
-  <video id="v">
-  </video>
-  <div id="log"></div>
-  <script>
-test(function() {
- assert_equals(
-  document.getElementById("v").canPlayType('application/octet-stream; codecs="avc1.42E01E, mp4a.40.2"'),
-  "",
-  "videoElement.canPlayType('application/octet-stream; codecs=...') should always return the empty string");
-});
-  </script>
- </body>
-</html>
diff --git a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_bogus_type-expected.txt b/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_bogus_type-expected.txt
deleted file mode 100644
index b5b230070..0000000
--- a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_bogus_type-expected.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-video.canPlayType() - bogus format
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS "" is ""
-PASS successfullyParsed is true
-
-TEST COMPLETE
-spec reference
-
-
diff --git a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_bogus_type.html b/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_bogus_type.html
deleted file mode 100644
index 9c7b7e9..0000000
--- a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_bogus_type.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<!doctype html>
-<html>
- <head>
-  <title>video.canPlayType() - bogus format</title>
-  <script src="../../w3cwrapper.js"></script>
- </head>
- <body>
-  <p><a href="http://dev.w3.org/html5/spec/Overview.html#dom-navigator-canplaytype">spec reference</a></p>
-  <video id="v">
-  </video>
-  <div id="log"></div>
-  <script>
-test(function() {
- assert_equals(
-  document.getElementById("v").canPlayType("application/marks-fantasmagorical-format"),
-  "",
-  "videoElement.canPlayType() should return the empty string on a bogus format");
-});
-  </script>
- </body>
-</html>
diff --git a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_codecs_order_1-expected.txt b/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_codecs_order_1-expected.txt
deleted file mode 100644
index dc4fe61..0000000
--- a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_codecs_order_1-expected.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-video.canPlayType() - codecs parameter order
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS "probably" is "probably"
-PASS successfullyParsed is true
-
-TEST COMPLETE
-spec reference
-
-
diff --git a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_codecs_order_1.html b/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_codecs_order_1.html
deleted file mode 100644
index 0192d8d5..0000000
--- a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_codecs_order_1.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<!doctype html>
-<html>
- <head>
-  <title>video.canPlayType() - codecs parameter order</title>
-  <script src="../../w3cwrapper.js"></script>
- </head>
- <body>
-  <p><a href="http://dev.w3.org/html5/spec/Overview.html#mime-types">spec reference</a></p>
-  <video id="v">
-  </video>
-  <div id="log"></div>
-  <script>
-test(function() {
- var v = document.getElementById("v");
-  assert_equals(
-   v.canPlayType('video/webm; codecs="vp8, vorbis"'),
-   v.canPlayType('video/webm; codecs="vorbis, vp8"'),
-   "order of codecs parameters should have no effect");
-});
-  </script>
- </body>
-</html>
diff --git a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_codecs_order_2-expected.txt b/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_codecs_order_2-expected.txt
deleted file mode 100644
index dc4fe61..0000000
--- a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_codecs_order_2-expected.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-video.canPlayType() - codecs parameter order
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS "probably" is "probably"
-PASS successfullyParsed is true
-
-TEST COMPLETE
-spec reference
-
-
diff --git a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_codecs_order_2.html b/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_codecs_order_2.html
deleted file mode 100644
index 0270a0f..0000000
--- a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_codecs_order_2.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<!doctype html>
-<html>
- <head>
-  <title>video.canPlayType() - codecs parameter order</title>
-  <script src="../../w3cwrapper.js"></script>
- </head>
- <body>
-  <p><a href="http://dev.w3.org/html5/spec/Overview.html#mime-types">spec reference</a></p>
-  <video id="v">
-  </video>
-  <div id="log"></div>
-  <script>
-test(function() {
- var v = document.getElementById("v");
-  assert_equals(
-   v.canPlayType('video/ogg; codecs="theora, vorbis"'),
-   v.canPlayType('video/ogg; codecs="vorbis, theora"'),
-   "order of codecs parameters should have no effect");
-});
-  </script>
- </body>
-</html>
diff --git a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_codecs_order_3-expected.txt b/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_codecs_order_3-expected.txt
deleted file mode 100644
index d9e6648..0000000
--- a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_codecs_order_3-expected.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-video.canPlayType() - codecs parameter order
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS "" is ""
-PASS successfullyParsed is true
-
-TEST COMPLETE
-spec reference
-
-
diff --git a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_codecs_order_3.html b/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_codecs_order_3.html
deleted file mode 100644
index b80b1e98..0000000
--- a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_codecs_order_3.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<!doctype html>
-<html>
- <head>
-  <title>video.canPlayType() - codecs parameter order</title>
-  <script src="../../w3cwrapper.js"></script>
- </head>
- <body>
-  <p><a href="http://dev.w3.org/html5/spec/Overview.html#mime-types">spec reference</a></p>
-  <video id="v">
-  </video>
-  <div id="log"></div>
-  <script>
-test(function() {
- var v = document.getElementById("v");
-  assert_equals(
-   v.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"'),
-   v.canPlayType('video/mp4; codecs="mp4a.40.2, avc1.42E01E"'),
-   "order of codecs parameters should have no effect");
-});
-  </script>
- </body>
-</html>
diff --git a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_method_exists-expected.txt b/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_method_exists-expected.txt
deleted file mode 100644
index d032d09..0000000
--- a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_method_exists-expected.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-video.canPlayType() - existence of method
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS true is true
-PASS successfullyParsed is true
-
-TEST COMPLETE
-spec reference
-
-
diff --git a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_method_exists.html b/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_method_exists.html
deleted file mode 100644
index 1a45d5a..0000000
--- a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_method_exists.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!doctype html>
-<html>
- <head>
-  <title>video.canPlayType() - existence of method</title>
-  <script src="../../w3cwrapper.js"></script>
- </head>
- <body>
-  <p><a href="http://dev.w3.org/html5/spec/Overview.html#dom-navigator-canplaytype">spec reference</a></p>
-  <video id="v">
-  </video>
-  <div id="log"></div>
-  <script>
-test(function() {
- assert_true(
-  "canPlayType" in document.getElementById("v"),
-  "videoElement.canPlayType method exists");
-});
-  </script>
- </body>
-</html>
diff --git a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_supported_but_no_codecs_parameter_1-expected.txt b/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_supported_but_no_codecs_parameter_1-expected.txt
deleted file mode 100644
index f4c736f..0000000
--- a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_supported_but_no_codecs_parameter_1-expected.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-video.canPlayType() - supported format w/o codecs parameter
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS "maybe" is "maybe"
-PASS successfullyParsed is true
-
-TEST COMPLETE
-spec reference
-
-
diff --git a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_supported_but_no_codecs_parameter_1.html b/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_supported_but_no_codecs_parameter_1.html
deleted file mode 100644
index a9f20e32..0000000
--- a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_supported_but_no_codecs_parameter_1.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!doctype html>
-<html>
- <head>
-  <title>video.canPlayType() - supported format w/o codecs parameter</title>
-  <script src="../../w3cwrapper.js"></script>
- </head>
- <body>
-  <p><a href="http://dev.w3.org/html5/spec/Overview.html#dom-navigator-canplaytype">spec reference</a></p>
-  <video id="v">
-  </video>
-  <div id="log"></div>
-  <script>
-test(function() {
- var v = document.getElementById("v");
- if (v.canPlayType('video/webm; codecs="vp8, vorbis"') == "probably") {
-  assert_equals(
-   v.canPlayType("video/webm"),
-   "maybe",
-   "videoElement.canPlayType() should return 'maybe' on supported format w/o codecs parameter");
- }
-});
-  </script>
- </body>
-</html>
diff --git a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_supported_but_no_codecs_parameter_2-expected.txt b/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_supported_but_no_codecs_parameter_2-expected.txt
deleted file mode 100644
index f4c736f..0000000
--- a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_supported_but_no_codecs_parameter_2-expected.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-video.canPlayType() - supported format w/o codecs parameter
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS "maybe" is "maybe"
-PASS successfullyParsed is true
-
-TEST COMPLETE
-spec reference
-
-
diff --git a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_supported_but_no_codecs_parameter_2.html b/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_supported_but_no_codecs_parameter_2.html
deleted file mode 100644
index 8c7c59c..0000000
--- a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_supported_but_no_codecs_parameter_2.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!doctype html>
-<html>
- <head>
-  <title>video.canPlayType() - supported format w/o codecs parameter</title>
-  <script src="../../w3cwrapper.js"></script>
- </head>
- <body>
-  <p><a href="http://dev.w3.org/html5/spec/Overview.html#dom-navigator-canplaytype">spec reference</a></p>
-  <video id="v">
-  </video>
-  <div id="log"></div>
-  <script>
-test(function() {
- var v = document.getElementById("v");
- if (v.canPlayType('video/ogg; codecs="theora"') == "probably") {
-  assert_equals(
-   v.canPlayType("video/ogg"),
-   "maybe",
-   "videoElement.canPlayType() should return 'maybe' on supported format w/o codecs parameter");
- }
-});
-  </script>
- </body>
-</html>
diff --git a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_supported_but_no_codecs_parameter_3-expected.txt b/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_supported_but_no_codecs_parameter_3-expected.txt
deleted file mode 100644
index 0c1ece3e..0000000
--- a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_supported_but_no_codecs_parameter_3-expected.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-video.canPlayType() - supported format w/o codecs parameter
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS successfullyParsed is true
-
-TEST COMPLETE
-spec reference
-
-
diff --git a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_supported_but_no_codecs_parameter_3.html b/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_supported_but_no_codecs_parameter_3.html
deleted file mode 100644
index 080c1aa..0000000
--- a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_supported_but_no_codecs_parameter_3.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!doctype html>
-<html>
- <head>
-  <title>video.canPlayType() - supported format w/o codecs parameter</title>
-  <script src="../../w3cwrapper.js"></script>
- </head>
- <body>
-  <p><a href="http://dev.w3.org/html5/spec/Overview.html#dom-navigator-canplaytype">spec reference</a></p>
-  <video id="v">
-  </video>
-  <div id="log"></div>
-  <script>
-test(function() {
- var v = document.getElementById("v");
- if (v.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"') == "probably") {
-  assert_equals(
-   v.canPlayType("video/mp4"),
-   "maybe",
-   "videoElement.canPlayType() should return 'maybe' on supported format w/o codecs parameter");
- }
-});
-  </script>
- </body>
-</html>
diff --git a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_two_implies_one_1-expected.txt b/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_two_implies_one_1-expected.txt
deleted file mode 100644
index aea6276f..0000000
--- a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_two_implies_one_1-expected.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-video.canPlayType() - codecs parameter logic
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS "probably" is "probably"
-PASS successfullyParsed is true
-
-TEST COMPLETE
-spec reference
-
-
diff --git a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_two_implies_one_1.html b/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_two_implies_one_1.html
deleted file mode 100644
index 35b4d17e..0000000
--- a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_two_implies_one_1.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!doctype html>
-<html>
- <head>
-  <title>video.canPlayType() - codecs parameter logic</title>
-  <script src="../../w3cwrapper.js"></script>
- </head>
- <body>
-  <p><a href="http://dev.w3.org/html5/spec/Overview.html#mime-types">spec reference</a></p>
-  <video id="v">
-  </video>
-  <div id="log"></div>
-  <script>
-test(function() {
- var v = document.getElementById("v");
- if (v.canPlayType('video/webm; codecs="vp8, vorbis"') == "probably") {
-  assert_equals(
-   v.canPlayType('video/webm; codecs="vp8, vorbis"'),
-   v.canPlayType('video/webm; codecs="vp8"'),
-   "ability to play two codecs implies the ability to play one");
- }
-});
-  </script>
- </body>
-</html>
diff --git a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_two_implies_one_2-expected.txt b/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_two_implies_one_2-expected.txt
deleted file mode 100644
index aea6276f..0000000
--- a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_two_implies_one_2-expected.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-video.canPlayType() - codecs parameter logic
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS "probably" is "probably"
-PASS successfullyParsed is true
-
-TEST COMPLETE
-spec reference
-
-
diff --git a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_two_implies_one_2.html b/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_two_implies_one_2.html
deleted file mode 100644
index 4b3c021..0000000
--- a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_two_implies_one_2.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!doctype html>
-<html>
- <head>
-  <title>video.canPlayType() - codecs parameter logic</title>
-  <script src="../../w3cwrapper.js"></script>
- </head>
- <body>
-  <p><a href="http://dev.w3.org/html5/spec/Overview.html#mime-types">spec reference</a></p>
-  <video id="v">
-  </video>
-  <div id="log"></div>
-  <script>
-test(function() {
- var v = document.getElementById("v");
- if (v.canPlayType('video/webm; codecs="vp8, vorbis"') == "probably") {
-  assert_equals(
-   v.canPlayType('video/webm; codecs="vp8, vorbis"'),
-   v.canPlayType('video/webm; codecs="vorbis"'),
-   "ability to play two codecs implies the ability to play one");
- }
-});
-  </script>
- </body>
-</html>
diff --git a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_two_implies_one_3-expected.txt b/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_two_implies_one_3-expected.txt
deleted file mode 100644
index aea6276f..0000000
--- a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_two_implies_one_3-expected.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-video.canPlayType() - codecs parameter logic
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS "probably" is "probably"
-PASS successfullyParsed is true
-
-TEST COMPLETE
-spec reference
-
-
diff --git a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_two_implies_one_3.html b/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_two_implies_one_3.html
deleted file mode 100644
index e2994fe2..0000000
--- a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_two_implies_one_3.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!doctype html>
-<html>
- <head>
-  <title>video.canPlayType() - codecs parameter logic</title>
-  <script src="../../w3cwrapper.js"></script>
- </head>
- <body>
-  <p><a href="http://dev.w3.org/html5/spec/Overview.html#mime-types">spec reference</a></p>
-  <video id="v">
-  </video>
-  <div id="log"></div>
-  <script>
-test(function() {
- var v = document.getElementById("v");
- if (v.canPlayType('video/ogg; codecs="theora, vorbis"') == "probably") {
-  assert_equals(
-   v.canPlayType('video/ogg; codecs="theora, vorbis"'),
-   v.canPlayType('video/ogg; codecs="theora"'),
-   "ability to play two codecs implies the ability to play one");
- }
-});
-  </script>
- </body>
-</html>
diff --git a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_two_implies_one_4-expected.txt b/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_two_implies_one_4-expected.txt
deleted file mode 100644
index aea6276f..0000000
--- a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_two_implies_one_4-expected.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-video.canPlayType() - codecs parameter logic
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS "probably" is "probably"
-PASS successfullyParsed is true
-
-TEST COMPLETE
-spec reference
-
-
diff --git a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_two_implies_one_4.html b/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_two_implies_one_4.html
deleted file mode 100644
index a17bdb18..0000000
--- a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_two_implies_one_4.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!doctype html>
-<html>
- <head>
-  <title>video.canPlayType() - codecs parameter logic</title>
-  <script src="../../w3cwrapper.js"></script>
- </head>
- <body>
-  <p><a href="http://dev.w3.org/html5/spec/Overview.html#mime-types">spec reference</a></p>
-  <video id="v">
-  </video>
-  <div id="log"></div>
-  <script>
-test(function() {
- var v = document.getElementById("v");
- if (v.canPlayType('video/ogg; codecs="theora, vorbis"') == "probably") {
-  assert_equals(
-   v.canPlayType('video/ogg; codecs="theora, vorbis"'),
-   v.canPlayType('video/ogg; codecs="vorbis"'),
-   "ability to play two codecs implies the ability to play one");
- }
-});
-  </script>
- </body>
-</html>
diff --git a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_two_implies_one_5-expected.txt b/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_two_implies_one_5-expected.txt
deleted file mode 100644
index ba70851..0000000
--- a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_two_implies_one_5-expected.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-video.canPlayType() - codecs parameter logic
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS successfullyParsed is true
-
-TEST COMPLETE
-spec reference
-
-
diff --git a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_two_implies_one_5.html b/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_two_implies_one_5.html
deleted file mode 100644
index 85afb61f..0000000
--- a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_two_implies_one_5.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!doctype html>
-<html>
- <head>
-  <title>video.canPlayType() - codecs parameter logic</title>
-  <script src="../../w3cwrapper.js"></script>
- </head>
- <body>
-  <p><a href="http://dev.w3.org/html5/spec/Overview.html#mime-types">spec reference</a></p>
-  <video id="v">
-  </video>
-  <div id="log"></div>
-  <script>
-test(function() {
- var v = document.getElementById("v");
- if (v.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"') == "probably") {
-  assert_equals(
-   v.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"'),
-   v.canPlayType('video/ogg; codecs="avc1.42E01E"'),
-   "ability to play two codecs implies the ability to play one");
- }
-});
-  </script>
- </body>
-</html>
diff --git a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_two_implies_one_6-expected.txt b/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_two_implies_one_6-expected.txt
deleted file mode 100644
index ba70851..0000000
--- a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_two_implies_one_6-expected.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-video.canPlayType() - codecs parameter logic
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS successfullyParsed is true
-
-TEST COMPLETE
-spec reference
-
-
diff --git a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_two_implies_one_6.html b/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_two_implies_one_6.html
deleted file mode 100644
index 2b615f1..0000000
--- a/third_party/WebKit/LayoutTests/media/W3C/video/canPlayType/canPlayType_two_implies_one_6.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!doctype html>
-<html>
- <head>
-  <title>video.canPlayType() - codecs parameter logic</title>
-  <script src="../../w3cwrapper.js"></script>
- </head>
- <body>
-  <p><a href="http://dev.w3.org/html5/spec/Overview.html#mime-types">spec reference</a></p>
-  <video id="v">
-  </video>
-  <div id="log"></div>
-  <script>
-test(function() {
- var v = document.getElementById("v");
- if (v.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"') == "probably") {
-  assert_equals(
-   v.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"'),
-   v.canPlayType('video/ogg; codecs="mp4a.40.2"'),
-   "ability to play two codecs implies the ability to play one");
- }
-});
-  </script>
- </body>
-</html>
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/incremental-shadow-dom/external/wpt/css/css-scoping/slotted-invalidation-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/virtual/incremental-shadow-dom/external/wpt/css/css-scoping/slotted-invalidation-expected.txt
new file mode 100644
index 0000000..94e91176d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/incremental-shadow-dom/external/wpt/css/css-scoping/slotted-invalidation-expected.txt
@@ -0,0 +1,4 @@
+This is a testharness.js-based test.
+FAIL CSS Test: Style invalidation for ::slotted() assert_equals: expected "rgb(255, 0, 0)" but got "rgba(0, 0, 0, 0)"
+Harness: the test ran to completion.
+
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/incremental-shadow-dom/external/wpt/css/css-scoping/slotted-invalidation-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/virtual/incremental-shadow-dom/external/wpt/css/css-scoping/slotted-invalidation-expected.txt
new file mode 100644
index 0000000..94e91176d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/incremental-shadow-dom/external/wpt/css/css-scoping/slotted-invalidation-expected.txt
@@ -0,0 +1,4 @@
+This is a testharness.js-based test.
+FAIL CSS Test: Style invalidation for ::slotted() assert_equals: expected "rgb(255, 0, 0)" but got "rgba(0, 0, 0, 0)"
+Harness: the test ran to completion.
+
diff --git a/third_party/WebKit/Source/build/scripts/core/css/properties/make_css_property_subclasses.py b/third_party/WebKit/Source/build/scripts/core/css/properties/make_css_property_subclasses.py
index 90a28c2..2a1febf 100755
--- a/third_party/WebKit/Source/build/scripts/core/css/properties/make_css_property_subclasses.py
+++ b/third_party/WebKit/Source/build/scripts/core/css/properties/make_css_property_subclasses.py
@@ -97,12 +97,6 @@
             if (property_name in ['Clip', 'ColumnCount', 'ColumnWidth', 'ZIndex']):
                 property_['custom_apply'] = "auto"
                 property_['custom_apply_args'] = {'auto_identity': 'CSSValueAuto'}
-            elif property_name == 'ColumnGap':
-                property_['custom_apply'] = "auto"
-                property_['custom_apply_args'] = {
-                    'auto_getter': 'HasNormalColumnGap',
-                    'auto_setter': 'SetHasNormalColumnGap',
-                    'auto_identity': 'CSSValueNormal'}
             elif (property_name in [
                     'BorderImageOutset', 'BorderImageRepeat', 'BorderImageSlice', 'BorderImageWidth', 'WebkitMaskBoxImageOutset',
                     'WebkitMaskBoxImageRepeat', 'WebkitMaskBoxImageSlice', 'WebkitMaskBoxImageWidth']):
diff --git a/third_party/WebKit/Source/build/scripts/make_computed_style_base.py b/third_party/WebKit/Source/build/scripts/make_computed_style_base.py
index 65f6ea81..0e01019 100755
--- a/third_party/WebKit/Source/build/scripts/make_computed_style_base.py
+++ b/third_party/WebKit/Source/build/scripts/make_computed_style_base.py
@@ -42,6 +42,7 @@
     'Vector<CSSPropertyID>',
     'Vector<GridTrackSize>',
     'GridPosition',
+    'GapLength',
     'AtomicString',
     'scoped_refptr',
     'Persistent',
diff --git a/third_party/WebKit/Source/build/scripts/make_style_builder.py b/third_party/WebKit/Source/build/scripts/make_style_builder.py
index fe45731b..8ab966f 100755
--- a/third_party/WebKit/Source/build/scripts/make_style_builder.py
+++ b/third_party/WebKit/Source/build/scripts/make_style_builder.py
@@ -54,7 +54,7 @@
                 'BackgroundAttachment', 'BackgroundBlendMode', 'BackgroundClip', 'BackgroundImage', 'BackgroundOrigin',
                 'BackgroundPositionX', 'BackgroundPositionY', 'BackgroundRepeatX', 'BackgroundRepeatY', 'BackgroundSize',
                 'BorderImageOutset', 'BorderImageRepeat', 'BorderImageSlice', 'BorderImageWidth', 'Clip', 'ColumnCount',
-                'ColumnGap', 'ColumnWidth', 'MaskSourceType', 'WebkitMaskBoxImageOutset', 'WebkitMaskBoxImageRepeat',
+                'ColumnWidth', 'MaskSourceType', 'WebkitMaskBoxImageOutset', 'WebkitMaskBoxImageRepeat',
                 'WebkitMaskBoxImageSlice', 'WebkitMaskBoxImageWidth', 'WebkitMaskClip', 'WebkitMaskComposite', 'WebkitMaskImage',
                 'WebkitMaskOrigin', 'WebkitMaskPositionX', 'WebkitMaskPositionY', 'WebkitMaskRepeatX', 'WebkitMaskRepeatY',
                 'WebkitMaskSize', 'ZIndex']):
diff --git a/third_party/WebKit/Source/core/BUILD.gn b/third_party/WebKit/Source/core/BUILD.gn
index cfce44c..f2e2f8a 100644
--- a/third_party/WebKit/Source/core/BUILD.gn
+++ b/third_party/WebKit/Source/core/BUILD.gn
@@ -1799,8 +1799,6 @@
     "fetch/ReadableStreamBytesConsumerTest.cpp",
     "fetch/RequestTest.cpp",
     "fetch/ResponseTest.cpp",
-    "fileapi/FileListTest.cpp",
-    "fileapi/FileTest.cpp",
     "frame/BrowserControlsTest.cpp",
     "frame/DOMTimerTest.cpp",
     "frame/DeferredLoadingTest.cpp",
@@ -2113,6 +2111,7 @@
     "//testing/gmock",
     "//testing/gtest",
     "//third_party/WebKit/Source/core/editing:unit_tests",
+    "//third_party/WebKit/Source/core/fileapi:unit_tests",
   ]
 
   # FIXME: Enable mojo unittests on Android after fixing data dependency.
diff --git a/third_party/WebKit/Source/core/animation/LengthPropertyFunctions.cpp b/third_party/WebKit/Source/core/animation/LengthPropertyFunctions.cpp
index 98ff0d0..b0b9deb 100644
--- a/third_party/WebKit/Source/core/animation/LengthPropertyFunctions.cpp
+++ b/third_party/WebKit/Source/core/animation/LengthPropertyFunctions.cpp
@@ -256,9 +256,9 @@
       result = Length(style.VerticalBorderSpacing(), kFixed);
       return true;
     case CSSPropertyColumnGap:
-      if (style.HasNormalColumnGap())
+      if (style.ColumnGap().IsNormal())
         return false;
-      result = Length(style.ColumnGap(), kFixed);
+      result = style.ColumnGap().GetLength();
       return true;
     case CSSPropertyColumnRuleWidth:
       result = Length(style.ColumnRuleWidth(), kFixed);
diff --git a/third_party/WebKit/Source/core/css/CSSImageSetValue.cpp b/third_party/WebKit/Source/core/css/CSSImageSetValue.cpp
index 8bc2f813..3151cb3 100644
--- a/third_party/WebKit/Source/core/css/CSSImageSetValue.cpp
+++ b/third_party/WebKit/Source/core/css/CSSImageSetValue.cpp
@@ -133,7 +133,7 @@
 
     ImageResourceContent* cached_image =
         ImageResourceContent::Fetch(params, document.Fetcher());
-    if (!cached_image->ErrorOccurred()) {
+    if (cached_image && !cached_image->ErrorOccurred()) {
       cached_image_ = StyleFetchedImageSet::Create(
           cached_image, image.scale_factor, this, params.Url());
     } else {
diff --git a/third_party/WebKit/Source/core/css/CSSImageValue.cpp b/third_party/WebKit/Source/core/css/CSSImageValue.cpp
index f64aad9..5e730c4 100644
--- a/third_party/WebKit/Source/core/css/CSSImageValue.cpp
+++ b/third_party/WebKit/Source/core/css/CSSImageValue.cpp
@@ -80,7 +80,7 @@
 
     ImageResourceContent* cached_image =
         ImageResourceContent::Fetch(params, document.Fetcher());
-    if (!cached_image->ErrorOccurred()) {
+    if (cached_image && !cached_image->ErrorOccurred()) {
       cached_image_ =
           StyleFetchedImage::Create(cached_image, document, params.Url());
     } else {
diff --git a/third_party/WebKit/Source/core/css/CSSProperties.json5 b/third_party/WebKit/Source/core/css/CSSProperties.json5
index 4db7537f..fb6bcf3 100644
--- a/third_party/WebKit/Source/core/css/CSSProperties.json5
+++ b/third_party/WebKit/Source/core/css/CSSProperties.json5
@@ -3017,12 +3017,11 @@
       property_methods: ["ParseSingleValue", "CSSValueFromComputedStyleInternal"],
       interpolable: true,
       field_group: "*",
-      field_template: "primitive",
-      default_value: "0.0f",
-      type_name: "float",
-      computed_style_custom_functions: ["setter"],
-      converter: "ConvertComputedLength<float>",
-      custom_apply_functions_all: true,
+      field_template: "external",
+      include_paths: ["core/style/GapLength.h"],
+      default_value: "GapLength()",
+      type_name: "GapLength",
+      converter: "ConvertGapLength",
     },
     {
       name: "column-rule-color",
diff --git a/third_party/WebKit/Source/core/css/ComputedStyleDiffFunctions.json5 b/third_party/WebKit/Source/core/css/ComputedStyleDiffFunctions.json5
index 12248ef..97da75d 100644
--- a/third_party/WebKit/Source/core/css/ComputedStyleDiffFunctions.json5
+++ b/third_party/WebKit/Source/core/css/ComputedStyleDiffFunctions.json5
@@ -76,7 +76,7 @@
                 "grid-row-start", "grid-row-end", "grid-column-start", "grid-column-end",
                 "column-gap", "column-width", "column-rule-style",
                 "column-rule-width", "column-rule-color", "ColumnRuleColorIsCurrentColor", "VisitedLinkColumnRuleColor",
-                "column-count", "HasAutoColumnCount", "HasAutoColumnWidth", "column-fill", "HasNormalColumnGap", "column-span",],
+                "column-count", "HasAutoColumnCount", "HasAutoColumnWidth", "column-fill", "column-span",],
         methods_to_diff: [
           {
             method: "BorderLeftWidth()",
diff --git a/third_party/WebKit/Source/core/css/ComputedStyleExtraFields.json5 b/third_party/WebKit/Source/core/css/ComputedStyleExtraFields.json5
index 5b1af4d..d0c7364e 100644
--- a/third_party/WebKit/Source/core/css/ComputedStyleExtraFields.json5
+++ b/third_party/WebKit/Source/core/css/ComputedStyleExtraFields.json5
@@ -875,14 +875,6 @@
       computed_style_custom_functions: ["setter"],
     },
     {
-      name: "HasNormalColumnGap",
-      field_template: "primitive",
-      type_name: "bool",
-      field_group: "*->multi-col",
-      default_value: "true",
-      computed_style_custom_functions: ["setter"],
-    },
-    {
       name: "NamedGridColumnLines",
       field_template: "external",
       type_name: "NamedGridLinesMap",
diff --git a/third_party/WebKit/Source/core/css/properties/longhands/ColumnGapCustom.cpp b/third_party/WebKit/Source/core/css/properties/longhands/ColumnGapCustom.cpp
index 6de54db..82c94c2 100644
--- a/third_party/WebKit/Source/core/css/properties/longhands/ColumnGapCustom.cpp
+++ b/third_party/WebKit/Source/core/css/properties/longhands/ColumnGapCustom.cpp
@@ -4,9 +4,9 @@
 
 #include "core/css/properties/longhands/ColumnGap.h"
 
-#include "core/css/ZoomAdjustedPixelValue.h"
 #include "core/css/parser/CSSParserContext.h"
 #include "core/css/parser/CSSPropertyParserHelpers.h"
+#include "core/css/properties/ComputedStyleUtils.h"
 #include "core/style/ComputedStyle.h"
 
 namespace blink {
@@ -18,8 +18,8 @@
     const CSSParserLocalContext&) const {
   if (range.Peek().Id() == CSSValueNormal)
     return CSSPropertyParserHelpers::ConsumeIdent(range);
-  return CSSPropertyParserHelpers::ConsumeLength(range, context.Mode(),
-                                                 kValueRangeNonNegative);
+  return CSSPropertyParserHelpers::ConsumeLengthOrPercent(
+      range, context.Mode(), kValueRangeNonNegative);
 }
 
 const CSSValue* ColumnGap::CSSValueFromComputedStyleInternal(
@@ -28,9 +28,10 @@
     const LayoutObject*,
     Node* styled_node,
     bool allow_visited_style) const {
-  if (style.HasNormalColumnGap())
+  if (style.ColumnGap().IsNormal())
     return CSSIdentifierValue::Create(CSSValueNormal);
-  return ZoomAdjustedPixelValue(style.ColumnGap(), style);
+  return ComputedStyleUtils::ZoomAdjustedPixelValueForLength(
+      style.ColumnGap().GetLength(), style);
 }
 
 }  // namespace CSSLonghand
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp b/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp
index 1a46f0e..6e95da8 100644
--- a/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp
@@ -1001,6 +1001,15 @@
                         defaultMaximumForClamp<float>());
 }
 
+GapLength StyleBuilderConverter::ConvertGapLength(StyleResolverState& state,
+                                                  const CSSValue& value) {
+  if (value.IsIdentifierValue() &&
+      ToCSSIdentifierValue(value).GetValueID() == CSSValueNormal)
+    return GapLength();
+
+  return GapLength(ConvertLength(state, value));
+}
+
 Length StyleBuilderConverter::ConvertLength(const StyleResolverState& state,
                                             const CSSValue& value) {
   return ToCSSPrimitiveValue(value).ConvertToLength(
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.h b/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.h
index 3ba454d..4c2c291a 100644
--- a/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.h
+++ b/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.h
@@ -142,6 +142,7 @@
   static StyleContentAlignmentData ConvertContentAlignmentData(
       StyleResolverState&,
       const CSSValue&);
+  static GapLength ConvertGapLength(StyleResolverState&, const CSSValue&);
   static GridAutoFlow ConvertGridAutoFlow(StyleResolverState&, const CSSValue&);
   static GridPosition ConvertGridPosition(StyleResolverState&, const CSSValue&);
   static GridTrackSize ConvertGridTrackSize(StyleResolverState&,
@@ -151,6 +152,7 @@
   template <typename T>
   static T ConvertLineWidth(StyleResolverState&, const CSSValue&);
   static float ConvertBorderWidth(StyleResolverState&, const CSSValue&);
+  static GapLength ConvertGapLength(const StyleResolverState&, const CSSValue&);
   static Length ConvertLength(const StyleResolverState&, const CSSValue&);
   static UnzoomedLength ConvertUnzoomedLength(const StyleResolverState&,
                                               const CSSValue&);
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index 17b4f87..9a7a4993 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -2023,8 +2023,7 @@
   EOverflowAnchor overflow_anchor = EOverflowAnchor::kAuto;
   EOverflow overflow_x = EOverflow::kAuto;
   EOverflow overflow_y = EOverflow::kAuto;
-  bool column_gap_normal = true;
-  float column_gap = 0;
+  GapLength column_gap;
   if (overflow_style) {
     overflow_anchor = overflow_style->OverflowAnchor();
     overflow_x = overflow_style->OverflowX();
@@ -2040,10 +2039,7 @@
     // Column-gap is (ab)used by the current paged overflow implementation (in
     // lack of other ways to specify gaps between pages), so we have to
     // propagate it too.
-    if (!overflow_style->HasNormalColumnGap()) {
-      column_gap_normal = false;
-      column_gap = overflow_style->ColumnGap();
-    }
+    column_gap = overflow_style->ColumnGap();
   }
 
   ScrollSnapType snap_type = overflow_style->GetScrollSnapType();
@@ -2072,7 +2068,6 @@
       viewport_style->OverflowAnchor() != overflow_anchor ||
       viewport_style->OverflowX() != overflow_x ||
       viewport_style->OverflowY() != overflow_y ||
-      viewport_style->HasNormalColumnGap() != column_gap_normal ||
       viewport_style->ColumnGap() != column_gap ||
       viewport_style->GetScrollSnapType() != snap_type ||
       viewport_style->GetScrollBehavior() != scroll_behavior ||
@@ -2088,10 +2083,7 @@
     new_style->SetOverflowAnchor(overflow_anchor);
     new_style->SetOverflowX(overflow_x);
     new_style->SetOverflowY(overflow_y);
-    if (column_gap_normal)
-      new_style->SetHasNormalColumnGap();
-    else
-      new_style->SetColumnGap(column_gap);
+    new_style->SetColumnGap(column_gap);
     new_style->SetScrollSnapType(snap_type);
     new_style->SetScrollBehavior(scroll_behavior);
     new_style->SetOverscrollBehaviorX(overscroll_behavior_x);
diff --git a/third_party/WebKit/Source/core/dom/ExecutionContext.cpp b/third_party/WebKit/Source/core/dom/ExecutionContext.cpp
index 7a35e2b0..2a554501 100644
--- a/third_party/WebKit/Source/core/dom/ExecutionContext.cpp
+++ b/third_party/WebKit/Source/core/dom/ExecutionContext.cpp
@@ -32,8 +32,8 @@
 #include "core/dom/PausableObject.h"
 #include "core/dom/events/EventTarget.h"
 #include "core/events/ErrorEvent.h"
+#include "core/fileapi/PublicURLManager.h"
 #include "core/frame/UseCounter.h"
-#include "core/html/PublicURLManager.h"
 #include "core/inspector/ConsoleMessage.h"
 #include "core/probe/CoreProbes.h"
 #include "core/workers/WorkerGlobalScope.h"
diff --git a/third_party/WebKit/Source/core/editing/BUILD.gn b/third_party/WebKit/Source/core/editing/BUILD.gn
index dc814d7..a1962974 100644
--- a/third_party/WebKit/Source/core/editing/BUILD.gn
+++ b/third_party/WebKit/Source/core/editing/BUILD.gn
@@ -407,6 +407,6 @@
   deps = [
     "//testing/gmock",
     "//testing/gtest",
-    "//third_party/WebKit/Source/core:core",
+    "//third_party/WebKit/Source/core",
   ]
 }
diff --git a/third_party/WebKit/Source/core/editing/Editor.cpp b/third_party/WebKit/Source/core/editing/Editor.cpp
index d1ba4e15..26a45928 100644
--- a/third_party/WebKit/Source/core/editing/Editor.cpp
+++ b/third_party/WebKit/Source/core/editing/Editor.cpp
@@ -1505,6 +1505,34 @@
       start_caret_rect.Height());
 }
 
+EphemeralRange Editor::RangeForPoint(const IntPoint& frame_point) const {
+  const PositionWithAffinity position_with_affinity =
+      GetFrame().PositionForPoint(frame_point);
+  if (position_with_affinity.IsNull())
+    return EphemeralRange();
+
+  const VisiblePosition position =
+      CreateVisiblePosition(position_with_affinity);
+  const VisiblePosition previous = PreviousPositionOf(position);
+  if (previous.IsNotNull()) {
+    const EphemeralRange previous_character_range =
+        MakeRange(previous, position);
+    const IntRect rect = FirstRectForRange(previous_character_range);
+    if (rect.Contains(frame_point))
+      return EphemeralRange(previous_character_range);
+  }
+
+  const VisiblePosition next = NextPositionOf(position);
+  const EphemeralRange next_character_range = MakeRange(position, next);
+  if (next_character_range.IsNotNull()) {
+    const IntRect rect = FirstRectForRange(next_character_range);
+    if (rect.Contains(frame_point))
+      return EphemeralRange(next_character_range);
+  }
+
+  return EphemeralRange();
+}
+
 void Editor::ComputeAndSetTypingStyle(CSSPropertyValueSet* style,
                                       InputEvent::InputType input_type) {
   if (!style || style->IsEmpty()) {
diff --git a/third_party/WebKit/Source/core/editing/Editor.h b/third_party/WebKit/Source/core/editing/Editor.h
index c386861..3108fb9 100644
--- a/third_party/WebKit/Source/core/editing/Editor.h
+++ b/third_party/WebKit/Source/core/editing/Editor.h
@@ -251,6 +251,7 @@
 
   // |firstRectForRange| requires up-to-date layout.
   IntRect FirstRectForRange(const EphemeralRange&) const;
+  EphemeralRange RangeForPoint(const IntPoint&) const;
 
   void RespondToChangedSelection();
 
diff --git a/third_party/WebKit/Source/core/editing/FrameSelection.cpp b/third_party/WebKit/Source/core/editing/FrameSelection.cpp
index 45ee12b..5b0db3b 100644
--- a/third_party/WebKit/Source/core/editing/FrameSelection.cpp
+++ b/third_party/WebKit/Source/core/editing/FrameSelection.cpp
@@ -139,7 +139,7 @@
 }
 
 size_t FrameSelection::CharacterIndexForPoint(const IntPoint& point) const {
-  const EphemeralRange range = GetFrame()->RangeForPoint(point);
+  const EphemeralRange range = GetFrame()->GetEditor().RangeForPoint(point);
   if (range.IsNull())
     return kNotFound;
   Element* const editable = RootEditableElementOrDocumentElement();
diff --git a/third_party/WebKit/Source/core/editing/WebSubstringUtil.mm b/third_party/WebKit/Source/core/editing/WebSubstringUtil.mm
index ba53e668..83c495ed 100644
--- a/third_party/WebKit/Source/core/editing/WebSubstringUtil.mm
+++ b/third_party/WebKit/Source/core/editing/WebSubstringUtil.mm
@@ -37,6 +37,7 @@
 #include "core/dom/Document.h"
 #include "core/dom/Element.h"
 #include "core/dom/Node.h"
+#include "core/editing/Editor.h"
 #include "core/editing/EphemeralRange.h"
 #include "core/editing/FrameSelection.h"
 #include "core/editing/PlainTextRange.h"
@@ -167,7 +168,7 @@
     return nil;
   LocalFrame* frame = result.InnerNode()->GetDocument().GetFrame();
   EphemeralRange range =
-      frame->RangeForPoint(result.RoundedPointInInnerNodeFrame());
+      frame->GetEditor().RangeForPoint(result.RoundedPointInInnerNodeFrame());
   if (range.IsNull())
     return nil;
 
diff --git a/third_party/WebKit/Source/core/editing/ime/InputMethodController.cpp b/third_party/WebKit/Source/core/editing/ime/InputMethodController.cpp
index 1f17705..ebd20ef 100644
--- a/third_party/WebKit/Source/core/editing/ime/InputMethodController.cpp
+++ b/third_party/WebKit/Source/core/editing/ime/InputMethodController.cpp
@@ -344,16 +344,22 @@
   DEFINE_STATIC_LOCAL(const AtomicString, sentences, ("sentences"));
 
   const AtomicString& autocapitalize = html_element->autocapitalize();
-  if (autocapitalize == none)
+  if (autocapitalize == none) {
     flags |= kWebTextInputFlagAutocapitalizeNone;
-  else if (autocapitalize == characters)
+  } else if (autocapitalize == characters) {
     flags |= kWebTextInputFlagAutocapitalizeCharacters;
-  else if (autocapitalize == words)
+  } else if (autocapitalize == words) {
     flags |= kWebTextInputFlagAutocapitalizeWords;
-  else if (autocapitalize == sentences)
+  } else if (autocapitalize == sentences || autocapitalize == "") {
+    // Note: we tell the IME to enable autocapitalization for both the default
+    // state ("") and the sentences states. We could potentially treat these
+    // differently if we had a platform that supported autocapitalization but
+    // didn't want to enable it unless explicitly requested by a web page, but
+    // this so far has not been necessary.
     flags |= kWebTextInputFlagAutocapitalizeSentences;
-  else
+  } else {
     NOTREACHED();
+  }
 
   return flags;
 }
@@ -848,7 +854,8 @@
   }
 
   // Find out what node has the composition now.
-  const Position base = MostForwardCaretPosition(selection.Base());
+  const Position base =
+      MostForwardCaretPosition(selection.Base(), kCanSkipOverEditingBoundary);
   Node* base_node = base.AnchorNode();
   if (!base_node || !base_node->IsTextNode())
     return;
diff --git a/third_party/WebKit/Source/core/editing/ime/InputMethodControllerTest.cpp b/third_party/WebKit/Source/core/editing/ime/InputMethodControllerTest.cpp
index 2b11e5b..bd6bffeb 100644
--- a/third_party/WebKit/Source/core/editing/ime/InputMethodControllerTest.cpp
+++ b/third_party/WebKit/Source/core/editing/ime/InputMethodControllerTest.cpp
@@ -13,18 +13,18 @@
 #include "core/editing/FrameSelection.h"
 #include "core/editing/SelectionTemplate.h"
 #include "core/editing/markers/DocumentMarkerController.h"
+#include "core/editing/testing/EditingTestBase.h"
 #include "core/events/MouseEvent.h"
 #include "core/frame/LocalFrame.h"
 #include "core/frame/LocalFrameView.h"
 #include "core/frame/Settings.h"
 #include "core/html/forms/HTMLInputElement.h"
 #include "core/html/forms/HTMLTextAreaElement.h"
-#include "core/testing/PageTestBase.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 namespace blink {
 
-class InputMethodControllerTest : public PageTestBase {
+class InputMethodControllerTest : public EditingTestBase {
  protected:
   InputMethodController& Controller() {
     return GetFrame().GetInputMethodController();
@@ -3163,4 +3163,28 @@
   EXPECT_EQ("hello<b>world</b>", div->InnerHTMLAsString());
 }
 
+TEST_F(InputMethodControllerTest, SetCompositionAfterNonEditableElement) {
+  GetFrame().Selection().SetSelectionAndEndTyping(
+      SetSelectionTextToBody("<div id='sample' contenteditable='true'>"
+                             "<span contenteditable='false'>a</span>|b</div>"));
+  Element* const div = GetDocument().getElementById("sample");
+  div->focus();
+
+  // Open a composition and insert some text.
+  Controller().SetComposition(String::FromUTF8("c"), Vector<ImeTextSpan>(), 1,
+                              1);
+
+  // Add some more text to the composition.
+  Controller().SetComposition(String::FromUTF8("cd"), Vector<ImeTextSpan>(), 2,
+                              2);
+
+  EXPECT_EQ(
+      "<div contenteditable=\"true\" id=\"sample\">"
+      "<span contenteditable=\"false\">a</span>^cd|b</div>",
+      GetSelectionTextFromBody(
+          SelectionInDOMTree::Builder()
+              .SetBaseAndExtent(Controller().CompositionEphemeralRange())
+              .Build()));
+}
+
 }  // namespace blink
diff --git a/third_party/WebKit/Source/core/exported/WebDevToolsAgentImpl.cpp b/third_party/WebKit/Source/core/exported/WebDevToolsAgentImpl.cpp
index d8538b6f..524b3fc8 100644
--- a/third_party/WebKit/Source/core/exported/WebDevToolsAgentImpl.cpp
+++ b/third_party/WebKit/Source/core/exported/WebDevToolsAgentImpl.cpp
@@ -319,8 +319,6 @@
     : agent_(agent),
       frame_(agent->web_local_frame_impl_),
       binding_(this, std::move(request)) {
-  InitializeInspectorSession(reattach_state);
-
   io_session_ =
       new IOSession(Platform::Current()->GetIOTaskRunner(),
                     frame_->GetFrame()->GetTaskRunner(TaskType::kUnthrottled),
@@ -329,6 +327,8 @@
   host_ptr_.Bind(std::move(host_ptr_info));
   host_ptr_.set_connection_error_handler(WTF::Bind(
       &WebDevToolsAgentImpl::Session::Detach, WrapWeakPersistent(this)));
+
+  InitializeInspectorSession(reattach_state);
 }
 
 void WebDevToolsAgentImpl::Session::Trace(blink::Visitor* visitor) {
diff --git a/third_party/WebKit/Source/core/fileapi/BUILD.gn b/third_party/WebKit/Source/core/fileapi/BUILD.gn
index 6354c00..24e0449 100644
--- a/third_party/WebKit/Source/core/fileapi/BUILD.gn
+++ b/third_party/WebKit/Source/core/fileapi/BUILD.gn
@@ -21,7 +21,30 @@
     "FileReaderLoaderClient.h",
     "FileReaderSync.cpp",
     "FileReaderSync.h",
+    "PublicURLManager.cpp",
+    "PublicURLManager.h",
     "URLFileAPI.cpp",
     "URLFileAPI.h",
+    "URLRegistry.h",
+  ]
+}
+
+jumbo_source_set("unit_tests") {
+  testonly = true
+  sources = [
+    "FileListTest.cpp",
+    "FileTest.cpp",
+  ]
+
+  configs += [
+    "//third_party/WebKit/Source/core:blink_core_pch",
+    "//third_party/WebKit/Source:config",
+    "//third_party/WebKit/Source:inside_blink",
+  ]
+
+  deps = [
+    "//testing/gmock",
+    "//testing/gtest",
+    "//third_party/WebKit/Source/core",
   ]
 }
diff --git a/third_party/WebKit/Source/core/fileapi/Blob.h b/third_party/WebKit/Source/core/fileapi/Blob.h
index 6012edd..4428b62 100644
--- a/third_party/WebKit/Source/core/fileapi/Blob.h
+++ b/third_party/WebKit/Source/core/fileapi/Blob.h
@@ -34,7 +34,7 @@
 #include "base/memory/scoped_refptr.h"
 #include "bindings/core/v8/array_buffer_or_array_buffer_view_or_blob_or_usv_string.h"
 #include "core/CoreExport.h"
-#include "core/html/URLRegistry.h"
+#include "core/fileapi/URLRegistry.h"
 #include "core/imagebitmap/ImageBitmapSource.h"
 #include "core/typed_arrays/DOMArrayBuffer.h"
 #include "core/typed_arrays/DOMArrayBufferView.h"
diff --git a/third_party/WebKit/Source/core/html/PublicURLManager.cpp b/third_party/WebKit/Source/core/fileapi/PublicURLManager.cpp
similarity index 97%
rename from third_party/WebKit/Source/core/html/PublicURLManager.cpp
rename to third_party/WebKit/Source/core/fileapi/PublicURLManager.cpp
index 19212ff..08a8e3f 100644
--- a/third_party/WebKit/Source/core/html/PublicURLManager.cpp
+++ b/third_party/WebKit/Source/core/fileapi/PublicURLManager.cpp
@@ -24,9 +24,9 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "core/html/PublicURLManager.h"
+#include "core/fileapi/PublicURLManager.h"
 
-#include "core/html/URLRegistry.h"
+#include "core/fileapi/URLRegistry.h"
 #include "platform/blob/BlobData.h"
 #include "platform/blob/BlobURL.h"
 #include "platform/runtime_enabled_features.h"
diff --git a/third_party/WebKit/Source/core/html/PublicURLManager.h b/third_party/WebKit/Source/core/fileapi/PublicURLManager.h
similarity index 100%
rename from third_party/WebKit/Source/core/html/PublicURLManager.h
rename to third_party/WebKit/Source/core/fileapi/PublicURLManager.h
diff --git a/third_party/WebKit/Source/core/fileapi/URLFileAPI.cpp b/third_party/WebKit/Source/core/fileapi/URLFileAPI.cpp
index 07a7717..9f5ec2e1 100644
--- a/third_party/WebKit/Source/core/fileapi/URLFileAPI.cpp
+++ b/third_party/WebKit/Source/core/fileapi/URLFileAPI.cpp
@@ -7,8 +7,8 @@
 #include "bindings/core/v8/ExceptionState.h"
 #include "core/dom/ExecutionContext.h"
 #include "core/fileapi/Blob.h"
+#include "core/fileapi/PublicURLManager.h"
 #include "core/frame/UseCounter.h"
-#include "core/html/PublicURLManager.h"
 #include "core/url/DOMURL.h"
 #include "platform/bindings/ScriptState.h"
 
diff --git a/third_party/WebKit/Source/core/html/URLRegistry.h b/third_party/WebKit/Source/core/fileapi/URLRegistry.h
similarity index 100%
rename from third_party/WebKit/Source/core/html/URLRegistry.h
rename to third_party/WebKit/Source/core/fileapi/URLRegistry.h
diff --git a/third_party/WebKit/Source/core/frame/LocalFrame.cpp b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
index 818c9576..7e80c652 100644
--- a/third_party/WebKit/Source/core/frame/LocalFrame.cpp
+++ b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
@@ -42,9 +42,7 @@
 #include "core/dom/events/Event.h"
 #include "core/editing/EditingUtilities.h"
 #include "core/editing/Editor.h"
-#include "core/editing/EphemeralRange.h"
 #include "core/editing/FrameSelection.h"
-#include "core/editing/VisiblePosition.h"
 #include "core/editing/ime/InputMethodController.h"
 #include "core/editing/serializers/Serialization.h"
 #include "core/editing/spellcheck/SpellChecker.h"
@@ -715,33 +713,6 @@
   return result.InnerNode() ? &result.InnerNode()->GetDocument() : nullptr;
 }
 
-EphemeralRange LocalFrame::RangeForPoint(const IntPoint& frame_point) {
-  const PositionWithAffinity position_with_affinity =
-      PositionForPoint(frame_point);
-  if (position_with_affinity.IsNull())
-    return EphemeralRange();
-
-  VisiblePosition position = CreateVisiblePosition(position_with_affinity);
-  VisiblePosition previous = PreviousPositionOf(position);
-  if (previous.IsNotNull()) {
-    const EphemeralRange previous_character_range =
-        MakeRange(previous, position);
-    IntRect rect = GetEditor().FirstRectForRange(previous_character_range);
-    if (rect.Contains(frame_point))
-      return EphemeralRange(previous_character_range);
-  }
-
-  VisiblePosition next = NextPositionOf(position);
-  const EphemeralRange next_character_range = MakeRange(position, next);
-  if (next_character_range.IsNotNull()) {
-    IntRect rect = GetEditor().FirstRectForRange(next_character_range);
-    if (rect.Contains(frame_point))
-      return EphemeralRange(next_character_range);
-  }
-
-  return EphemeralRange();
-}
-
 bool LocalFrame::ShouldReuseDefaultView(const KURL& url) const {
   // Secure transitions can only happen when navigating from the initial empty
   // document.
diff --git a/third_party/WebKit/Source/core/frame/LocalFrame.h b/third_party/WebKit/Source/core/frame/LocalFrame.h
index ff53081..1bbad13 100644
--- a/third_party/WebKit/Source/core/frame/LocalFrame.h
+++ b/third_party/WebKit/Source/core/frame/LocalFrame.h
@@ -67,7 +67,6 @@
 class CoreProbeSink;
 class IdlenessDetector;
 class InterfaceRegistry;
-class IntPoint;
 class IntSize;
 class LayoutView;
 class LocalDOMWindow;
@@ -210,8 +209,6 @@
   PositionWithAffinityTemplate<EditingAlgorithm<NodeTraversal>>
   PositionForPoint(const LayoutPoint& frame_point);
   Document* DocumentAtPoint(const LayoutPoint&);
-  EphemeralRangeTemplate<EditingAlgorithm<NodeTraversal>> RangeForPoint(
-      const IntPoint& frame_point);
 
   bool ShouldReuseDefaultView(const KURL&) const;
   void RemoveSpellingMarkersUnderWords(const Vector<String>& words);
diff --git a/third_party/WebKit/Source/core/html/BUILD.gn b/third_party/WebKit/Source/core/html/BUILD.gn
index 76adaae..97c6290 100644
--- a/third_party/WebKit/Source/core/html/BUILD.gn
+++ b/third_party/WebKit/Source/core/html/BUILD.gn
@@ -186,8 +186,6 @@
     "ListItemOrdinal.h",
     "PluginDocument.cpp",
     "PluginDocument.h",
-    "PublicURLManager.cpp",
-    "PublicURLManager.h",
     "RelList.cpp",
     "RelList.h",
     "TableConstants.h",
@@ -195,7 +193,6 @@
     "TextDocument.h",
     "TimeRanges.cpp",
     "TimeRanges.h",
-    "URLRegistry.h",
     "VoidCallback.h",
     "WindowNameCollection.cpp",
     "WindowNameCollection.h",
diff --git a/third_party/WebKit/Source/core/html/HTMLElement.cpp b/third_party/WebKit/Source/core/html/HTMLElement.cpp
index 2d6e295..400d393d 100644
--- a/third_party/WebKit/Source/core/html/HTMLElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLElement.cpp
@@ -804,16 +804,10 @@
   DEFINE_STATIC_LOCAL(const AtomicString, kWords, ("words"));
   DEFINE_STATIC_LOCAL(const AtomicString, kSentences, ("sentences"));
 
-  if (auto* input = ToHTMLInputElementOrNull(*this)) {
-    const AtomicString& input_type = input->type();
-    if (input_type != InputTypeNames::text &&
-        input_type != InputTypeNames::search) {
-      // Autocapitalize is only supported for these two input types.
-      return kNone;
-    }
-  }
-
   const AtomicString& value = FastGetAttribute(autocapitalizeAttr);
+  if (value.IsEmpty())
+    return g_empty_atom;
+
   if (EqualIgnoringASCIICase(value, kNone) ||
       EqualIgnoringASCIICase(value, kOff))
     return kNone;
@@ -821,7 +815,7 @@
     return kCharacters;
   if (EqualIgnoringASCIICase(value, kWords))
     return kWords;
-  // "sentences", "on", empty string, or an invalid value
+  // "sentences", "on", or an invalid value
   return kSentences;
 }
 
diff --git a/third_party/WebKit/Source/core/html/media/HTMLMediaSource.h b/third_party/WebKit/Source/core/html/media/HTMLMediaSource.h
index b22fb37..4743fc4 100644
--- a/third_party/WebKit/Source/core/html/media/HTMLMediaSource.h
+++ b/third_party/WebKit/Source/core/html/media/HTMLMediaSource.h
@@ -33,7 +33,7 @@
 
 #include <memory>
 #include "core/CoreExport.h"
-#include "core/html/URLRegistry.h"
+#include "core/fileapi/URLRegistry.h"
 #include "platform/heap/Handle.h"
 #include "platform/wtf/Forward.h"
 
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlock.cpp b/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
index 3d19660d..b54d457 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
@@ -186,7 +186,7 @@
       // Remove our fixed positioned descendants from their current containing
       // block.
       // They will be inserted into our positioned objects list during layout.
-      if (LayoutBlock* cb = ContainerForFixedPosition())
+      if (LayoutBlock* cb = ContainingBlockForFixedPosition())
         cb->RemovePositionedObjects(this, kNewContainingBlock);
     }
   }
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
index 64ea6dd..846c959 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -727,16 +727,15 @@
 
   // If we are fixed-position and stick to the viewport, it is useless to
   // scroll the parent.
-  if (Style()->GetPosition() == EPosition::kFixed &&
-      ContainerForFixedPosition() == View()) {
+  if (Style()->GetPosition() == EPosition::kFixed && Container() == View())
     return;
-  }
 
   if (GetFrame()
           ->GetPage()
           ->GetAutoscrollController()
-          .SelectionAutoscrollInProgress())
+          .SelectionAutoscrollInProgress()) {
     parent_box = EnclosingScrollableBox();
+  }
 
   if (parent_box) {
     parent_box->ScrollRectToVisibleRecursive(new_rect, params);
diff --git a/third_party/WebKit/Source/core/layout/LayoutMultiColumnFlowThread.cpp b/third_party/WebKit/Source/core/layout/LayoutMultiColumnFlowThread.cpp
index fd054ac..b933cc2 100644
--- a/third_party/WebKit/Source/core/layout/LayoutMultiColumnFlowThread.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutMultiColumnFlowThread.cpp
@@ -734,7 +734,7 @@
   LayoutBlock* column_block = MultiColumnBlockFlow();
   const ComputedStyle* column_style = column_block->Style();
   LayoutUnit available_width = column_block->ContentLogicalWidth();
-  LayoutUnit column_gap = ColumnGap(*column_style);
+  LayoutUnit column_gap = ColumnGap(*column_style, available_width);
   LayoutUnit computed_column_width =
       max(LayoutUnit(1), LayoutUnit(column_style->ColumnWidth()));
   unsigned computed_column_count = max<int>(1, column_style->ColumnCount());
@@ -762,12 +762,13 @@
   }
 }
 
-LayoutUnit LayoutMultiColumnFlowThread::ColumnGap(const ComputedStyle& style) {
-  if (style.HasNormalColumnGap()) {
+LayoutUnit LayoutMultiColumnFlowThread::ColumnGap(const ComputedStyle& style,
+                                                  LayoutUnit available_width) {
+  if (style.ColumnGap().IsNormal()) {
     // "1em" is recommended as the normal gap setting. Matches <p> margins.
     return LayoutUnit(style.GetFontDescription().ComputedSize());
   }
-  return LayoutUnit(style.ColumnGap());
+  return ValueForLength(style.ColumnGap().GetLength(), available_width);
 }
 
 void LayoutMultiColumnFlowThread::CreateAndInsertMultiColumnSet(
@@ -1304,7 +1305,8 @@
   LayoutUnit column_count(
       multicol_style->HasAutoColumnCount() ? 1 : multicol_style->ColumnCount());
   LayoutUnit column_width;
-  LayoutUnit gap_extra((column_count - 1) * ColumnGap(*multicol_style));
+  LayoutUnit gap_extra((column_count - 1) *
+                       ColumnGap(*multicol_style, LayoutUnit()));
   if (multicol_style->HasAutoColumnWidth()) {
     min_preferred_logical_width_ =
         min_preferred_logical_width_ * column_count + gap_extra;
diff --git a/third_party/WebKit/Source/core/layout/LayoutMultiColumnFlowThread.h b/third_party/WebKit/Source/core/layout/LayoutMultiColumnFlowThread.h
index 6064dfd..c9ff83a04 100644
--- a/third_party/WebKit/Source/core/layout/LayoutMultiColumnFlowThread.h
+++ b/third_party/WebKit/Source/core/layout/LayoutMultiColumnFlowThread.h
@@ -300,7 +300,7 @@
  private:
   void CalculateColumnHeightAvailable();
   void CalculateColumnCountAndWidth(LayoutUnit& width, unsigned& count) const;
-  static LayoutUnit ColumnGap(const ComputedStyle&);
+  static LayoutUnit ColumnGap(const ComputedStyle&, LayoutUnit available_width);
   void CreateAndInsertMultiColumnSet(LayoutBox* insert_before = nullptr);
   void CreateAndInsertSpannerPlaceholder(
       LayoutBox* spanner_object_in_flow_thread,
diff --git a/third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.cpp b/third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.cpp
index 673474d6..f4b30d82 100644
--- a/third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.cpp
@@ -492,12 +492,13 @@
 LayoutUnit LayoutMultiColumnSet::ColumnGap() const {
   LayoutBlockFlow* parent_block = MultiColumnBlockFlow();
 
-  if (parent_block->Style()->HasNormalColumnGap()) {
+  if (parent_block->Style()->ColumnGap().IsNormal()) {
     // "1em" is recommended as the normal gap setting. Matches <p> margins.
     return LayoutUnit(
         parent_block->Style()->GetFontDescription().ComputedPixelSize());
   }
-  return LayoutUnit(parent_block->Style()->ColumnGap());
+  return ValueForLength(parent_block->Style()->ColumnGap().GetLength(),
+                        AvailableLogicalWidth());
 }
 
 unsigned LayoutMultiColumnSet::ActualColumnCount() const {
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
index 2c5747d5..165d936 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -117,6 +117,44 @@
          style.UserModify() == EUserModify::kReadOnly;
 }
 
+template <typename Predicate>
+LayoutObject* FindAncestorByPredicate(const LayoutObject* descendant,
+                                      LayoutObject::AncestorSkipInfo* skip_info,
+                                      Predicate predicate) {
+  for (auto* object = descendant->Parent(); object; object = object->Parent()) {
+    if (predicate(object))
+      return object;
+    if (skip_info)
+      skip_info->Update(*object);
+  }
+  return nullptr;
+}
+
+LayoutBlock* FindContainingBlock(LayoutObject* container,
+                                 LayoutObject::AncestorSkipInfo* skip_info) {
+  // For inlines, we return the nearest non-anonymous enclosing
+  // block. We don't try to return the inline itself. This allows us to avoid
+  // having a positioned objects list in all LayoutInlines and lets us return a
+  // strongly-typed LayoutBlock* result from this method. The
+  // LayoutObject::Container() method can actually be used to obtain the inline
+  // directly.
+  if (container && container->IsInline() && !container->IsAtomicInlineLevel()) {
+    DCHECK(container->Style()->HasInFlowPosition());
+    container = container->ContainingBlock(skip_info);
+  }
+
+  if (container && !container->IsLayoutBlock())
+    container = container->ContainingBlock(skip_info);
+
+  while (container && container->IsAnonymousBlock())
+    container = container->ContainingBlock(skip_info);
+
+  if (!container || !container->IsLayoutBlock())
+    return nullptr;  // This can still happen in case of an orphaned tree
+
+  return ToLayoutBlock(container);
+}
+
 }  // namespace
 
 #if DCHECK_IS_ON()
@@ -946,56 +984,29 @@
 
 LayoutObject* LayoutObject::ContainerForAbsolutePosition(
     AncestorSkipInfo* skip_info) const {
-  // We technically just want our containing block, but we may not have one if
-  // we're part of an uninstalled subtree. We'll climb as high as we can though.
-  for (LayoutObject* object = Parent(); object; object = object->Parent()) {
-    if (object->CanContainAbsolutePositionObjects())
-      return object;
-    if (skip_info)
-      skip_info->Update(*object);
-  }
-  return nullptr;
+  return FindAncestorByPredicate(this, skip_info, [](LayoutObject* candidate) {
+    return candidate->CanContainAbsolutePositionObjects();
+  });
 }
 
-LayoutBlock* LayoutObject::ContainerForFixedPosition(
+LayoutObject* LayoutObject::ContainerForFixedPosition(
     AncestorSkipInfo* skip_info) const {
   DCHECK(!IsText());
-
-  LayoutObject* object = Parent();
-  for (; object && !object->CanContainFixedPositionObjects();
-       object = object->Parent()) {
-    if (skip_info)
-      skip_info->Update(*object);
-  }
-
-  DCHECK(!object || !object->IsAnonymousBlock());
-  return ToLayoutBlock(object);
+  return FindAncestorByPredicate(this, skip_info, [](LayoutObject* candidate) {
+    return candidate->CanContainFixedPositionObjects();
+  });
 }
 
 LayoutBlock* LayoutObject::ContainingBlockForAbsolutePosition(
     AncestorSkipInfo* skip_info) const {
-  LayoutObject* object = ContainerForAbsolutePosition(skip_info);
+  auto* container = ContainerForAbsolutePosition(skip_info);
+  return FindContainingBlock(container, skip_info);
+}
 
-  // For relpositioned inlines, we return the nearest non-anonymous enclosing
-  // block. We don't try to return the inline itself. This allows us to avoid
-  // having a positioned objects list in all LayoutInlines and lets us return a
-  // strongly-typed LayoutBlock* result from this method. The container() method
-  // can actually be used to obtain the inline directly.
-  if (object && object->IsInline() && !object->IsAtomicInlineLevel()) {
-    DCHECK(object->Style()->HasInFlowPosition());
-    object = object->ContainingBlock(skip_info);
-  }
-
-  if (object && !object->IsLayoutBlock())
-    object = object->ContainingBlock(skip_info);
-
-  while (object && object->IsAnonymousBlock())
-    object = object->ContainingBlock(skip_info);
-
-  if (!object || !object->IsLayoutBlock())
-    return nullptr;  // This can still happen in case of an orphaned tree
-
-  return ToLayoutBlock(object);
+LayoutBlock* LayoutObject::ContainingBlockForFixedPosition(
+    AncestorSkipInfo* skip_info) const {
+  auto* container = ContainerForFixedPosition(skip_info);
+  return FindContainingBlock(container, skip_info);
 }
 
 LayoutBlock* LayoutObject::ContainingBlock(AncestorSkipInfo* skip_info) const {
@@ -1004,7 +1015,7 @@
     object = ToLayoutScrollbarPart(this)->ScrollbarStyleSource();
   if (!IsTextOrSVGChild()) {
     if (style_->GetPosition() == EPosition::kFixed)
-      return ContainerForFixedPosition(skip_info);
+      return ContainingBlockForFixedPosition(skip_info);
     if (style_->GetPosition() == EPosition::kAbsolute)
       return ContainingBlockForAbsolutePosition(skip_info);
   }
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.h b/third_party/WebKit/Source/core/layout/LayoutObject.h
index da086a4..04846fde 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.h
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.h
@@ -1002,7 +1002,8 @@
   // (point 3 above).
   LayoutObject* Container(AncestorSkipInfo* = nullptr) const;
   // Finds the container as if this object is fixed-position.
-  LayoutBlock* ContainerForFixedPosition(AncestorSkipInfo* = nullptr) const;
+  LayoutBlock* ContainingBlockForFixedPosition(
+      AncestorSkipInfo* = nullptr) const;
   // Finds the containing block as if this object is absolute-position.
   LayoutBlock* ContainingBlockForAbsolutePosition(
       AncestorSkipInfo* = nullptr) const;
@@ -2137,6 +2138,7 @@
   inline void InvalidateContainerPreferredLogicalWidths();
 
   LayoutObject* ContainerForAbsolutePosition(AncestorSkipInfo* = nullptr) const;
+  LayoutObject* ContainerForFixedPosition(AncestorSkipInfo* = nullptr) const;
 
   const LayoutBoxModelObject* EnclosingCompositedContainer() const;
 
diff --git a/third_party/WebKit/Source/core/layout/LayoutObjectTest.cpp b/third_party/WebKit/Source/core/layout/LayoutObjectTest.cpp
index 88769389..cdb00d6 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObjectTest.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObjectTest.cpp
@@ -111,31 +111,71 @@
 TEST_F(
     LayoutObjectTest,
     ContainingBlockAbsoluteLayoutObjectShouldBeNonStaticallyPositionedBlockAncestor) {
-  SetBodyInnerHTML(
-      "<div style='position:relative'><bar "
-      "style='position:absolute'></bar></div>");
+  SetBodyInnerHTML(R"HTML(
+    <div style='position:relative'>
+      <bar style='position:absolute'></bar>
+    </div>
+  )HTML");
   LayoutObject* containing_blocklayout_object =
       GetDocument().body()->GetLayoutObject()->SlowFirstChild();
   LayoutObject* layout_object = containing_blocklayout_object->SlowFirstChild();
+  EXPECT_EQ(layout_object->Container(), containing_blocklayout_object);
   EXPECT_EQ(layout_object->ContainingBlock(), containing_blocklayout_object);
+  EXPECT_EQ(layout_object->ContainingBlockForAbsolutePosition(),
+            containing_blocklayout_object);
+  EXPECT_EQ(layout_object->ContainingBlockForFixedPosition(), GetLayoutView());
+}
+
+TEST_F(LayoutObjectTest, ContainingBlockFixedLayoutObjectInTransformedDiv) {
+  SetBodyInnerHTML(R"HTML(
+    <div style='transform:translateX(0px)'>
+      <bar style='position:fixed'></bar>
+    </div>
+  )HTML");
+  LayoutObject* containing_blocklayout_object =
+      GetDocument().body()->GetLayoutObject()->SlowFirstChild();
+  LayoutObject* layout_object = containing_blocklayout_object->SlowFirstChild();
+  EXPECT_EQ(layout_object->Container(), containing_blocklayout_object);
+  EXPECT_EQ(layout_object->ContainingBlock(), containing_blocklayout_object);
+  EXPECT_EQ(layout_object->ContainingBlockForAbsolutePosition(),
+            containing_blocklayout_object);
+  EXPECT_EQ(layout_object->ContainingBlockForFixedPosition(),
+            containing_blocklayout_object);
+}
+
+TEST_F(LayoutObjectTest, ContainingBlockFixedLayoutObjectInBody) {
+  SetBodyInnerHTML("<div style='position:fixed'></div>");
+  LayoutObject* layout_object =
+      GetDocument().body()->GetLayoutObject()->SlowFirstChild();
+  EXPECT_EQ(layout_object->Container(), GetLayoutView());
+  EXPECT_EQ(layout_object->ContainingBlock(), GetLayoutView());
+  EXPECT_EQ(layout_object->ContainingBlockForAbsolutePosition(),
+            GetLayoutView());
+  EXPECT_EQ(layout_object->ContainingBlockForFixedPosition(), GetLayoutView());
 }
 
 TEST_F(
     LayoutObjectTest,
     ContainingBlockAbsoluteLayoutObjectShouldNotBeNonStaticallyPositionedInlineAncestor) {
+  // Test note: We can't use a raw string literal here, since extra whitespace
+  // causes failures.
   SetBodyInnerHTML(
       "<span style='position:relative'><bar "
       "style='position:absolute'></bar></span>");
   LayoutObject* body_layout_object = GetDocument().body()->GetLayoutObject();
-  LayoutObject* layout_object =
-      body_layout_object->SlowFirstChild()->SlowFirstChild();
+  LayoutObject* span_layout_object = body_layout_object->SlowFirstChild();
+  LayoutObject* layout_object = span_layout_object->SlowFirstChild();
 
   // Sanity check: Make sure we don't generate anonymous objects.
   EXPECT_EQ(nullptr, body_layout_object->SlowFirstChild()->NextSibling());
   EXPECT_EQ(nullptr, layout_object->SlowFirstChild());
   EXPECT_EQ(nullptr, layout_object->NextSibling());
 
+  EXPECT_EQ(layout_object->Container(), span_layout_object);
   EXPECT_EQ(layout_object->ContainingBlock(), body_layout_object);
+  EXPECT_EQ(layout_object->ContainingBlockForAbsolutePosition(),
+            body_layout_object);
+  EXPECT_EQ(layout_object->ContainingBlockForFixedPosition(), GetLayoutView());
 }
 
 TEST_F(LayoutObjectTest, PaintingLayerOfOverflowClipLayerUnderColumnSpanAll) {
@@ -367,9 +407,16 @@
 
 TEST_F(LayoutObjectTest,
        AssociatedLayoutObjectOfFirstLetterWithTrailingWhitespace) {
-  const char* body_content =
-      "<style>div:first-letter {color:red;}</style><div id=sample>a\n "
-      "<div></div></div>";
+  const char* body_content = R"HTML(
+    <style>
+      div:first-letter {
+        color:red;
+      }
+    </style>
+    <div id=sample>a
+      <div></div>
+    </div>
+  )HTML";
   SetBodyInnerHTML(body_content);
 
   Node* sample = GetDocument().getElementById("sample");
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_column_layout_algorithm.cc b/third_party/WebKit/Source/core/layout/ng/ng_column_layout_algorithm.cc
index ea7f111..9782495 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_column_layout_algorithm.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_column_layout_algorithm.cc
@@ -89,7 +89,8 @@
   WritingMode writing_mode = ConstraintSpace().GetWritingMode();
   LayoutUnit column_block_offset(border_scrollbar_padding.block_start);
   LayoutUnit column_inline_progression =
-      column_size.inline_size + ResolveUsedColumnGap(Style());
+      column_size.inline_size +
+      ResolveUsedColumnGap(content_box_size.inline_size, Style());
   int used_column_count =
       ResolveUsedColumnCount(content_box_size.inline_size, Style());
 
@@ -213,7 +214,7 @@
   DCHECK_GE(column_count, 1);
   sizes.min_size *= column_count;
   sizes.max_size *= column_count;
-  LayoutUnit column_gap = ResolveUsedColumnGap(Style());
+  LayoutUnit column_gap = ResolveUsedColumnGap(LayoutUnit(), Style());
   LayoutUnit gap_extra = column_gap * (column_count - 1);
   sizes.min_size += gap_extra;
   sizes.max_size += gap_extra;
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_length_utils.cc b/third_party/WebKit/Source/core/layout/ng/ng_length_utils.cc
index 0e1825a..e7d8ff8 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_length_utils.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_length_utils.cc
@@ -397,7 +397,7 @@
       style.HasAutoColumnWidth()
           ? NGSizeIndefinite
           : std::max(LayoutUnit(1), LayoutUnit(style.ColumnWidth()));
-  LayoutUnit gap = ResolveUsedColumnGap(style);
+  LayoutUnit gap = ResolveUsedColumnGap(available_size, style);
   int computed_count = style.ColumnCount();
   return ResolveUsedColumnCount(computed_count, computed_column_inline_size,
                                 gap, available_size);
@@ -423,15 +423,16 @@
           ? NGSizeIndefinite
           : std::max(LayoutUnit(1), LayoutUnit(style.ColumnWidth()));
   int computed_count = style.HasAutoColumnCount() ? 0 : style.ColumnCount();
-  LayoutUnit used_gap = ResolveUsedColumnGap(style);
+  LayoutUnit used_gap = ResolveUsedColumnGap(available_size, style);
   return ResolveUsedColumnInlineSize(computed_count, computed_size, used_gap,
                                      available_size);
 }
 
-LayoutUnit ResolveUsedColumnGap(const ComputedStyle& style) {
-  if (style.HasNormalColumnGap())
+LayoutUnit ResolveUsedColumnGap(LayoutUnit available_size,
+                                const ComputedStyle& style) {
+  if (style.ColumnGap().IsNormal())
     return LayoutUnit(style.GetFontDescription().ComputedPixelSize());
-  return LayoutUnit(style.ColumnGap());
+  return ValueForLength(style.ColumnGap().GetLength(), available_size);
 }
 
 NGPhysicalBoxStrut ComputePhysicalMargins(
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_length_utils.h b/third_party/WebKit/Source/core/layout/ng/ng_length_utils.h
index 0681313..ac4fce1 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_length_utils.h
+++ b/third_party/WebKit/Source/core/layout/ng/ng_length_utils.h
@@ -104,7 +104,8 @@
 CORE_EXPORT LayoutUnit ResolveUsedColumnInlineSize(LayoutUnit available_size,
                                                    const ComputedStyle&);
 
-CORE_EXPORT LayoutUnit ResolveUsedColumnGap(const ComputedStyle&);
+CORE_EXPORT LayoutUnit ResolveUsedColumnGap(LayoutUnit available_size,
+                                            const ComputedStyle&);
 
 // Compute physical margins.
 CORE_EXPORT NGPhysicalBoxStrut ComputePhysicalMargins(const NGConstraintSpace&,
diff --git a/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp b/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp
index 04379522..bb752a1 100644
--- a/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp
+++ b/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp
@@ -171,12 +171,6 @@
   LocalFrame* frame = &frame_view->GetFrame();
   DCHECK(frame->IsLocalRoot());
 
-  if (!(frame_view->ScrollGestureRegionIsDirty() ||
-        touch_event_target_rects_are_dirty_ ||
-        should_scroll_on_main_thread_dirty_ || FrameScrollerIsDirty())) {
-    return;
-  }
-
   TRACE_EVENT0("input",
                "ScrollingCoordinator::updateAfterCompositingChangeIfNeeded");
 
@@ -202,6 +196,11 @@
   if (frame != frame_view->GetPage()->MainFrame())
     return;
 
+  if (!(touch_event_target_rects_are_dirty_ ||
+        should_scroll_on_main_thread_dirty_ || FrameScrollerIsDirty())) {
+    return;
+  }
+
   if (touch_event_target_rects_are_dirty_) {
     UpdateTouchEventTargetRectsIfNeeded();
     touch_event_target_rects_are_dirty_ = false;
diff --git a/third_party/WebKit/Source/core/paint/PaintLayer.cpp b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
index 05529de7..47746b03 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
@@ -376,8 +376,7 @@
     return scroll == view_scroll;
   }
 
-  return GetLayoutObject().ContainerForFixedPosition() ==
-         GetLayoutObject().View();
+  return GetLayoutObject().Container() == GetLayoutObject().View();
 }
 
 bool PaintLayer::ScrollsWithRespectTo(const PaintLayer* other) const {
diff --git a/third_party/WebKit/Source/core/style/BUILD.gn b/third_party/WebKit/Source/core/style/BUILD.gn
index 2f46097..bff07ae 100644
--- a/third_party/WebKit/Source/core/style/BUILD.gn
+++ b/third_party/WebKit/Source/core/style/BUILD.gn
@@ -41,6 +41,7 @@
     "FilterOperation.h",
     "FilterOperations.cpp",
     "FilterOperations.h",
+    "GapLength.h",
     "GridArea.h",
     "GridLength.h",
     "GridPosition.h",
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.cpp b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
index 6663d0e1..ce353eea 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.cpp
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
@@ -1777,7 +1777,7 @@
 }
 
 void ComputedStyle::ClearMultiCol() {
-  SetColumnGapInternal(ComputedStyleInitialValues::InitialColumnGap());
+  SetColumnGap(ComputedStyleInitialValues::InitialColumnGap());
   SetColumnWidthInternal(ComputedStyleInitialValues::InitialColumnWidth());
   SetColumnRuleStyle(ComputedStyleInitialValues::InitialColumnRuleStyle());
   SetColumnRuleWidthInternal(
@@ -1794,8 +1794,6 @@
   SetHasAutoColumnWidthInternal(
       ComputedStyleInitialValues::InitialHasAutoColumnWidth());
   ResetColumnFill();
-  SetHasNormalColumnGapInternal(
-      ComputedStyleInitialValues::InitialHasNormalColumnGap());
   ResetColumnSpan();
 }
 
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.h b/third_party/WebKit/Source/core/style/ComputedStyle.h
index 59dc4b0..9e7a477 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.h
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.h
@@ -519,16 +519,6 @@
     SetColumnCountInternal(ComputedStyleInitialValues::InitialColumnCount());
   }
 
-  // column-gap (aka -webkit-column-gap)
-  void SetColumnGap(float f) {
-    SetHasNormalColumnGapInternal(false);
-    SetColumnGapInternal(f);
-  }
-  void SetHasNormalColumnGap() {
-    SetHasNormalColumnGapInternal(true);
-    SetColumnGapInternal(0);
-  }
-
   // column-rule-color (aka -webkit-column-rule-color)
   void SetColumnRuleColor(const StyleColor& c) {
     if (ColumnRuleColor() != c) {
diff --git a/third_party/WebKit/Source/core/style/GapLength.h b/third_party/WebKit/Source/core/style/GapLength.h
new file mode 100644
index 0000000..01cdafa
--- /dev/null
+++ b/third_party/WebKit/Source/core/style/GapLength.h
@@ -0,0 +1,43 @@
+// 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 GapLength_h
+#define GapLength_h
+
+#include "platform/Length.h"
+#include "platform/wtf/Allocator.h"
+
+namespace blink {
+
+class GapLength {
+  DISALLOW_NEW();
+
+ public:
+  GapLength() : is_normal_(true) {}
+  GapLength(const Length& length) : is_normal_(false), length_(length) {
+    DCHECK(length.IsFixed() || length.IsPercent());
+  }
+
+  bool IsNormal() const { return is_normal_; }
+  const Length& GetLength() const {
+    DCHECK(!IsNormal());
+    return length_;
+  }
+
+  bool operator==(const GapLength& o) const {
+    return is_normal_ == o.is_normal_ && length_ == o.length_;
+  }
+
+  bool operator!=(const GapLength& o) const {
+    return is_normal_ != o.is_normal_ || length_ != o.length_;
+  }
+
+ private:
+  bool is_normal_;
+  Length length_;
+};
+
+}  // namespace blink
+
+#endif  // GapLength_h
diff --git a/third_party/WebKit/Source/core/svg/SVGFEImageElement.cpp b/third_party/WebKit/Source/core/svg/SVGFEImageElement.cpp
index 0f16a5f..2848590 100644
--- a/third_party/WebKit/Source/core/svg/SVGFEImageElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGFEImageElement.cpp
@@ -77,7 +77,8 @@
   FetchParameters params(
       ResourceRequest(GetDocument().CompleteURL(HrefString())), options);
   cached_image_ = ImageResourceContent::Fetch(params, GetDocument().Fetcher());
-  cached_image_->AddObserver(this);
+  if (cached_image_)
+    cached_image_->AddObserver(this);
 }
 
 void SVGFEImageElement::ClearImageResource() {
diff --git a/third_party/WebKit/Source/core/url/DOMURL.cpp b/third_party/WebKit/Source/core/url/DOMURL.cpp
index 6776f8f..746da00 100644
--- a/third_party/WebKit/Source/core/url/DOMURL.cpp
+++ b/third_party/WebKit/Source/core/url/DOMURL.cpp
@@ -30,7 +30,7 @@
 #include "bindings/core/v8/ExceptionState.h"
 #include "core/dom/ExceptionCode.h"
 #include "core/dom/ExecutionContext.h"
-#include "core/html/PublicURLManager.h"
+#include "core/fileapi/PublicURLManager.h"
 #include "core/url/URLSearchParams.h"
 #include "platform/loader/fetch/MemoryCache.h"
 #include "platform/wtf/AutoReset.h"
diff --git a/third_party/WebKit/Source/devtools/front_end/Runtime.js b/third_party/WebKit/Source/devtools/front_end/Runtime.js
index 66d3ef1..d8bf19172 100644
--- a/third_party/WebKit/Source/devtools/front_end/Runtime.js
+++ b/third_party/WebKit/Source/devtools/front_end/Runtime.js
@@ -845,6 +845,13 @@
   }
 
   /**
+   * @return {boolean}
+   */
+  canInstantiate() {
+    return !!(this._className || this._factoryName);
+  }
+
+  /**
    * @return {!Object}
    */
   _createInstance() {
diff --git a/third_party/WebKit/Source/devtools/front_end/console/module.json b/third_party/WebKit/Source/devtools/front_end/console/module.json
index df439893..9a12bde 100644
--- a/third_party/WebKit/Source/devtools/front_end/console/module.json
+++ b/third_party/WebKit/Source/devtools/front_end/console/module.json
@@ -25,7 +25,7 @@
             "className": "Console.ConsolePanel.ConsoleRevealer"
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "actionId": "console.show",
             "className": "Console.ConsoleView.ActionDelegate",
             "bindings": [
@@ -35,7 +35,7 @@
             ]
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "category": "Console",
             "actionId": "console.clear",
             "title": "Clear console",
@@ -53,7 +53,7 @@
             ]
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "category": "Console",
             "actionId": "console.clear.history",
             "title": "Clear console history",
diff --git a/third_party/WebKit/Source/devtools/front_end/coverage/CoverageView.js b/third_party/WebKit/Source/devtools/front_end/coverage/CoverageView.js
index 3694bdc..7c435da 100644
--- a/third_party/WebKit/Source/devtools/front_end/coverage/CoverageView.js
+++ b/third_party/WebKit/Source/devtools/front_end/coverage/CoverageView.js
@@ -25,10 +25,12 @@
     this._toggleRecordButton = UI.Toolbar.createActionButton(this._toggleRecordAction);
     toolbar.appendToolbarItem(this._toggleRecordButton);
 
-    var startWithReloadAction =
-        /** @type {!UI.Action }*/ (UI.actionRegistry.action('coverage.start-with-reload'));
-    this._startWithReloadButton = UI.Toolbar.createActionButton(startWithReloadAction);
-    toolbar.appendToolbarItem(this._startWithReloadButton);
+    if (!Runtime.queryParam('nodeFrontend')) {
+      var startWithReloadAction =
+          /** @type {!UI.Action }*/ (UI.actionRegistry.action('coverage.start-with-reload'));
+      this._startWithReloadButton = UI.Toolbar.createActionButton(startWithReloadAction);
+      toolbar.appendToolbarItem(this._startWithReloadButton);
+    }
     this._clearButton = new UI.ToolbarButton(Common.UIString('Clear all'), 'largeicon-clear');
     this._clearButton.addEventListener(UI.ToolbarButton.Events.Click, this._clear.bind(this));
     toolbar.appendToolbarItem(this._clearButton);
@@ -64,12 +66,17 @@
    */
   _buildLandingPage() {
     var recordButton = UI.createInlineButton(UI.Toolbar.createActionButton(this._toggleRecordAction));
-    var reloadButton = UI.createInlineButton(UI.Toolbar.createActionButtonForId('coverage.start-with-reload'));
     var widget = new UI.VBox();
-    var message = UI.formatLocalized(
-        'Click the record button %s to start capturing coverage.\n' +
-            'Click the reload button %s to reload and start capturing coverage.',
-        [recordButton, reloadButton]);
+    var message;
+    if (this._startWithReloadButton) {
+      var reloadButton = UI.createInlineButton(UI.Toolbar.createActionButtonForId('coverage.start-with-reload'));
+      message = UI.formatLocalized(
+          'Click the record button %s to start capturing coverage.\n' +
+              'Click the reload button %s to reload and start capturing coverage.',
+          [recordButton, reloadButton]);
+    } else {
+      message = UI.formatLocalized('Click the record button %s to start capturing coverage.', [recordButton]);
+    }
     message.classList.add('message');
     widget.contentElement.appendChild(message);
     widget.element.classList.add('landing-page');
@@ -110,25 +117,26 @@
     var mainTarget = SDK.targetManager.mainTarget();
     if (!mainTarget)
       return;
-    this._resourceTreeModel = /** @type {?SDK.ResourceTreeModel} */ (mainTarget.model(SDK.ResourceTreeModel));
-    if (!this._resourceTreeModel)
-      return;
     if (!this._model || reload)
       this._model = new Coverage.CoverageModel(mainTarget);
     Host.userMetrics.actionTaken(Host.UserMetrics.Action.CoverageStarted);
     if (!this._model.start())
       return;
-    this._resourceTreeModel.addEventListener(
-        SDK.ResourceTreeModel.Events.MainFrameNavigated, this._onMainFrameNavigated, this);
+    this._resourceTreeModel = /** @type {?SDK.ResourceTreeModel} */ (mainTarget.model(SDK.ResourceTreeModel));
+    if (this._resourceTreeModel) {
+      this._resourceTreeModel.addEventListener(
+          SDK.ResourceTreeModel.Events.MainFrameNavigated, this._onMainFrameNavigated, this);
+    }
     this._decorationManager = new Coverage.CoverageDecorationManager(this._model);
     this._toggleRecordAction.setToggled(true);
     this._clearButton.setEnabled(false);
-    this._startWithReloadButton.setEnabled(false);
+    if (this._startWithReloadButton)
+      this._startWithReloadButton.setEnabled(false);
     this._filterInput.setEnabled(true);
     if (this._landingPage.isShowing())
       this._landingPage.detach();
     this._listView.show(this._coverageResultsElement);
-    if (reload)
+    if (reload && this._resourceTreeModel)
       this._resourceTreeModel.reloadPage();
     else
       this._poll();
@@ -146,13 +154,16 @@
       clearTimeout(this._pollTimer);
       delete this._pollTimer;
     }
-    this._resourceTreeModel.removeEventListener(
-        SDK.ResourceTreeModel.Events.MainFrameNavigated, this._onMainFrameNavigated, this);
-    this._resourceTreeModel = null;
+    if (this._resourceTreeModel) {
+      this._resourceTreeModel.removeEventListener(
+          SDK.ResourceTreeModel.Events.MainFrameNavigated, this._onMainFrameNavigated, this);
+      this._resourceTreeModel = null;
+    }
     var updatedEntries = await this._model.stop();
     this._updateViews(updatedEntries);
     this._toggleRecordAction.setToggled(false);
-    this._startWithReloadButton.setEnabled(true);
+    if (this._startWithReloadButton)
+      this._startWithReloadButton.setEnabled(true);
     this._clearButton.setEnabled(true);
   }
 
diff --git a/third_party/WebKit/Source/devtools/front_end/coverage/module.json b/third_party/WebKit/Source/devtools/front_end/coverage/module.json
index c9ff91e..ca5239f 100644
--- a/third_party/WebKit/Source/devtools/front_end/coverage/module.json
+++ b/third_party/WebKit/Source/devtools/front_end/coverage/module.json
@@ -15,7 +15,7 @@
             "decoratorType": "coverage"
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "actionId": "coverage.toggle-recording",
             "iconClass": "largeicon-start-recording",
             "toggledIconClass": "largeicon-stop-recording",
@@ -34,7 +34,7 @@
             ]
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "actionId": "coverage.start-with-reload",
             "iconClass": "largeicon-refresh",
             "className": "Coverage.CoverageView.ActionDelegate",
diff --git a/third_party/WebKit/Source/devtools/front_end/elements/ElementsPanel.js b/third_party/WebKit/Source/devtools/front_end/elements/ElementsPanel.js
index da46038e..57eeeb1c 100644
--- a/third_party/WebKit/Source/devtools/front_end/elements/ElementsPanel.js
+++ b/third_party/WebKit/Source/devtools/front_end/elements/ElementsPanel.js
@@ -237,9 +237,9 @@
 
       if (!treeOutline.rootDOMNode) {
         if (domModel.existingDocument())
-          this._documentUpdated(domModel, domModel.existingDocument());
+          this._documentUpdated(domModel);
         else
-          domModel.requestDocumentPromise();
+          domModel.requestDocument();
       }
     }
   }
@@ -315,23 +315,19 @@
    */
   _documentUpdatedEvent(event) {
     var domModel = /** @type {!SDK.DOMModel} */ (event.data);
-    this._documentUpdated(domModel, domModel.existingDocument());
+    this._documentUpdated(domModel);
   }
 
   /**
    * @param {!SDK.DOMModel} domModel
-   * @param {?SDK.DOMDocument} inspectedRootDocument
    */
-  _documentUpdated(domModel, inspectedRootDocument) {
+  _documentUpdated(domModel) {
     this._reset();
     this.searchCanceled();
 
-    var treeOutline = Elements.ElementsTreeOutline.forDOMModel(domModel);
-    treeOutline.rootDOMNode = inspectedRootDocument;
-
-    if (!inspectedRootDocument) {
+    if (!domModel.existingDocument()) {
       if (this.isShowing())
-        domModel.requestDocumentPromise();
+        domModel.requestDocument();
       return;
     }
 
diff --git a/third_party/WebKit/Source/devtools/front_end/elements/ElementsTreeOutline.js b/third_party/WebKit/Source/devtools/front_end/elements/ElementsTreeOutline.js
index 45e18118..c43f41c7 100644
--- a/third_party/WebKit/Source/devtools/front_end/elements/ElementsTreeOutline.js
+++ b/third_party/WebKit/Source/devtools/front_end/elements/ElementsTreeOutline.js
@@ -1011,14 +1011,9 @@
    */
   _documentUpdated(event) {
     var domModel = /** @type {!SDK.DOMModel} */ (event.data);
-    var inspectedRootDocument = domModel.existingDocument();
-
     this._reset();
-
-    if (!inspectedRootDocument)
-      return;
-
-    this.rootDOMNode = inspectedRootDocument;
+    if (domModel.existingDocument())
+      this.rootDOMNode = domModel.existingDocument();
   }
 
   /**
@@ -1156,8 +1151,7 @@
   populateTreeElement(treeElement) {
     if (treeElement.childCount() || !treeElement.isExpandable())
       return;
-
-    this._updateModifiedParentNode(treeElement.node());
+    treeElement.node().getChildNodes(() => this._updateModifiedParentNode(treeElement.node()));
   }
 
   /**
@@ -1303,20 +1297,7 @@
 
     console.assert(!treeElement.isClosingTag());
 
-    // When revealing element, stack of ancestors needs to be unwrapped
-    // synchronously. It is essential that we perform update right away in case
-    // we have children in hand.
-    if (treeElement.node().children()) {
-      this._innerUpdateChildren(treeElement);
-      return;
-    }
-
-    treeElement.node().getChildNodes(children => {
-      // FIXME: sort this out, it should not happen.
-      if (!children)
-        return;
-      this._innerUpdateChildren(treeElement);
-    });
+    this._innerUpdateChildren(treeElement);
   }
 
   /**
diff --git a/third_party/WebKit/Source/devtools/front_end/elements/module.json b/third_party/WebKit/Source/devtools/front_end/elements/module.json
index fc9eb4c8..83538fbb 100644
--- a/third_party/WebKit/Source/devtools/front_end/elements/module.json
+++ b/third_party/WebKit/Source/devtools/front_end/elements/module.json
@@ -156,7 +156,7 @@
             "location": "styles-sidebarpane-toolbar"
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "actionId": "elements.hide-element",
             "contextTypes": [
                 "Elements.ElementsPanel"
@@ -169,7 +169,7 @@
             ]
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "actionId": "elements.edit-as-html",
             "contextTypes": [
                 "Elements.ElementsPanel"
@@ -194,7 +194,7 @@
             "color": "#555"
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "actionId": "elements.toggle-element-search",
             "className": "Elements.InspectElementModeController.ToggleSearchActionDelegate",
             "title": "Select an element in the page to inspect it",
diff --git a/third_party/WebKit/Source/devtools/front_end/elements_test_runner/ElementsTestRunner.js b/third_party/WebKit/Source/devtools/front_end/elements_test_runner/ElementsTestRunner.js
index f2b66dec..c54e880 100644
--- a/third_party/WebKit/Source/devtools/front_end/elements_test_runner/ElementsTestRunner.js
+++ b/third_party/WebKit/Source/devtools/front_end/elements_test_runner/ElementsTestRunner.js
@@ -39,7 +39,7 @@
  * @param {function(!Element): boolean} matchFunction
  * @param {!Function} callback
  */
-ElementsTestRunner.findNode = function(matchFunction, callback) {
+ElementsTestRunner.findNode = async function(matchFunction, callback) {
   callback = TestRunner.safeWrap(callback);
   var result = null;
   var pendingRequests = 0;
@@ -76,10 +76,9 @@
       callback(null);
   }
 
-  TestRunner.domModel.requestDocument(doc => {
-    pendingRequests++;
-    doc.getChildNodes(processChildren.bind(null, doc));
-  });
+  var doc = TestRunner.domModel.existingDocument() || await TestRunner.domModel.requestDocument();
+  pendingRequests++;
+  doc.getChildNodes(processChildren.bind(null, doc));
 };
 
 /**
@@ -196,7 +195,7 @@
 };
 
 ElementsTestRunner.querySelector = async function(selector, callback) {
-  var doc = await TestRunner.domModel.requestDocumentPromise();
+  var doc = await TestRunner.domModel.requestDocument();
   var nodeId = await TestRunner.domModel.querySelector(doc.id, selector);
   callback(TestRunner.domModel.nodeForId(nodeId));
 };
diff --git a/third_party/WebKit/Source/devtools/front_end/emulation/module.json b/third_party/WebKit/Source/devtools/front_end/emulation/module.json
index 87b382f..4a04675e 100644
--- a/third_party/WebKit/Source/devtools/front_end/emulation/module.json
+++ b/third_party/WebKit/Source/devtools/front_end/emulation/module.json
@@ -7,7 +7,7 @@
             "order": 0
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "category": "Mobile",
             "actionId": "emulation.toggle-device-mode",
             "className": "Emulation.DeviceModeWrapper.ActionDelegate",
@@ -26,7 +26,7 @@
             ]
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "actionId": "emulation.capture-screenshot",
             "category": "Mobile",
             "className": "Emulation.DeviceModeWrapper.ActionDelegate",
@@ -47,7 +47,7 @@
             "order": 1
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "actionId": "emulation.capture-full-height-screenshot",
             "category": "Mobile",
             "className": "Emulation.DeviceModeWrapper.ActionDelegate",
@@ -55,7 +55,7 @@
             "tags": "device"
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "actionId": "emulation.capture-node-screenshot",
             "category": "Mobile",
             "className": "Emulation.DeviceModeWrapper.ActionDelegate",
@@ -135,7 +135,7 @@
             ]
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "actionId": "emulation.show-sensors",
             "title": "Sensors",
             "condition": "!v8only",
diff --git a/third_party/WebKit/Source/devtools/front_end/main/module.json b/third_party/WebKit/Source/devtools/front_end/main/module.json
index af3cddf..f1e0af6 100644
--- a/third_party/WebKit/Source/devtools/front_end/main/module.json
+++ b/third_party/WebKit/Source/devtools/front_end/main/module.json
@@ -29,7 +29,7 @@
             "className": "Components.Linkifier.LinkContextMenuProvider"
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "category": "Navigation",
             "actionId": "main.reload",
             "className": "Main.Main.ReloadActionDelegate",
@@ -47,7 +47,7 @@
             ]
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "category": "Navigation",
             "actionId": "main.hard-reload",
             "className": "Main.Main.ReloadActionDelegate",
@@ -64,7 +64,7 @@
             ]
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "category": "Drawer",
             "actionId": "main.toggle-drawer",
             "className": "UI.InspectorView.DrawerToggleActionDelegate",
@@ -77,7 +77,7 @@
             ]
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "actionId": "main.debug-reload",
             "className": "Main.Main.ReloadActionDelegate",
             "bindings": [
@@ -87,7 +87,7 @@
             ]
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "category": "DevTools",
             "title": "Restore last dock position",
             "actionId": "main.toggle-dock",
@@ -104,7 +104,7 @@
             ]
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "actionId": "main.zoom-in",
             "className": "Main.Main.ZoomActionDelegate",
             "bindings": [
@@ -119,7 +119,7 @@
             ]
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "actionId": "main.zoom-out",
             "className": "Main.Main.ZoomActionDelegate",
             "bindings": [
@@ -134,7 +134,7 @@
             ]
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "actionId": "main.zoom-reset",
             "className": "Main.Main.ZoomActionDelegate",
             "bindings": [
@@ -149,7 +149,7 @@
             ]
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "actionId": "main.search-in-panel.find",
             "className": "Main.Main.SearchActionDelegate",
             "bindings": [
@@ -164,7 +164,7 @@
             ]
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "actionId": "main.search-in-panel.cancel",
             "className": "Main.Main.SearchActionDelegate",
             "order": 10,
@@ -175,7 +175,7 @@
             ]
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "actionId": "main.search-in-panel.find-next",
             "className": "Main.Main.SearchActionDelegate",
             "bindings": [
@@ -186,7 +186,7 @@
             ]
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "actionId": "main.search-in-panel.find-previous",
             "className": "Main.Main.SearchActionDelegate",
             "bindings": [
@@ -414,14 +414,14 @@
             "className": "UI.InspectorView"
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "actionId": "components.collect-garbage",
             "title": "Collect garbage",
             "iconClass": "largeicon-trash-bin",
             "className": "Main.GCActionDelegate"
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "category": "Mobile",
             "actionId": "components.request-app-banner",
             "className": "Main.RequestAppBannerActionDelegate",
diff --git a/third_party/WebKit/Source/devtools/front_end/mobile_throttling/module.json b/third_party/WebKit/Source/devtools/front_end/mobile_throttling/module.json
index b367751d7..a06d017d 100644
--- a/third_party/WebKit/Source/devtools/front_end/mobile_throttling/module.json
+++ b/third_party/WebKit/Source/devtools/front_end/mobile_throttling/module.json
@@ -7,7 +7,7 @@
             "defaultValue": []
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "actionId": "network-conditions.network-offline",
             "category": "Network",
             "title": "Go offline",
@@ -15,7 +15,7 @@
             "tags": "device"
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "actionId": "network-conditions.network-online",
             "category": "Network",
             "title": "Go online",
diff --git a/third_party/WebKit/Source/devtools/front_end/network/module.json b/third_party/WebKit/Source/devtools/front_end/network/module.json
index 3f3a3a1f..2f2671a 100644
--- a/third_party/WebKit/Source/devtools/front_end/network/module.json
+++ b/third_party/WebKit/Source/devtools/front_end/network/module.json
@@ -63,7 +63,7 @@
             ]
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "actionId": "network.toggle-recording",
             "iconClass": "largeicon-start-recording",
             "toggledIconClass": "largeicon-stop-recording",
diff --git a/third_party/WebKit/Source/devtools/front_end/profiler/module.json b/third_party/WebKit/Source/devtools/front_end/profiler/module.json
index f60a474e..9d60857 100644
--- a/third_party/WebKit/Source/devtools/front_end/profiler/module.json
+++ b/third_party/WebKit/Source/devtools/front_end/profiler/module.json
@@ -59,7 +59,7 @@
             "defaultValue": true
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "actionId": "profiler.heap-toggle-recording",
             "iconClass": "largeicon-start-recording",
             "toggledIconClass": "largeicon-stop-recording",
@@ -80,7 +80,7 @@
             ]
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "actionId": "profiler.js-toggle-recording",
             "iconClass": "largeicon-start-recording",
             "toggledIconClass": "largeicon-stop-recording",
diff --git a/third_party/WebKit/Source/devtools/front_end/quick_open/module.json b/third_party/WebKit/Source/devtools/front_end/quick_open/module.json
index 0484e8c..7fa61716 100644
--- a/third_party/WebKit/Source/devtools/front_end/quick_open/module.json
+++ b/third_party/WebKit/Source/devtools/front_end/quick_open/module.json
@@ -12,7 +12,7 @@
             "className": "QuickOpen.HelpQuickOpen"
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "actionId": "commandMenu.show",
             "className": "QuickOpen.CommandMenu.ShowActionDelegate",
             "bindings": [
@@ -27,7 +27,7 @@
             ]
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "actionId": "quickOpen.show",
             "title": "Open file",
             "className": "QuickOpen.QuickOpen.ShowActionDelegate",
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/DOMDebuggerModel.js b/third_party/WebKit/Source/devtools/front_end/sdk/DOMDebuggerModel.js
index a7fec06..7e11f65 100644
--- a/third_party/WebKit/Source/devtools/front_end/sdk/DOMDebuggerModel.js
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/DOMDebuggerModel.js
@@ -54,7 +54,7 @@
   }
 
   retrieveDOMBreakpoints() {
-    this._domModel.requestDocumentPromise();
+    this._domModel.requestDocument();
   }
 
   /**
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/DOMModel.js b/third_party/WebKit/Source/devtools/front_end/sdk/DOMModel.js
index 2bfec5f..fbbc841a 100644
--- a/third_party/WebKit/Source/devtools/front_end/sdk/DOMModel.js
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/DOMModel.js
@@ -1125,33 +1125,31 @@
   }
 
   /**
-   * @param {function(!SDK.DOMDocument)} callback
+   * @return {!Promise<!SDK.DOMDocument>}
    */
-  requestDocument(callback) {
+  requestDocument() {
     if (this._document)
-      callback(this._document);
-    else
-      this.requestDocumentPromise().then(callback);
+      return Promise.resolve(this._document);
+    if (!this._pendingDocumentRequestPromise)
+      this._pendingDocumentRequestPromise = this._requestDocument();
+    return this._pendingDocumentRequestPromise;
   }
 
   /**
    * @return {!Promise<!SDK.DOMDocument>}
    */
-  requestDocumentPromise() {
-    if (this._document)
-      return Promise.resolve(this._document);
-    if (this._pendingDocumentRequestPromise)
-      return this._pendingDocumentRequestPromise;
+  async _requestDocument() {
+    var documentPayload = await this._agent.getDocument();
+    delete this._pendingDocumentRequestPromise;
 
-    this._pendingDocumentRequestPromise = this._agent.getDocument().then(root => {
-      if (root)
-        this._setDocument(root);
-      delete this._pendingDocumentRequestPromise;
-      if (!this._document)
-        console.error('No document');
-      return this._document;
-    });
-    return this._pendingDocumentRequestPromise;
+    // Code below needs to be sync.
+    if (documentPayload)
+      this._setDocument(documentPayload);
+    if (!this._document) {
+      console.error('No document');
+      return null;
+    }
+    return this._document;
   }
 
   /**
@@ -1166,7 +1164,7 @@
    * @return {!Promise<?SDK.DOMNode>}
    */
   async pushNodeToFrontend(objectId) {
-    await this.requestDocumentPromise();
+    await this.requestDocument();
     var nodeId = await this._agent.requestNode(objectId);
     return nodeId ? this.nodeForId(nodeId) : null;
   }
@@ -1176,7 +1174,7 @@
    * @return {!Promise<?Protocol.DOM.NodeId>}
    */
   pushNodeByPathToFrontend(path) {
-    return this.requestDocumentPromise().then(() => this._agent.pushNodeByPathToFrontend(path));
+    return this.requestDocument().then(() => this._agent.pushNodeByPathToFrontend(path));
   }
 
   /**
@@ -1184,7 +1182,7 @@
    * @return {!Promise<?Map<number, ?SDK.DOMNode>>}
    */
   async pushNodesByBackendIdsToFrontend(backendNodeIds) {
-    await this.requestDocumentPromise();
+    await this.requestDocument();
     var backendNodeIdsArray = backendNodeIds.valuesArray();
     var nodeIds = await this._agent.pushNodesByBackendIdsToFrontend(backendNodeIdsArray);
     if (!nodeIds)
@@ -1293,6 +1291,8 @@
   }
 
   _documentUpdated() {
+    // If we have this._pendingDocumentRequestPromise in flight,
+    // if it hits backend post document update, it will contain proper result.
     this._setDocument(null);
   }
 
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/OverlayModel.js b/third_party/WebKit/Source/devtools/front_end/sdk/OverlayModel.js
index 3a75d8c..17cffc3 100644
--- a/third_party/WebKit/Source/devtools/front_end/sdk/OverlayModel.js
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/OverlayModel.js
@@ -124,7 +124,7 @@
    * @return {!Promise}
    */
   async setInspectMode(mode) {
-    await this._domModel.requestDocumentPromise();
+    await this._domModel.requestDocument();
     this._inspectModeEnabled = mode !== Protocol.Overlay.InspectMode.None;
     this.dispatchEventToListeners(SDK.OverlayModel.Events.InspectModeWillBeToggled, this);
     this._highlighter.setInspectMode(mode, this._buildHighlightConfig());
diff --git a/third_party/WebKit/Source/devtools/front_end/settings/module.json b/third_party/WebKit/Source/devtools/front_end/settings/module.json
index 69e78a1..c21720b 100644
--- a/third_party/WebKit/Source/devtools/front_end/settings/module.json
+++ b/third_party/WebKit/Source/devtools/front_end/settings/module.json
@@ -1,7 +1,7 @@
 {
     "extensions": [
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "category": "Settings",
             "actionId": "settings.show",
             "title": "Settings",
@@ -13,14 +13,14 @@
             ]
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "category": "Settings",
             "actionId": "settings.documentation",
             "title": "Documentation",
             "className": "Settings.SettingsScreen.ActionDelegate"
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "category": "Settings",
             "actionId": "settings.shortcuts",
             "title": "Shortcuts",
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/SourcesView.js b/third_party/WebKit/Source/devtools/front_end/sources/SourcesView.js
index 681dd9e..014f38a3b 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/SourcesView.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/SourcesView.js
@@ -111,6 +111,10 @@
     }
     element.createChild('div').textContent = Common.UIString('Drop in a folder to add to workspace');
 
+    element.appendChild(UI.XLink.create(
+        'https://developers.google.com/web/tools/chrome-devtools/sources?utm_source=devtools&utm_campaign=2018Q1',
+        'Learn more'));
+
     return element;
   }
 
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/module.json b/third_party/WebKit/Source/devtools/front_end/sources/module.json
index c5b7ef3..4d3a373 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/module.json
+++ b/third_party/WebKit/Source/devtools/front_end/sources/module.json
@@ -20,7 +20,7 @@
             "className": "Sources.SourcesPanel"
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "category": "Debugger",
             "actionId": "debugger.toggle-pause",
             "iconClass": "largeicon-pause",
@@ -52,7 +52,7 @@
             ]
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "actionId": "debugger.step-over",
             "className": "Sources.SourcesPanel.DebuggingActionDelegate",
             "title": "Step over next function call",
@@ -72,7 +72,7 @@
             ]
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "actionId": "debugger.step-into",
             "className": "Sources.SourcesPanel.DebuggingActionDelegate",
             "title": "Step into next function call",
@@ -92,7 +92,7 @@
             ]
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "actionId": "debugger.step",
             "className": "Sources.SourcesPanel.DebuggingActionDelegate",
             "title": "Step",
@@ -107,7 +107,7 @@
             ]
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "actionId": "debugger.step-out",
             "className": "Sources.SourcesPanel.DebuggingActionDelegate",
             "title": "Step out of current function",
@@ -127,7 +127,7 @@
             ]
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "actionId": "debugger.run-snippet",
             "className": "Sources.SourcesPanel.DebuggingActionDelegate",
             "title": "Run snippet",
@@ -147,7 +147,7 @@
             ]
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "actionId": "sources.search.toggle",
             "title": "Search all files",
             "className": "Sources.AdvancedSearchView.ActionDelegate",
@@ -164,7 +164,7 @@
             ]
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "category": "Debugger",
             "actionId": "debugger.toggle-breakpoints-active",
             "iconClass": "largeicon-deactivate-breakpoints",
@@ -195,7 +195,7 @@
             ]
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "actionId": "sources.add-to-watch",
             "className": "Sources.WatchExpressionsSidebarPane",
             "title": "Add selected text to watches",
@@ -216,7 +216,7 @@
             "className": "Sources.WatchExpressionsSidebarPane"
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "actionId": "debugger.evaluate-selection",
             "className": "Sources.SourcesPanel.DebuggingActionDelegate",
             "title": "Evaluate in console",
@@ -364,7 +364,7 @@
             "className": "Sources.SnippetsNavigatorView"
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "actionId": "sources.switch-file",
             "className": "Sources.SourcesView.SwitchFileActionDelegate",
             "contextTypes": [
@@ -570,21 +570,21 @@
             "className": "Sources.SourcesPanel.WrapperView"
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "category": "Sources",
             "actionId": "sources.close-all",
             "className": "Sources.SourcesView.CloseAllActionDelegate",
             "title": "Close All"
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "category": "Sources",
             "actionId": "sources.create-snippet",
             "className": "Sources.SnippetsNavigatorView.CreatingActionDelegate",
             "title": "Create new snippet"
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "category": "Sources",
             "actionId": "sources.add-folder-to-workspace",
             "className": "Sources.SnippetsNavigatorView.CreatingActionDelegate",
diff --git a/third_party/WebKit/Source/devtools/front_end/timeline/module.json b/third_party/WebKit/Source/devtools/front_end/timeline/module.json
index fcee6f6..7e0c5601 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline/module.json
+++ b/third_party/WebKit/Source/devtools/front_end/timeline/module.json
@@ -45,7 +45,7 @@
             "order": 15
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "actionId": "timeline.toggle-recording",
             "iconClass": "largeicon-start-recording",
             "toggledIconClass": "largeicon-stop-recording",
@@ -76,7 +76,7 @@
             ]
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "actionId": "timeline.record-reload",
             "iconClass": "largeicon-refresh",
             "contextTypes": [
@@ -97,7 +97,7 @@
             ]
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "category": "Timeline",
             "actionId": "timeline.save-to-file",
             "contextTypes": [
@@ -117,7 +117,7 @@
             ]
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "category": "Timeline",
             "actionId": "timeline.load-from-file",
             "contextTypes": [
@@ -137,7 +137,7 @@
             ]
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "actionId": "timeline.jump-to-previous-frame",
             "contextTypes": [
                 "Timeline.TimelinePanel"
@@ -150,7 +150,7 @@
             ]
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "actionId": "timeline.jump-to-next-frame",
             "contextTypes": [
                 "Timeline.TimelinePanel"
@@ -163,7 +163,7 @@
             ]
         },
         {
-            "type": "@UI.ActionDelegate",
+            "type": "action",
             "actionId": "timeline.show-history",
             "className": "Timeline.TimelinePanel.ActionDelegate",
             "category": "Performance",
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/ActionRegistry.js b/third_party/WebKit/Source/devtools/front_end/ui/ActionRegistry.js
index 4efcbfa..5616fa2 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/ActionRegistry.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/ActionRegistry.js
@@ -12,13 +12,15 @@
   }
 
   _registerActions() {
-    self.runtime.extensions(UI.ActionDelegate).forEach(registerExtension, this);
+    self.runtime.extensions('action').forEach(registerExtension, this);
 
     /**
      * @param {!Runtime.Extension} extension
      * @this {UI.ActionRegistry}
      */
     function registerExtension(extension) {
+      if (!extension.canInstantiate())
+        return;
       var actionId = extension.descriptor()['actionId'];
       console.assert(actionId);
       console.assert(!this._actionsById.get(actionId));
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/ShortcutRegistry.js b/third_party/WebKit/Source/devtools/front_end/ui/ShortcutRegistry.js
index ff4b272..469a165 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/ShortcutRegistry.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/ShortcutRegistry.js
@@ -74,6 +74,17 @@
   }
 
   /**
+   * @param {!KeyboardEvent} event
+   * @param {string} actionId
+   * @return {boolean}
+   */
+  eventMatchesAction(event, actionId) {
+    console.assert(this._defaultActionToShortcut.has(actionId), 'Unknown action ' + actionId);
+    var key = UI.KeyboardShortcut.makeKeyFromEvent(event);
+    return this._defaultActionToShortcut.get(actionId).valuesArray().some(descriptor => descriptor.key === key);
+  }
+
+  /**
    * @param {number} key
    * @param {string} domKey
    * @param {!KeyboardEvent=} event
@@ -160,7 +171,7 @@
    */
   _registerBindings(document) {
     document.addEventListener('input', this.dismissPendingShortcutAction.bind(this), true);
-    var extensions = self.runtime.extensions(UI.ActionDelegate);
+    var extensions = self.runtime.extensions('action');
     extensions.forEach(registerExtension, this);
 
     /**
diff --git a/third_party/WebKit/Source/modules/csspaint/CSSPaintDefinition.cpp b/third_party/WebKit/Source/modules/csspaint/CSSPaintDefinition.cpp
index 5a04794..69feb804 100644
--- a/third_party/WebKit/Source/modules/csspaint/CSSPaintDefinition.cpp
+++ b/third_party/WebKit/Source/modules/csspaint/CSSPaintDefinition.cpp
@@ -69,9 +69,6 @@
     const ImageResourceObserver& client,
     const IntSize& container_size,
     const CSSStyleValueVector* paint_arguments) {
-  if (!paint_arguments)
-    return nullptr;
-
   // TODO: Break dependency on LayoutObject. Passing the Node should work.
   const LayoutObject& layout_object = static_cast<const LayoutObject&>(client);
 
@@ -104,11 +101,19 @@
                                                native_invalidation_properties_,
                                                custom_invalidation_properties_);
 
-  v8::Local<v8::Value> argv[] = {
-      ToV8(rendering_context, script_state_->GetContext()->Global(), isolate),
-      ToV8(paint_size, script_state_->GetContext()->Global(), isolate),
-      ToV8(style_map, script_state_->GetContext()->Global(), isolate),
-      ToV8(*paint_arguments, script_state_->GetContext()->Global(), isolate)};
+  Vector<v8::Local<v8::Value>, 4> argv;
+  if (paint_arguments) {
+    argv = {
+        ToV8(rendering_context, script_state_->GetContext()->Global(), isolate),
+        ToV8(paint_size, script_state_->GetContext()->Global(), isolate),
+        ToV8(style_map, script_state_->GetContext()->Global(), isolate),
+        ToV8(*paint_arguments, script_state_->GetContext()->Global(), isolate)};
+  } else {
+    argv = {
+        ToV8(rendering_context, script_state_->GetContext()->Global(), isolate),
+        ToV8(paint_size, script_state_->GetContext()->Global(), isolate),
+        ToV8(style_map, script_state_->GetContext()->Global(), isolate)};
+  }
 
   v8::Local<v8::Function> paint = paint_.NewLocal(isolate);
 
@@ -117,7 +122,7 @@
 
   V8ScriptRunner::CallFunction(paint,
                                ExecutionContext::From(script_state_.get()),
-                               instance, WTF_ARRAY_LENGTH(argv), argv, isolate);
+                               instance, argv.size(), argv.data(), isolate);
 
   // The paint function may have produced an error, in which case produce an
   // invalid image.
diff --git a/third_party/WebKit/Source/modules/csspaint/PaintWorkletTest.cpp b/third_party/WebKit/Source/modules/csspaint/PaintWorkletTest.cpp
index aa14d48..c0a3aac 100644
--- a/third_party/WebKit/Source/modules/csspaint/PaintWorkletTest.cpp
+++ b/third_party/WebKit/Source/modules/csspaint/PaintWorkletTest.cpp
@@ -141,8 +141,8 @@
 // This is a crash test for crbug.com/803026. At some point, we shipped the
 // CSSPaintAPI without shipping the CSSPaintAPIArguments, the result of it is
 // that the |paint_arguments| in the CSSPaintDefinition::Paint() becomes
-// nullptr and we need to null check that. This is a regression test to ensure
-// that we don't crash.
+// nullptr and the renderer crashes. This is a regression test to ensure that
+// we will never crash.
 TEST_F(PaintWorkletTest, PaintWithNullPaintArguments) {
   PaintWorkletGlobalScope* global_scope = GetProxy()->global_scope();
   global_scope->ScriptController()->Evaluate(
@@ -157,7 +157,7 @@
   const IntSize container_size(100, 100);
   scoped_refptr<Image> image =
       definition->Paint(*observer, container_size, nullptr);
-  EXPECT_EQ(image, nullptr);
+  EXPECT_NE(image, nullptr);
 }
 
 // In this test, we set a list of "paints_to_switch" numbers, and in each frame,
diff --git a/third_party/WebKit/Source/modules/filesystem/DOMFileSystem.cpp b/third_party/WebKit/Source/modules/filesystem/DOMFileSystem.cpp
index 3341272..1c543b2 100644
--- a/third_party/WebKit/Source/modules/filesystem/DOMFileSystem.cpp
+++ b/third_party/WebKit/Source/modules/filesystem/DOMFileSystem.cpp
@@ -208,6 +208,9 @@
 
 void DOMFileSystem::ScheduleCallback(ExecutionContext* execution_context,
                                      base::OnceClosure task) {
+  if (!execution_context)
+    return;
+
   DCHECK(execution_context->IsContextThread());
 
   std::unique_ptr<int> identifier = std::make_unique<int>(0);
diff --git a/third_party/WebKit/Source/modules/mediasource/MediaSource.h b/third_party/WebKit/Source/modules/mediasource/MediaSource.h
index d291298..273f5e9 100644
--- a/third_party/WebKit/Source/modules/mediasource/MediaSource.h
+++ b/third_party/WebKit/Source/modules/mediasource/MediaSource.h
@@ -35,8 +35,8 @@
 #include "bindings/core/v8/ActiveScriptWrappable.h"
 #include "core/dom/ContextLifecycleObserver.h"
 #include "core/dom/ExceptionCode.h"
+#include "core/fileapi/URLRegistry.h"
 #include "core/html/TimeRanges.h"
-#include "core/html/URLRegistry.h"
 #include "core/html/media/HTMLMediaSource.h"
 #include "modules/EventTargetModules.h"
 #include "modules/mediasource/SourceBuffer.h"
diff --git a/third_party/WebKit/Source/modules/mediasource/MediaSourceRegistry.h b/third_party/WebKit/Source/modules/mediasource/MediaSourceRegistry.h
index 80bbc3f..6fffc3a 100644
--- a/third_party/WebKit/Source/modules/mediasource/MediaSourceRegistry.h
+++ b/third_party/WebKit/Source/modules/mediasource/MediaSourceRegistry.h
@@ -32,7 +32,7 @@
 #define MediaSourceRegistry_h
 
 #include "base/memory/scoped_refptr.h"
-#include "core/html/URLRegistry.h"
+#include "core/fileapi/URLRegistry.h"
 #include "platform/heap/Handle.h"
 #include "platform/wtf/HashMap.h"
 #include "platform/wtf/text/StringHash.h"
diff --git a/third_party/WebKit/Source/modules/mediastream/MediaStream.h b/third_party/WebKit/Source/modules/mediastream/MediaStream.h
index 9f72dc1..5fcf292 100644
--- a/third_party/WebKit/Source/modules/mediastream/MediaStream.h
+++ b/third_party/WebKit/Source/modules/mediastream/MediaStream.h
@@ -26,7 +26,7 @@
 #ifndef MediaStream_h
 #define MediaStream_h
 
-#include "core/html/URLRegistry.h"
+#include "core/fileapi/URLRegistry.h"
 #include "modules/EventTargetModules.h"
 #include "modules/ModulesExport.h"
 #include "modules/mediastream/MediaStreamTrack.h"
diff --git a/third_party/WebKit/Source/modules/mediastream/MediaStreamRegistry.h b/third_party/WebKit/Source/modules/mediastream/MediaStreamRegistry.h
index c06adef0..5ce9f3f 100644
--- a/third_party/WebKit/Source/modules/mediastream/MediaStreamRegistry.h
+++ b/third_party/WebKit/Source/modules/mediastream/MediaStreamRegistry.h
@@ -25,7 +25,7 @@
 #ifndef MediaStreamRegistry_h
 #define MediaStreamRegistry_h
 
-#include "core/html/URLRegistry.h"
+#include "core/fileapi/URLRegistry.h"
 #include "modules/ModulesExport.h"
 #include "platform/heap/Handle.h"
 #include "platform/wtf/HashMap.h"
diff --git a/third_party/WebKit/Source/platform/BUILD.gn b/third_party/WebKit/Source/platform/BUILD.gn
index d6547c6..b5d0ef6 100644
--- a/third_party/WebKit/Source/platform/BUILD.gn
+++ b/third_party/WebKit/Source/platform/BUILD.gn
@@ -272,6 +272,18 @@
   }
 }
 
+source_set("platform_export") {
+  sources = [
+    "PlatformExport.h",
+  ]
+
+  visibility = []  # Allow re-assignment of list.
+  visibility = [
+    ":platform",
+    "//mojo/public/cpp/bindings:wtf_support",
+  ]
+}
+
 jumbo_component("platform") {
   visibility = []  # Allow re-assignment of list.
   visibility = [
@@ -357,7 +369,6 @@
     "PartitionAllocMemoryDumpProvider.h",
     "PasteMode.h",
     "PlatformChromeClient.h",
-    "PlatformExport.h",
     "PlatformFrameView.h",
     "Prerender.cpp",
     "Prerender.h",
@@ -1533,6 +1544,7 @@
     "//third_party/WebKit/Source/platform/scheduler",
   ]
   deps = [
+    ":platform_export",
     "//base/allocator:features",
     "//components/viz/service",
     "//device/base/synchronization",
diff --git a/third_party/WebKit/Source/platform/graphics/CanvasResource.cpp b/third_party/WebKit/Source/platform/graphics/CanvasResource.cpp
index 418e296..fef5cef 100644
--- a/third_party/WebKit/Source/platform/graphics/CanvasResource.cpp
+++ b/third_party/WebKit/Source/platform/graphics/CanvasResource.cpp
@@ -128,13 +128,9 @@
 
 void CanvasResource_Bitmap::TearDown() {
   WaitSyncTokenBeforeRelease();
-  auto gl = ContextGL();
-  if (gl && HasGpuMailbox()) {
-    DCHECK(image_->IsTextureBacked());
-    // To avoid leaking Mailbox records, we must disassociate the mailbox
-    // before image_ goes out of scope because skia might recycle the texture.
-    gl->ProduceTextureDirectCHROMIUM(0, GetOrCreateGpuMailbox().name);
-  }
+  // We must not disassociate the mailbox from the texture object here because
+  // the texture may be recycled by skia and the associated cached mailbox
+  // stored by GraphicsContext3DUtils.cpp must remain valid.
   image_ = nullptr;
 }
 
diff --git a/third_party/WebKit/Source/platform/graphics/CanvasResourceTest.cpp b/third_party/WebKit/Source/platform/graphics/CanvasResourceTest.cpp
index ae0d477..061afca 100644
--- a/third_party/WebKit/Source/platform/graphics/CanvasResourceTest.cpp
+++ b/third_party/WebKit/Source/platform/graphics/CanvasResourceTest.cpp
@@ -105,10 +105,20 @@
   ::testing::Mock::VerifyAndClearExpectations(&gl_);
 
   // No expected call to DeleteTextures becaus skia recycles
+  // No expected call to ProduceTextureDirectCHROMIUM(0, *) because
+  // mailbox is cached by GraphicsContext3DUtils and therefore does not need to
+  // be orphaned.
+  EXPECT_CALL(gl_, ProduceTextureDirectCHROMIUM(0, _)).Times(0);
+  resource = nullptr;
+
+  ::testing::Mock::VerifyAndClearExpectations(&gl_);
+
+  // Purging skia's resource cache will finally delete the GrTexture, resulting
+  // in the mailbox being orphaned via ProduceTextureDirectCHROMIUM.
   EXPECT_CALL(gl_,
               ProduceTextureDirectCHROMIUM(0, Pointee(test_mailbox.name[0])))
-      .Times(1);
-  resource = nullptr;
+      .Times(0);
+  GetGrContext()->performDeferredCleanup(std::chrono::milliseconds(0));
 
   ::testing::Mock::VerifyAndClearExpectations(&gl_);
 }
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/tool/servers/rebaseline_server.py b/third_party/WebKit/Tools/Scripts/webkitpy/tool/servers/rebaseline_server.py
deleted file mode 100644
index c3d9b3f..0000000
--- a/third_party/WebKit/Tools/Scripts/webkitpy/tool/servers/rebaseline_server.py
+++ /dev/null
@@ -1,285 +0,0 @@
-# Copyright (c) 2010 Google Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-#     * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#     * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-#     * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-import fnmatch
-import os
-import os.path
-import BaseHTTPServer
-
-from webkitpy.layout_tests.port.base import Port
-from webkitpy.tool.servers.reflection_handler import ReflectionHandler
-
-
-STATE_NEEDS_REBASELINE = 'needs_rebaseline'
-STATE_REBASELINE_FAILED = 'rebaseline_failed'
-STATE_REBASELINE_SUCCEEDED = 'rebaseline_succeeded'
-
-
-def _get_actual_result_files(test_file, test_config):
-    test_name, _ = os.path.splitext(test_file)
-    test_directory = os.path.dirname(test_file)
-
-    test_results_directory = test_config.filesystem.join(
-        test_config.results_directory, test_directory)
-    actual_pattern = os.path.basename(test_name) + '-actual.*'
-    actual_files = []
-    for filename in test_config.filesystem.listdir(test_results_directory):
-        if fnmatch.fnmatch(filename, actual_pattern):
-            actual_files.append(filename)
-    actual_files.sort()
-    return tuple(actual_files)
-
-
-def _rebaseline_test(test_file, baseline_target, baseline_move_to, test_config, log):
-    test_name, _ = os.path.splitext(test_file)
-    test_directory = os.path.dirname(test_name)
-
-    log('Rebaselining %s...' % test_name)
-
-    actual_result_files = _get_actual_result_files(test_file, test_config)
-    filesystem = test_config.filesystem
-    git = test_config.git
-    layout_tests_directory = test_config.layout_tests_directory
-    target_expectations_directory = filesystem.join(
-        layout_tests_directory, 'platform', baseline_target, test_directory)
-    test_results_directory = test_config.filesystem.join(
-        test_config.results_directory, test_directory)
-
-    # If requested, move current baselines out
-    current_baselines = get_test_baselines(test_file, test_config)
-    if baseline_target in current_baselines and baseline_move_to != 'none':
-        log('  Moving current %s baselines to %s' %
-            (baseline_target, baseline_move_to))
-
-        # See which ones we need to move (only those that are about to be
-        # updated), and make sure we're not clobbering any files in the
-        # destination.
-        current_extensions = set(current_baselines[baseline_target].keys())
-        actual_result_extensions = [
-            os.path.splitext(f)[1] for f in actual_result_files]
-        extensions_to_move = current_extensions.intersection(
-            actual_result_extensions)
-
-        if extensions_to_move.intersection(
-                current_baselines.get(baseline_move_to, {}).keys()):
-            log('    Already had baselines in %s, could not move existing '
-                '%s ones' % (baseline_move_to, baseline_target))
-            return False
-
-        # Do the actual move.
-        if extensions_to_move:
-            if not _move_test_baselines(
-                    test_file,
-                    list(extensions_to_move),
-                    baseline_target,
-                    baseline_move_to,
-                    test_config,
-                    log):
-                return False
-        else:
-            log('    No current baselines to move')
-
-    log('  Updating baselines for %s' % baseline_target)
-    filesystem.maybe_make_directory(target_expectations_directory)
-    for source_file in actual_result_files:
-        source_path = filesystem.join(test_results_directory, source_file)
-        destination_file = source_file.replace('-actual', '-expected')
-        destination_path = filesystem.join(
-            target_expectations_directory, destination_file)
-        filesystem.copyfile(source_path, destination_path)
-        exit_code = git.add(destination_path, return_exit_code=True)
-        if exit_code:
-            log('    Could not update %s in SCM, exit code %d' %
-                (destination_file, exit_code))
-            return False
-        else:
-            log('    Updated %s' % destination_file)
-
-    return True
-
-
-def _move_test_baselines(test_file, extensions_to_move, source_platform, destination_platform, test_config, log):
-    test_file_name = os.path.splitext(os.path.basename(test_file))[0]
-    test_directory = os.path.dirname(test_file)
-    filesystem = test_config.filesystem
-
-    # Want predictable output order for unit tests.
-    extensions_to_move.sort()
-
-    source_directory = os.path.join(
-        test_config.layout_tests_directory,
-        'platform',
-        source_platform,
-        test_directory)
-    destination_directory = os.path.join(
-        test_config.layout_tests_directory,
-        'platform',
-        destination_platform,
-        test_directory)
-    filesystem.maybe_make_directory(destination_directory)
-
-    for extension in extensions_to_move:
-        file_name = test_file_name + '-expected' + extension
-        source_path = filesystem.join(source_directory, file_name)
-        destination_path = filesystem.join(destination_directory, file_name)
-        filesystem.copyfile(source_path, destination_path)
-        exit_code = test_config.git.add(destination_path, return_exit_code=True)
-        if exit_code:
-            log('    Could not update %s in SCM, exit code %d' %
-                (file_name, exit_code))
-            return False
-        else:
-            log('    Moved %s' % file_name)
-
-    return True
-
-
-def get_test_baselines(test_file, test_config):
-
-    # FIXME: This seems like a hack. This only seems used to access the Port.expected_baselines logic.
-    # Also, abstract method path_to_apache is not overidden; this will be fixed if this function is changed
-    # to not use a sub-class of Port. pylint: disable=abstract-method
-    class AllPlatformsPort(Port):
-
-        def __init__(self, host):
-            super(AllPlatformsPort, self).__init__(host, 'mac')
-            self._platforms_by_directory = dict([(self._absolute_baseline_path(p), p) for p in test_config.platforms])
-
-        def baseline_search_path(self):
-            return self._platforms_by_directory.keys()
-
-        def platform_from_directory(self, directory):
-            return self._platforms_by_directory[directory]
-
-    all_platforms_port = AllPlatformsPort(test_config.host)
-
-    all_test_baselines = {}
-    for baseline_extension in ('.txt', '.checksum', '.png'):
-        test_baselines = test_config.test_port.expected_baselines(test_file, baseline_extension)
-        baselines = all_platforms_port.expected_baselines(test_file, baseline_extension, all_baselines=True)
-        for platform_directory, expected_filename in baselines:
-            if not platform_directory:
-                continue
-            if platform_directory == test_config.layout_tests_directory:
-                platform = 'base'
-            else:
-                platform = all_platforms_port.platform_from_directory(platform_directory)
-            platform_baselines = all_test_baselines.setdefault(platform, {})
-            was_used_for_test = (platform_directory, expected_filename) in test_baselines
-            platform_baselines[baseline_extension] = was_used_for_test
-
-    return all_test_baselines
-
-
-class RebaselineHTTPServer(BaseHTTPServer.HTTPServer):
-
-    def __init__(self, httpd_port, config):
-        server_name = ''
-        BaseHTTPServer.HTTPServer.__init__(self, (server_name, httpd_port), RebaselineHTTPRequestHandler)
-        self.test_config = config['test_config']
-        self.results_json = config['results_json']
-        self.platforms_json = config['platforms_json']
-
-
-class RebaselineHTTPRequestHandler(ReflectionHandler):
-    STATIC_FILE_NAMES = frozenset([
-        'index.html',
-        'loupe.js',
-        'main.js',
-        'main.css',
-        'queue.js',
-        'util.js',
-    ])
-
-    STATIC_FILE_DIRECTORY = os.path.join(os.path.dirname(__file__), 'data', 'rebaseline_server')
-
-    def results_json(self):
-        self._serve_json(self.server.results_json)
-
-    def test_config(self):
-        self._serve_json(self.server.test_config)
-
-    def platforms_json(self):
-        self._serve_json(self.server.platforms_json)
-
-    def rebaseline(self):
-        test = self.query['test'][0]
-        baseline_target = self.query['baseline-target'][0]
-        baseline_move_to = self.query['baseline-move-to'][0]
-        test_json = self.server.results_json['tests'][test]
-
-        if test_json['state'] != STATE_NEEDS_REBASELINE:
-            self.send_error(400, 'Test %s is in unexpected state: %s' % (test, test_json['state']))
-            return
-
-        log = []
-        success = _rebaseline_test(
-            test,
-            baseline_target,
-            baseline_move_to,
-            self.server.test_config,
-            log=log.append)
-
-        if success:
-            test_json['state'] = STATE_REBASELINE_SUCCEEDED
-            self.send_response(200)
-        else:
-            test_json['state'] = STATE_REBASELINE_FAILED
-            self.send_response(500)
-
-        self.send_header('Content-type', 'text/plain')
-        self.end_headers()
-        self.wfile.write('\n'.join(log))
-
-    def test_result(self):
-        test_name, _ = os.path.splitext(self.query['test'][0])
-        mode = self.query['mode'][0]
-        if mode == 'expected-image':
-            file_name = test_name + '-expected.png'
-        elif mode == 'actual-image':
-            file_name = test_name + '-actual.png'
-        if mode == 'expected-checksum':
-            file_name = test_name + '-expected.checksum'
-        elif mode == 'actual-checksum':
-            file_name = test_name + '-actual.checksum'
-        elif mode == 'diff-image':
-            file_name = test_name + '-diff.png'
-        if mode == 'expected-text':
-            file_name = test_name + '-expected.txt'
-        elif mode == 'actual-text':
-            file_name = test_name + '-actual.txt'
-        elif mode == 'diff-text':
-            file_name = test_name + '-diff.txt'
-        elif mode == 'diff-text-pretty':
-            file_name = test_name + '-pretty-diff.html'
-
-        file_path = os.path.join(self.server.test_config.results_directory, file_name)
-
-        # Let results be cached for 60 seconds, so that they can be pre-fetched
-        # by the UI
-        self._serve_file(file_path, cacheable_seconds=60)
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/tool/servers/rebaseline_server_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/tool/servers/rebaseline_server_unittest.py
deleted file mode 100644
index 484384b..0000000
--- a/third_party/WebKit/Tools/Scripts/webkitpy/tool/servers/rebaseline_server_unittest.py
+++ /dev/null
@@ -1,323 +0,0 @@
-# Copyright (C) 2010 Google Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-#    * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#    * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-#    * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-import json
-import sys
-import unittest
-
-from webkitpy.common.net import layout_test_results_unittest
-from webkitpy.common.host_mock import MockHost
-from webkitpy.layout_tests.layout_package.json_results_generator import strip_json_wrapper
-from webkitpy.layout_tests.port.base import Port
-from webkitpy.tool.commands.rebaseline_server import TestConfig, RebaselineServer
-from webkitpy.tool.servers import rebaseline_server
-
-
-@unittest.skipIf(sys.platform == 'win32', 'fails on Windows')
-class RebaselineTestTest(unittest.TestCase):
-
-    def test_text_rebaseline_update(self):
-        self._assertRebaseline(
-            test_files=(
-                'fast/text-expected.txt',
-                'platform/mac/fast/text-expected.txt',
-            ),
-            results_files=(
-                'fast/text-actual.txt',
-            ),
-            test_name='fast/text.html',
-            baseline_target='mac',
-            baseline_move_to='none',
-            expected_success=True,
-            expected_log=[
-                'Rebaselining fast/text...',
-                '  Updating baselines for mac',
-                '    Updated text-expected.txt',
-            ])
-
-    def test_text_rebaseline_new(self):
-        self._assertRebaseline(
-            test_files=(
-                'fast/text-expected.txt',
-            ),
-            results_files=(
-                'fast/text-actual.txt',
-            ),
-            test_name='fast/text.html',
-            baseline_target='mac',
-            baseline_move_to='none',
-            expected_success=True,
-            expected_log=[
-                'Rebaselining fast/text...',
-                '  Updating baselines for mac',
-                '    Updated text-expected.txt',
-            ])
-
-    def test_text_rebaseline_move_no_op_1(self):
-        self._assertRebaseline(
-            test_files=(
-                'fast/text-expected.txt',
-                'platform/win/fast/text-expected.txt',
-            ),
-            results_files=(
-                'fast/text-actual.txt',
-            ),
-            test_name='fast/text.html',
-            baseline_target='mac',
-            baseline_move_to='mac-leopard',
-            expected_success=True,
-            expected_log=[
-                'Rebaselining fast/text...',
-                '  Updating baselines for mac',
-                '    Updated text-expected.txt',
-            ])
-
-    def test_text_rebaseline_move_no_op_2(self):
-        self._assertRebaseline(
-            test_files=(
-                'fast/text-expected.txt',
-                'platform/mac/fast/text-expected.checksum',
-            ),
-            results_files=(
-                'fast/text-actual.txt',
-            ),
-            test_name='fast/text.html',
-            baseline_target='mac',
-            baseline_move_to='mac-leopard',
-            expected_success=True,
-            expected_log=[
-                'Rebaselining fast/text...',
-                '  Moving current mac baselines to mac-leopard',
-                '    No current baselines to move',
-                '  Updating baselines for mac',
-                '    Updated text-expected.txt',
-            ])
-
-    def test_text_rebaseline_move(self):
-        self._assertRebaseline(
-            test_files=(
-                'fast/text-expected.txt',
-                'platform/mac/fast/text-expected.txt',
-            ),
-            results_files=(
-                'fast/text-actual.txt',
-            ),
-            test_name='fast/text.html',
-            baseline_target='mac',
-            baseline_move_to='mac-leopard',
-            expected_success=True,
-            expected_log=[
-                'Rebaselining fast/text...',
-                '  Moving current mac baselines to mac-leopard',
-                '    Moved text-expected.txt',
-                '  Updating baselines for mac',
-                '    Updated text-expected.txt',
-            ])
-
-    def test_text_rebaseline_move_only_images(self):
-        self._assertRebaseline(
-            test_files=(
-                'fast/image-expected.txt',
-                'platform/mac/fast/image-expected.txt',
-                'platform/mac/fast/image-expected.png',
-                'platform/mac/fast/image-expected.checksum',
-            ),
-            results_files=(
-                'fast/image-actual.png',
-                'fast/image-actual.checksum',
-            ),
-            test_name='fast/image.html',
-            baseline_target='mac',
-            baseline_move_to='mac-leopard',
-            expected_success=True,
-            expected_log=[
-                'Rebaselining fast/image...',
-                '  Moving current mac baselines to mac-leopard',
-                '    Moved image-expected.checksum',
-                '    Moved image-expected.png',
-                '  Updating baselines for mac',
-                '    Updated image-expected.checksum',
-                '    Updated image-expected.png',
-            ])
-
-    def test_text_rebaseline_move_already_exist(self):
-        self._assertRebaseline(
-            test_files=(
-                'fast/text-expected.txt',
-                'platform/mac-leopard/fast/text-expected.txt',
-                'platform/mac/fast/text-expected.txt',
-            ),
-            results_files=(
-                'fast/text-actual.txt',
-            ),
-            test_name='fast/text.html',
-            baseline_target='mac',
-            baseline_move_to='mac-leopard',
-            expected_success=False,
-            expected_log=[
-                'Rebaselining fast/text...',
-                '  Moving current mac baselines to mac-leopard',
-                '    Already had baselines in mac-leopard, could not move existing mac ones',
-            ])
-
-    def test_image_rebaseline(self):
-        self._assertRebaseline(
-            test_files=(
-                'fast/image-expected.txt',
-                'platform/mac/fast/image-expected.png',
-                'platform/mac/fast/image-expected.checksum',
-            ),
-            results_files=(
-                'fast/image-actual.png',
-                'fast/image-actual.checksum',
-            ),
-            test_name='fast/image.html',
-            baseline_target='mac',
-            baseline_move_to='none',
-            expected_success=True,
-            expected_log=[
-                'Rebaselining fast/image...',
-                '  Updating baselines for mac',
-                '    Updated image-expected.checksum',
-                '    Updated image-expected.png',
-            ])
-
-    def test_gather_baselines(self):
-        example_json = layout_test_results_unittest.LayoutTestResultsTest.example_full_results_json
-        results_json = json.loads(strip_json_wrapper(example_json))
-        server = RebaselineServer()
-        server._test_config = get_test_config()
-        server._gather_baselines(results_json)
-        self.assertEqual(
-            results_json['tests']['svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-attr.html']['state'],
-            'needs_rebaseline')
-        self.assertNotIn('prototype-chocolate.html', results_json['tests'])
-
-    def _assertRebaseline(self, test_files, results_files, test_name, baseline_target,
-                          baseline_move_to, expected_success, expected_log):
-        log = []
-        test_config = get_test_config(test_files, results_files)
-        success = rebaseline_server._rebaseline_test(
-            test_name,
-            baseline_target,
-            baseline_move_to,
-            test_config,
-            log=log.append)
-        self.assertEqual(expected_log, log)
-        self.assertEqual(expected_success, success)
-
-
-class GetActualResultFilesTest(unittest.TestCase):
-
-    def test(self):
-        test_config = get_test_config(result_files=(
-            'fast/text-actual.txt',
-            'fast2/text-actual.txt',
-            'fast/text2-actual.txt',
-            'fast/text-notactual.txt',
-        ))
-        self.assertItemsEqual(
-            ('text-actual.txt',),
-            rebaseline_server._get_actual_result_files(
-                'fast/text.html', test_config))
-
-
-class GetBaselinesTest(unittest.TestCase):
-
-    def test_no_baselines(self):
-        self._assertBaselines(
-            test_files=(),
-            test_name='fast/missing.html',
-            expected_baselines={})
-
-    def test_text_baselines(self):
-        self._assertBaselines(
-            test_files=(
-                'fast/text-expected.txt',
-                'platform/mac/fast/text-expected.txt',
-            ),
-            test_name='fast/text.html',
-            expected_baselines={
-                'mac': {'.txt': True},
-                'base': {'.txt': False},
-            })
-
-    def test_image_and_text_baselines(self):
-        self._assertBaselines(
-            test_files=(
-                'fast/image-expected.txt',
-                'platform/mac/fast/image-expected.png',
-                'platform/mac/fast/image-expected.checksum',
-                'platform/win/fast/image-expected.png',
-                'platform/win/fast/image-expected.checksum',
-            ),
-            test_name='fast/image.html',
-            expected_baselines={
-                'base': {'.txt': True},
-                'mac': {'.checksum': True, '.png': True},
-                'win': {'.checksum': False, '.png': False},
-            })
-
-    def test_extra_baselines(self):
-        self._assertBaselines(
-            test_files=(
-                'fast/text-expected.txt',
-                'platform/nosuchplatform/fast/text-expected.txt',
-            ),
-            test_name='fast/text.html',
-            expected_baselines={'base': {'.txt': True}})
-
-    def _assertBaselines(self, test_files, test_name, expected_baselines):
-        actual_baselines = rebaseline_server.get_test_baselines(test_name, get_test_config(test_files))
-        self.assertEqual(expected_baselines, actual_baselines)
-
-
-def get_test_config(test_files=None, result_files=None):
-    test_files = test_files or []
-    result_files = result_files or []
-    host = MockHost()
-    port = host.port_factory.get()
-    layout_tests_directory = port.layout_tests_dir()
-    results_directory = port.results_directory()
-
-    for filename in test_files:
-        host.filesystem.write_binary_file(host.filesystem.join(layout_tests_directory, filename), '')
-    for filename in result_files:
-        host.filesystem.write_binary_file(host.filesystem.join(results_directory, filename), '')
-
-    class TestMacPort(Port):
-        # Abstract method path_to_apache not implemented - pylint: disable=abstract-method
-        port_name = 'mac'
-        FALLBACK_PATHS = {'': ['mac']}
-
-    return TestConfig(
-        TestMacPort(host, 'mac'),
-        layout_tests_directory,
-        results_directory,
-        ('mac', 'mac-leopard', 'win', 'linux'),
-        host)
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/tool/webkit_patch.py b/third_party/WebKit/Tools/Scripts/webkitpy/tool/webkit_patch.py
index 9224676..c78266a 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/tool/webkit_patch.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/tool/webkit_patch.py
@@ -55,7 +55,6 @@
 from webkitpy.tool.commands.rebaseline import Rebaseline
 from webkitpy.tool.commands.rebaseline import RebaselineExpectations
 from webkitpy.tool.commands.rebaseline_cl import RebaselineCL
-from webkitpy.tool.commands.rebaseline_server import RebaselineServer
 from webkitpy.tool.commands.rebaseline_test import RebaselineTest
 
 
@@ -91,7 +90,6 @@
             Rebaseline(),
             RebaselineCL(),
             RebaselineExpectations(),
-            RebaselineServer(),
             RebaselineTest(),
         ]
         self.help_command = HelpCommand(tool=self)
diff --git a/third_party/WebKit/public/BUILD.gn b/third_party/WebKit/public/BUILD.gn
index 58cfa34..036dc3c 100644
--- a/third_party/WebKit/public/BUILD.gn
+++ b/third_party/WebKit/public/BUILD.gn
@@ -859,7 +859,7 @@
   ]
 
   public_deps = [
-    "//media/capture/mojo:capture_types",
+    "//media/capture/mojo:video_capture",
     "//media/mojo/interfaces",
     "//ui/gfx/geometry/mojo",
   ]
diff --git a/third_party/closure_compiler/externs/automation.js b/third_party/closure_compiler/externs/automation.js
index faaabf03..e208493 100644
--- a/third_party/closure_compiler/externs/automation.js
+++ b/third_party/closure_compiler/externs/automation.js
@@ -87,7 +87,6 @@
   BANNER: 'banner',
   BLOCKQUOTE: 'blockquote',
   BUTTON: 'button',
-  BUTTON_DROP_DOWN: 'buttonDropDown',
   CANVAS: 'canvas',
   CAPTION: 'caption',
   CARET: 'caret',
diff --git a/third_party/polymer/v1_0/bower.json b/third_party/polymer/v1_0/bower.json
index 2813dab..13ebaad 100644
--- a/third_party/polymer/v1_0/bower.json
+++ b/third_party/polymer/v1_0/bower.json
@@ -42,7 +42,6 @@
     "paper-item": "PolymerElements/paper-item#1.2.1",
     "paper-listbox": "PolymerelEments/paper-listbox#1.1.2",
     "paper-material": "PolymerElements/paper-material#1.0.6",
-    "paper-menu": "PolymerElements/paper-menu#1.3.0",
     "paper-progress": "PolymerElements/paper-progress#1.0.10",
     "paper-radio-button": "PolymerElements/paper-radio-button#1.4.0",
     "paper-radio-group": "PolymerElements/paper-radio-group#1.2.0",
diff --git a/third_party/polymer/v1_0/components-chromium/paper-menu/BUILD.gn b/third_party/polymer/v1_0/components-chromium/paper-menu/BUILD.gn
deleted file mode 100644
index a9c55ba1..0000000
--- a/third_party/polymer/v1_0/components-chromium/paper-menu/BUILD.gn
+++ /dev/null
@@ -1,20 +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.
-#
-# NOTE: Created with generate_gn.py, please do not edit.
-
-import("//third_party/closure_compiler/compile_js.gni")
-
-js_library("paper-menu-extracted") {
-  deps = [
-    "../iron-menu-behavior:iron-menu-behavior-extracted",
-  ]
-}
-
-js_library("paper-submenu-extracted") {
-  deps = [
-    "../iron-behaviors:iron-control-state-extracted",
-    "../iron-collapse:iron-collapse-extracted",
-  ]
-}
diff --git a/third_party/polymer/v1_0/components-chromium/paper-menu/bower.json b/third_party/polymer/v1_0/components-chromium/paper-menu/bower.json
deleted file mode 100644
index 2416c560..0000000
--- a/third_party/polymer/v1_0/components-chromium/paper-menu/bower.json
+++ /dev/null
@@ -1,39 +0,0 @@
-{
-  "name": "paper-menu",
-  "version": "1.3.0",
-  "description": "Implements an accessible material design menu",
-  "authors": "The Polymer Authors",
-  "keywords": [
-    "web-components",
-    "polymer",
-    "menu"
-  ],
-  "main": [
-    "paper-menu.html",
-    "paper-submenu.html"
-  ],
-  "private": true,
-  "repository": {
-    "type": "git",
-    "url": "git://github.com/PolymerElements/paper-menu"
-  },
-  "license": "http://polymer.github.io/LICENSE.txt",
-  "homepage": "https://github.com/PolymerElements/paper-menu",
-  "ignore": [],
-  "dependencies": {
-    "polymer": "Polymer/polymer#^1.1.0",
-    "iron-behaviors": "PolymerElements/iron-behaviors#^1.0.0",
-    "iron-collapse": "PolymerElements/iron-collapse#^1.0.0",
-    "iron-menu-behavior": "PolymerElements/iron-menu-behavior#^1.0.0",
-    "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0",
-    "paper-styles": "PolymerElements/paper-styles#^1.0.0"
-  },
-  "devDependencies": {
-    "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
-    "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
-    "paper-item": "PolymerElements/paper-item#^1.0.0",
-    "test-fixture": "PolymerElements/test-fixture#^1.0.0",
-    "web-component-tester": "^4.0.0",
-    "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
-  }
-}
diff --git a/third_party/polymer/v1_0/components-chromium/paper-menu/compiled_resources2.gyp b/third_party/polymer/v1_0/components-chromium/paper-menu/compiled_resources2.gyp
deleted file mode 100644
index c4ae359f..0000000
--- a/third_party/polymer/v1_0/components-chromium/paper-menu/compiled_resources2.gyp
+++ /dev/null
@@ -1,24 +0,0 @@
-# Copyright 2018 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-#
-# NOTE: Created with generate_compiled_resources_gyp.py, please do not edit.
-{
-  'targets': [
-    {
-      'target_name': 'paper-menu-extracted',
-      'dependencies': [
-        '../iron-menu-behavior/compiled_resources2.gyp:iron-menu-behavior-extracted',
-      ],
-      'includes': ['../../../../closure_compiler/compile_js2.gypi'],
-    },
-    {
-      'target_name': 'paper-submenu-extracted',
-      'dependencies': [
-        '../iron-behaviors/compiled_resources2.gyp:iron-control-state-extracted',
-        '../iron-collapse/compiled_resources2.gyp:iron-collapse-extracted',
-      ],
-      'includes': ['../../../../closure_compiler/compile_js2.gypi'],
-    },
-  ],
-}
diff --git a/third_party/polymer/v1_0/components-chromium/paper-menu/paper-menu-extracted.js b/third_party/polymer/v1_0/components-chromium/paper-menu/paper-menu-extracted.js
deleted file mode 100644
index 6c9410f..0000000
--- a/third_party/polymer/v1_0/components-chromium/paper-menu/paper-menu-extracted.js
+++ /dev/null
@@ -1,9 +0,0 @@
-(function() {
-      Polymer({
-        is: 'paper-menu',
-
-        behaviors: [
-          Polymer.IronMenuBehavior
-        ]
-      });
-    })();
\ No newline at end of file
diff --git a/third_party/polymer/v1_0/components-chromium/paper-menu/paper-menu-shared-styles.html b/third_party/polymer/v1_0/components-chromium/paper-menu/paper-menu-shared-styles.html
deleted file mode 100644
index ce1c72041..0000000
--- a/third_party/polymer/v1_0/components-chromium/paper-menu/paper-menu-shared-styles.html
+++ /dev/null
@@ -1,51 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../iron-flex-layout/iron-flex-layout.html">
-<link rel="import" href="../paper-styles/color.html">
-<link rel="import" href="../paper-styles/default-theme.html">
-
-<dom-module id="paper-menu-shared-styles">
-  <template>
-    <style>
-      /* need a wrapper element to make this higher specificity than the :host rule in paper-item */
-      .selectable-content > ::content > .iron-selected {
-        font-weight: bold;
-
-        @apply(--paper-menu-selected-item);
-      }
-
-      .selectable-content > ::content > [disabled] {
-        color: var(--paper-menu-disabled-color, --disabled-text-color);
-      }
-
-      .selectable-content > ::content > *:focus {
-        position: relative;
-        outline: 0;
-
-        @apply(--paper-menu-focused-item);
-      }
-
-      .selectable-content > ::content > *:focus:after {
-        @apply(--layout-fit);
-        background: currentColor;
-        opacity: var(--dark-divider-opacity);
-        content: '';
-        pointer-events: none;
-
-        @apply(--paper-menu-focused-item-after);
-      }
-
-      .selectable-content > ::content > *[colored]:focus:after {
-        opacity: 0.26;
-      }
-    </style>
-  </template>
-</dom-module>
diff --git a/third_party/polymer/v1_0/components-chromium/paper-menu/paper-menu.html b/third_party/polymer/v1_0/components-chromium/paper-menu/paper-menu.html
deleted file mode 100644
index 7b9319f..0000000
--- a/third_party/polymer/v1_0/components-chromium/paper-menu/paper-menu.html
+++ /dev/null
@@ -1,88 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
---><html><head><link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../iron-menu-behavior/iron-menu-behavior.html">
-<link rel="import" href="../paper-styles/default-theme.html">
-<link rel="import" href="paper-menu-shared-styles.html">
-
-<!--
-Material design: [Menus](https://www.google.com/design/spec/components/menus.html)
-
-`<paper-menu>` implements an accessible menu control with Material Design styling. The focused item
-is highlighted, and the selected item has bolded text.
-
-    <paper-menu>
-      <paper-item>Item 1</paper-item>
-      <paper-item>Item 2</paper-item>
-    </paper-menu>
-
-An initial selection can be specified with the `selected` attribute.
-
-    <paper-menu selected="0">
-      <paper-item>Item 1</paper-item>
-      <paper-item>Item 2</paper-item>
-    </paper-menu>
-
-Make a multi-select menu with the `multi` attribute. Items in a multi-select menu can be deselected,
-and multiple items can be selected.
-
-    <paper-menu multi>
-      <paper-item>Item 1</paper-item>
-      <paper-item>Item 2</paper-item>
-    </paper-menu>
-
-### Styling
-
-The following custom properties and mixins are available for styling:
-
-Custom property | Description | Default
-----------------|-------------|----------
-`--paper-menu-background-color`   | Menu background color                                            | `--primary-background-color`
-`--paper-menu-color`              | Menu foreground color                                            | `--primary-text-color`
-`--paper-menu-disabled-color`     | Foreground color for a disabled item                             | `--disabled-text-color`
-`--paper-menu`                    | Mixin applied to the menu                                        | `{}`
-`--paper-menu-selected-item`      | Mixin applied to the selected item                               | `{}`
-`--paper-menu-focused-item`       | Mixin applied to the focused item                                | `{}`
-`--paper-menu-focused-item-after` | Mixin applied to the ::after pseudo-element for the focused item | `{}`
-
-### Accessibility
-
-`<paper-menu>` has `role="menu"` by default. A multi-select menu will also have
-`aria-multiselectable` set. It implements key bindings to navigate through the menu with the up and
-down arrow keys, esc to exit the menu, and enter to activate a menu item. Typing the first letter
-of a menu item will also focus it.
-
-@group Paper Elements
-@element paper-menu
-@hero hero.svg
-@demo demo/index.html
--->
-
-</head><body><dom-module id="paper-menu">
-  <template>
-    <style include="paper-menu-shared-styles"></style>
-    <style>
-      :host {
-        display: block;
-        padding: 8px 0;
-
-        background: var(--paper-menu-background-color, --primary-background-color);
-        color: var(--paper-menu-color, --primary-text-color);
-
-        @apply(--paper-menu);
-      }
-    </style>
-
-    <div class="selectable-content">
-      <content></content>
-    </div>
-  </template>
-
-  </dom-module>
-<script src="paper-menu-extracted.js"></script></body></html>
\ No newline at end of file
diff --git a/third_party/polymer/v1_0/components-chromium/paper-menu/paper-submenu-extracted.js b/third_party/polymer/v1_0/components-chromium/paper-menu/paper-submenu-extracted.js
deleted file mode 100644
index e25ce7c..0000000
--- a/third_party/polymer/v1_0/components-chromium/paper-menu/paper-submenu-extracted.js
+++ /dev/null
@@ -1,152 +0,0 @@
-(function() {
-
-    Polymer({
-
-      is: 'paper-submenu',
-
-      properties: {
-        /**
-         * Fired when the submenu is opened.
-         *
-         * @event paper-submenu-open
-         */
-
-        /**
-         * Fired when the submenu is closed.
-         *
-         * @event paper-submenu-close
-         */
-
-        /**
-         * Set opened to true to show the collapse element and to false to hide it.
-         *
-         * @attribute opened
-         */
-        opened: {
-          type: Boolean,
-          value: false,
-          notify: true,
-          observer: '_openedChanged'
-        }
-      },
-
-      behaviors: [
-        Polymer.IronControlState
-      ],
-
-      listeners: {
-        'focus': '_onFocus'
-      },
-
-      get __parent() {
-        return Polymer.dom(this).parentNode;
-      },
-
-      get __trigger() {
-        return Polymer.dom(this.$.trigger).getDistributedNodes()[0];
-      },
-
-      get __content() {
-        return Polymer.dom(this.$.content).getDistributedNodes()[0];
-      },
-
-      attached: function() {
-        this.listen(this.__parent, 'iron-activate', '_onParentIronActivate');
-      },
-
-      detached: function() {
-        this.unlisten(this.__parent, 'iron-activate', '_onParentIronActivate');
-      },
-
-      /**
-       * Expand the submenu content.
-       */
-      open: function() {
-        if (!this.disabled) {
-          this.opened = true;
-        }
-      },
-
-      /**
-       * Collapse the submenu content.
-       */
-      close: function() {
-        this.opened = false;
-      },
-
-      /**
-       * Toggle the submenu.
-       */
-      toggle: function() {
-        if (this.opened) {
-          this.close();
-        } else {
-          this.open();
-        }
-      },
-
-      /**
-       * A handler that is called when the trigger is tapped.
-       */
-      _onTap: function(e) {
-        if (!this.disabled) {
-          this.toggle();
-        }
-      },
-
-      /**
-       * Toggles the submenu content when the trigger is tapped.
-       */
-      _openedChanged: function(opened, oldOpened) {
-        if (opened) {
-          this.__trigger && this.__trigger.classList.add('iron-selected');
-          this.__content && this.__content.focus();
-          this.fire('paper-submenu-open');
-        } else if (oldOpened != null) {
-          this.__trigger && this.__trigger.classList.remove('iron-selected');
-          this.fire('paper-submenu-close');
-        }
-      },
-
-      /**
-       * A handler that is called when `iron-activate` is fired.
-       *
-       * @param {CustomEvent} event An `iron-activate` event.
-       */
-      _onParentIronActivate: function(event) {
-        var parent = this.__parent;
-        if (Polymer.dom(event).localTarget === parent) {
-          // The activated item can either be this submenu, in which case it
-          // should be expanded, or any of the other sibling submenus, in which
-          // case this submenu should be collapsed.
-          if (event.detail.item !== this && !parent.multi) {
-            this.close();
-          }
-        }
-      },
-
-      /**
-       * If the dropdown is open when disabled becomes true, close the
-       * dropdown.
-       *
-       * @param {boolean} disabled True if disabled, otherwise false.
-       */
-      _disabledChanged: function(disabled) {
-        Polymer.IronControlState._disabledChanged.apply(this, arguments);
-        if (disabled && this.opened) {
-          this.close();
-        }
-      },
-
-      /**
-       * Handler that is called when the menu receives focus.
-       *
-       * @param {FocusEvent} event A focus event.
-       */
-      _onFocus: function(event) {
-        this.__trigger && this.__trigger.focus();
-      }
-
-    });
-
-  })();
\ No newline at end of file
diff --git a/third_party/polymer/v1_0/components-chromium/paper-menu/paper-submenu.html b/third_party/polymer/v1_0/components-chromium/paper-menu/paper-submenu.html
deleted file mode 100644
index ab4bdd1..0000000
--- a/third_party/polymer/v1_0/components-chromium/paper-menu/paper-submenu.html
+++ /dev/null
@@ -1,67 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
---><html><head><link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../iron-behaviors/iron-control-state.html">
-<link rel="import" href="../iron-collapse/iron-collapse.html">
-<link rel="import" href="paper-menu-shared-styles.html">
-
-<!--
-`<paper-submenu>` is a nested menu inside of a parent `<paper-menu>`. It
-consists of a trigger that expands or collapses another `<paper-menu>`:
-
-    <paper-menu>
-      <paper-submenu>
-        <paper-item class="menu-trigger">Topics</paper-item>
-        <paper-menu class="menu-content">
-          <paper-item>Topic 1</paper-item>
-          <paper-item>Topic 2</paper-item>
-          <paper-item>Topic 3</paper-item>
-        </paper-menu>
-      </paper-submenu>
-      <paper-submenu>
-        <paper-item class="menu-trigger">Faves</paper-item>
-        <paper-menu class="menu-content">
-          <paper-item>Fave 1</paper-item>
-          <paper-item>Fave 2</paper-item>
-        </paper-menu>
-      </paper-submenu>
-      <paper-submenu disabled>
-        <paper-item class="menu-trigger">Unavailable</paper-item>
-        <paper-menu class="menu-content">
-          <paper-item>Disabled 1</paper-item>
-          <paper-item>Disabled 2</paper-item>
-        </paper-menu>
-      </paper-submenu>
-    </paper-menu>
-
-Just like in `<paper-menu>`, the focused item is highlighted, and the selected
-item has bolded text. Please see the `<paper-menu>` docs for which attributes
-(such as `multi` and `selected`), and styling options are available for the
-`menu-content` menu.
-
-@group Paper Elements
-@element paper-submenu
-@hero hero.svg
-@demo demo/index.html
--->
-
-</head><body><dom-module id="paper-submenu">
-  <template>
-    <style include="paper-menu-shared-styles"></style>
-
-    <div class="selectable-content" on-tap="_onTap">
-      <content id="trigger" select=".menu-trigger"></content>
-    </div>
-    <iron-collapse id="collapse" opened="{{opened}}">
-      <content id="content" select=".menu-content"></content>
-    </iron-collapse>
-  </template>
-
-  </dom-module>
-<script src="paper-submenu-extracted.js"></script></body></html>
\ No newline at end of file
diff --git a/third_party/polymer/v1_0/components_summary.txt b/third_party/polymer/v1_0/components_summary.txt
index d6c4f90..bee9f34 100644
--- a/third_party/polymer/v1_0/components_summary.txt
+++ b/third_party/polymer/v1_0/components_summary.txt
@@ -238,12 +238,6 @@
 Revision: 6aef0896fcbc25f9f5bd1dd55f7679e6ab7f92ad
 Tree link: https://github.com/PolymerElements/paper-material/tree/v1.0.6
 
-Name: paper-menu
-Repository: https://github.com/PolymerElements/paper-menu.git
-Tree: v1.3.0
-Revision: 7ca8ebfbdcca22fc98e5115c0ed72bf9d05848fe
-Tree link: https://github.com/PolymerElements/paper-menu/tree/v1.3.0
-
 Name: paper-progress
 Repository: https://github.com/PolymerElements/paper-progress.git
 Tree: v1.0.10
diff --git a/tools/gn/command_check.cc b/tools/gn/command_check.cc
index 86caf85..9581c4c 100644
--- a/tools/gn/command_check.cc
+++ b/tools/gn/command_check.cc
@@ -95,10 +95,8 @@
     - Only includes using "quotes" are checked. <brackets> are assumed to be
       system includes.
 
-    - Include paths are assumed to be relative to either the source root or the
-      "root_gen_dir" and must include all the path components. (It might be
-      nice in the future to incorporate GN's knowledge of the include path to
-      handle other include styles.)
+    - Include paths are assumed to be relative to any of the "include_dirs" for
+      the target (including the implicit current dir).
 
     - GN does not run the preprocessor so will not understand conditional
       includes.
@@ -130,9 +128,9 @@
 
 Advice on fixing problems
 
-  If you have a third party project that uses relative includes, it's generally
-  best to exclude that target from checking altogether via
-  "check_includes = false".
+  If you have a third party project that is difficult to fix or doesn't care
+  about include checks it's generally best to exclude that target from checking
+  altogether via "check_includes = false".
 
   If you have conditional includes, make sure the build conditions and the
   preprocessor conditions match, and annotate the line with "nogncheck" (see
diff --git a/tools/gn/header_checker.cc b/tools/gn/header_checker.cc
index 39d53ee..d4fb6f73 100644
--- a/tools/gn/header_checker.cc
+++ b/tools/gn/header_checker.cc
@@ -15,6 +15,7 @@
 #include "tools/gn/builder.h"
 #include "tools/gn/c_include_iterator.h"
 #include "tools/gn/config.h"
+#include "tools/gn/config_values_extractors.h"
 #include "tools/gn/err.h"
 #include "tools/gn/filesystem_utils.h"
 #include "tools/gn/scheduler.h"
@@ -30,19 +31,6 @@
   bool is_generated;
 };
 
-// If the given file is in the "gen" folder, trims this so it treats the gen
-// directory as the source root:
-//   //out/Debug/gen/foo/bar.h -> //foo/bar.h
-// If the file isn't in the generated root, returns the input unchanged.
-SourceFile RemoveRootGenDirFromFile(const Target* target,
-                                    const SourceFile& file) {
-  const SourceDir& gen = target->settings()->toolchain_gen_dir();
-  if (!gen.is_null() && base::StartsWith(file.value(), gen.value(),
-                                         base::CompareCase::SENSITIVE))
-    return SourceFile("//" + file.value().substr(gen.value().size()));
-  return file;
-}
-
 // This class makes InputFiles on the stack as it reads files to check. When
 // we throw an error, the Err indicates a locatin which has a pointer to
 // an InputFile that must persist as long as the Err does.
@@ -201,14 +189,11 @@
 
   std::map<SourceFile, PublicGeneratedPair> files_to_public;
 
-  // First collect the normal files, they get the default visibility. Always
-  // trim the root gen dir if it exists. This will only exist on outputs of an
-  // action, but those are often then wired into the sources of a compiled
-  // target to actually compile generated code. If you depend on the compiled
-  // target, it should be enough to be able to include the header.
+  // First collect the normal files, they get the default visibility. If you
+  // depend on the compiled target, it should be enough to be able to include
+  // the header.
   for (const auto& source : target->sources()) {
-    SourceFile file = RemoveRootGenDirFromFile(target, source);
-    files_to_public[file].is_public = default_public;
+    files_to_public[source].is_public = default_public;
   }
 
   // Add in the public files, forcing them to public. This may overwrite some
@@ -216,8 +201,7 @@
   if (default_public)  // List only used when default is not public.
     DCHECK(target->public_headers().empty());
   for (const auto& source : target->public_headers()) {
-    SourceFile file = RemoveRootGenDirFromFile(target, source);
-    files_to_public[file].is_public = true;
+    files_to_public[source].is_public = true;
   }
 
   // Add in outputs from actions. These are treated as public (since if other
@@ -225,12 +209,7 @@
   std::vector<SourceFile> outputs;
   target->action_values().GetOutputsAsSourceFiles(target, &outputs);
   for (const auto& output : outputs) {
-    // For generated files in the "gen" directory, add the filename to the
-    // map assuming "gen" is the source root. This means that when files include
-    // the generated header relative to there (the recommended practice), we'll
-    // find the file.
-    SourceFile output_file = RemoveRootGenDirFromFile(target, output);
-    PublicGeneratedPair* pair = &files_to_public[output_file];
+    PublicGeneratedPair* pair = &files_to_public[output];
     pair->is_public = true;
     pair->is_generated = true;
   }
@@ -247,17 +226,27 @@
   return file.value().compare(0, build_dir.size(), build_dir) == 0;
 }
 
-// This current assumes all include paths are relative to the source root
-// which is generally the case for Chromium.
-//
-// A future enhancement would be to search the include path for the target
-// containing the source file containing this include and find the file to
-// handle the cases where people do weird things with the paths.
 SourceFile HeaderChecker::SourceFileForInclude(
-    const base::StringPiece& input) const {
-  std::string str("//");
-  input.AppendToString(&str);
-  return SourceFile(str);
+    const base::StringPiece& relative_file_path,
+    const std::vector<SourceDir>& include_dirs,
+    const InputFile& source_file,
+    const LocationRange& range,
+    Err* err) const {
+  using base::FilePath;
+
+  Value relative_file_value(nullptr, relative_file_path.as_string());
+  auto it = std::find_if(
+      include_dirs.begin(), include_dirs.end(),
+      [relative_file_value, err, this](const SourceDir& dir) -> bool {
+        SourceFile include_file =
+            dir.ResolveRelativeFile(relative_file_value, err);
+        return file_map_.find(include_file) != file_map_.end();
+      });
+
+  if (it != include_dirs.end())
+    return it->ResolveRelativeFile(relative_file_value, err);
+
+  return SourceFile();
 }
 
 bool HeaderChecker::CheckFile(const Target* from_target,
@@ -285,13 +274,25 @@
   InputFile input_file(file);
   input_file.SetContents(contents);
 
+  std::vector<SourceDir> include_dirs;
+  include_dirs.push_back(file.GetDir());
+  for (ConfigValuesIterator iter(from_target); !iter.done(); iter.Next()) {
+    const std::vector<SourceDir>& target_include_dirs =
+        iter.cur().include_dirs();
+    include_dirs.insert(include_dirs.end(), target_include_dirs.begin(),
+                        target_include_dirs.end());
+  }
+
   CIncludeIterator iter(&input_file);
   base::StringPiece current_include;
   LocationRange range;
   while (iter.GetNextIncludeString(&current_include, &range)) {
-    SourceFile include = SourceFileForInclude(current_include);
-    if (!CheckInclude(from_target, input_file, include, range, err))
-      return false;
+    SourceFile include = SourceFileForInclude(current_include, include_dirs,
+                                              input_file, range, err);
+    if (!include.is_null()) {
+      if (!CheckInclude(from_target, input_file, include, range, err))
+        return false;
+    }
   }
 
   return true;
diff --git a/tools/gn/header_checker.h b/tools/gn/header_checker.h
index c6411ebb..3645d7a 100644
--- a/tools/gn/header_checker.h
+++ b/tools/gn/header_checker.h
@@ -16,6 +16,7 @@
 #include "base/synchronization/condition_variable.h"
 #include "base/synchronization/lock.h"
 #include "tools/gn/err.h"
+#include "tools/gn/source_dir.h"
 
 class BuildSettings;
 class InputFile;
@@ -23,6 +24,10 @@
 class SourceFile;
 class Target;
 
+namespace base {
+class FilePath;
+}
+
 class HeaderChecker : public base::RefCountedThreadSafe<HeaderChecker> {
  public:
   // Represents a dependency chain.
@@ -63,6 +68,9 @@
   FRIEND_TEST_ALL_PREFIXES(HeaderCheckerTest, CheckInclude);
   FRIEND_TEST_ALL_PREFIXES(HeaderCheckerTest, PublicFirst);
   FRIEND_TEST_ALL_PREFIXES(HeaderCheckerTest, CheckIncludeAllowCircular);
+  FRIEND_TEST_ALL_PREFIXES(HeaderCheckerTest, SourceFileForInclude);
+  FRIEND_TEST_ALL_PREFIXES(HeaderCheckerTest,
+                           SourceFileForInclude_FileNotFound);
   ~HeaderChecker();
 
   struct TargetInfo {
@@ -84,6 +92,8 @@
 
   typedef std::vector<TargetInfo> TargetVector;
   typedef std::map<SourceFile, TargetVector> FileMap;
+  typedef base::RepeatingCallback<bool(const base::FilePath& path)>
+      PathExistsCallback;
 
   // Backend for Run() that takes the list of files to check. The errors_ list
   // will be populate on failure.
@@ -98,7 +108,11 @@
   bool IsFileInOuputDir(const SourceFile& file) const;
 
   // Resolves the contents of an include to a SourceFile.
-  SourceFile SourceFileForInclude(const base::StringPiece& input) const;
+  SourceFile SourceFileForInclude(const base::StringPiece& relative_file_path,
+                                  const std::vector<SourceDir>& include_dirs,
+                                  const InputFile& source_file,
+                                  const LocationRange& range,
+                                  Err* err) const;
 
   // from_target is the target the file was defined from. It will be used in
   // error messages.
diff --git a/tools/gn/header_checker_unittest.cc b/tools/gn/header_checker_unittest.cc
index 2aa0860..5bb5c70 100644
--- a/tools/gn/header_checker_unittest.cc
+++ b/tools/gn/header_checker_unittest.cc
@@ -2,8 +2,10 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <ostream>
 #include <vector>
 
+#include "base/bind.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "tools/gn/config.h"
 #include "tools/gn/header_checker.h"
@@ -67,6 +69,10 @@
 
 }  // namespace
 
+void PrintTo(const SourceFile& source_file, ::std::ostream* os) {
+  *os << source_file.value();
+}
+
 TEST_F(HeaderCheckerTest, IsDependencyOf) {
   scoped_refptr<HeaderChecker> checker(
       new HeaderChecker(setup_.build_settings(), targets_));
@@ -288,3 +294,57 @@
   EXPECT_TRUE(checker->CheckInclude(&b_, input_file, a_public, range, &err));
   EXPECT_FALSE(err.has_error());
 }
+
+TEST_F(HeaderCheckerTest, SourceFileForInclude) {
+  using base::FilePath;
+  const std::vector<SourceDir> kIncludeDirs = {
+      SourceDir("/c/custom_include/"), SourceDir("//"), SourceDir("//subdir")};
+  a_.sources().push_back(SourceFile("//lib/header1.h"));
+  b_.sources().push_back(SourceFile("/c/custom_include/header2.h"));
+
+  InputFile dummy_input_file(SourceFile("//some_file.cc"));
+  dummy_input_file.SetContents(std::string());
+  LocationRange dummy_range;
+
+  scoped_refptr<HeaderChecker> checker(
+      new HeaderChecker(setup_.build_settings(), targets_));
+  {
+    Err err;
+    SourceFile source_file = checker->SourceFileForInclude(
+        "lib/header1.h", kIncludeDirs, dummy_input_file, dummy_range, &err);
+    EXPECT_FALSE(err.has_error());
+    EXPECT_EQ(SourceFile("//lib/header1.h"), source_file);
+  }
+
+  {
+    Err err;
+    SourceFile source_file = checker->SourceFileForInclude(
+        "header2.h", kIncludeDirs, dummy_input_file, dummy_range, &err);
+    EXPECT_FALSE(err.has_error());
+    EXPECT_EQ(SourceFile("/c/custom_include/header2.h"), source_file);
+  }
+}
+
+TEST_F(HeaderCheckerTest, SourceFileForInclude_FileNotFound) {
+  using base::FilePath;
+  const char kFileContents[] = "Some dummy contents";
+  const std::vector<SourceDir> kIncludeDirs = {SourceDir("//")};
+  scoped_refptr<HeaderChecker> checker(
+      new HeaderChecker(setup_.build_settings(), targets_));
+
+  Err err;
+  InputFile input_file(SourceFile("//input.cc"));
+  input_file.SetContents(std::string(kFileContents));
+  const int kLineNumber = 10;
+  const int kColumnNumber = 16;
+  const int kLength = 8;
+  const int kByteNumber = 100;
+  LocationRange range(
+      Location(&input_file, kLineNumber, kColumnNumber, kByteNumber),
+      Location(&input_file, kLineNumber, kColumnNumber + kLength, kByteNumber));
+
+  SourceFile source_file = checker->SourceFileForInclude(
+      "header.h", kIncludeDirs, input_file, range, &err);
+  EXPECT_TRUE(source_file.is_null());
+  EXPECT_FALSE(err.has_error());
+}
diff --git a/tools/grit/OWNERS b/tools/grit/OWNERS
index 40b5c310..e94bc00d 100644
--- a/tools/grit/OWNERS
+++ b/tools/grit/OWNERS
@@ -1,3 +1,4 @@
+agrieve@chromium.org
 flackr@chromium.org
 thakis@chromium.org
 thestig@chromium.org
diff --git a/tools/mb/mb_config.pyl b/tools/mb/mb_config.pyl
index cf7764a..f62fb754 100644
--- a/tools/mb/mb_config.pyl
+++ b/tools/mb/mb_config.pyl
@@ -243,7 +243,6 @@
       'Mojo Android': 'android_release_bot_minimal_symbols_arm64',
       'Mojo Linux': 'release_trybot',
       'Mojo Windows': 'release_bot_x86_minimal_symbols',
-      'Ozone Linux': 'ozone_linux_release_bot',
       'Out of Process Profiling Android': 'android_release_bot_minimal_symbols',
       'Out of Process Profiling Linux': 'release_bot',
       'Out of Process Profiling Mac': 'release_bot',
@@ -337,6 +336,7 @@
       'Fuchsia ARM64': 'release_bot_fuchsia_arm64',
       'Fuchsia x64 Cast Audio': 'release_bot_fuchsia_cast_audio',
       'Fuchsia x64': 'release_bot_fuchsia',
+      'Ozone Linux': 'ozone_linux_release_bot',
     },
 
     'chromium.lkgr': {
diff --git a/tools/memory/asan/blacklist_win.txt b/tools/memory/asan/blacklist_win.txt
index 086e676b..9c9ee19 100644
--- a/tools/memory/asan/blacklist_win.txt
+++ b/tools/memory/asan/blacklist_win.txt
@@ -33,12 +33,13 @@
 fun:*TargetNtSetInformationThread64
 fun:*TargetNtUnmapViewOfSection64
 
-src:*pe_image.h
-src:*pe_image.cc
-src:*resolver_32.cc
 src:*filesystem_interception.cc
+src:*interceptors_64.cc
+src:*pe_image.cc
+src:*pe_image.h
 src:*process_thread_interception.cc
 src:*registry_interception.cc
+src:*resolver_32.cc
 src:*sandbox_nt_util.cc
 src:*sync_interception.cc
 ################################################################################
diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml
index ee142a6..d5e53be 100644
--- a/tools/metrics/histograms/enums.xml
+++ b/tools/metrics/histograms/enums.xml
@@ -851,12 +851,17 @@
   <int value="196620" label="3.12"/>
   <int value="196621" label="3.13"/>
   <int value="196622" label="3.14"/>
+  <int value="196623" label="3.15"/>
   <int value="196625" label="3.17"/>
   <int value="196626" label="3.18"/>
   <int value="196627" label="3.19"/>
   <int value="262144" label="4.0"/>
   <int value="262145" label="4.1"/>
+  <int value="262148" label="4.4"/>
+  <int value="262153" label="4.9"/>
   <int value="262154" label="4.10"/>
+  <int value="262157" label="4.13"/>
+  <int value="262158" label="4.14"/>
 </enum>
 
 <enum name="AndroidManageSpaceButton">
@@ -35311,6 +35316,11 @@
   <int value="10"
       label="Host not whitelisted by server rules provided to the client."/>
   <int value="11" label="Preview Allowed without server rule check."/>
+  <int value="12" label="Committed Preview."/>
+  <int value="13" label="Received no-transform directive.">
+    Response header had Cache-Control:no-transform directive (developer
+    opt-out).
+  </int>
 </enum>
 
 <enum name="PreviewsInfoBarAction">
@@ -35354,6 +35364,7 @@
   <int value="3" label="LitePage"/>
   <int value="4" label="AMP Redirection"/>
   <int value="5" label="NoScript"/>
+  <int value="6" label="Unspecified"/>
 </enum>
 
 <enum name="PreviewsUserOptedOut">
@@ -40578,6 +40589,9 @@
 </enum>
 
 <enum name="SSLAuthRootConsistency">
+  <obsolete>
+    Deprecated as of 2018-01.
+  </obsolete>
   <summary>
     The results of comparing the built-in list of known Windows roots against
     programatically detecting the built-in status.
diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml
index ff72790..f0955a06 100644
--- a/tools/metrics/histograms/histograms.xml
+++ b/tools/metrics/histograms/histograms.xml
@@ -47873,6 +47873,10 @@
 </histogram>
 
 <histogram name="Net.SSL_AuthRootConsistency" enum="SSLAuthRootConsistency">
+  <obsolete>
+    Deprecated 2018-01 with the transition to a unified root list with OS
+    fallback.
+  </obsolete>
   <owner>rsleevi@chromium.org</owner>
   <summary>
     The results of comparing the built-in list of known Windows roots against
diff --git a/tools/perf/chromium.perf.fyi.extras.json b/tools/perf/chromium.perf.fyi.extras.json
index 5c4ca2eb..d4f9152 100644
--- a/tools/perf/chromium.perf.fyi.extras.json
+++ b/tools/perf/chromium.perf.fyi.extras.json
@@ -352,7 +352,7 @@
         "isolate_name": "performance_test_suite",
         "name": "performance_test_suite",
         "override_compile_targets": [
-          "peformance_test_suite"
+          "performance_test_suite"
         ],
         "merge": {
           "args": [
diff --git a/ui/accessibility/ax_enums.idl b/ui/accessibility/ax_enums.idl
index c3c7344..1b83a11d 100644
--- a/ui/accessibility/ax_enums.idl
+++ b/ui/accessibility/ax_enums.idl
@@ -88,7 +88,6 @@
     banner,
     blockquote,
     button,
-    button_drop_down,  // Not used on Web.
     canvas,
     caption,
     caret,
diff --git a/ui/accessibility/platform/ax_platform_node_win.cc b/ui/accessibility/platform/ax_platform_node_win.cc
index b12f041..9f1591f 100644
--- a/ui/accessibility/platform/ax_platform_node_win.cc
+++ b/ui/accessibility/platform/ax_platform_node_win.cc
@@ -2710,7 +2710,6 @@
 
     // TODO(dmazzoni): figure out the proper MSAA role for roles listed below.
     case AX_ROLE_BLOCKQUOTE:
-    case AX_ROLE_BUTTON_DROP_DOWN:
     case AX_ROLE_CARET:
     case AX_ROLE_CLIENT:
     case AX_ROLE_DEFINITION:
diff --git a/ui/app_list/BUILD.gn b/ui/app_list/BUILD.gn
index 53bce0f..e985be0 100644
--- a/ui/app_list/BUILD.gn
+++ b/ui/app_list/BUILD.gn
@@ -63,9 +63,8 @@
     "views/image_shadow_animator.h",
     "views/indicator_chip_view.cc",
     "views/indicator_chip_view.h",
+    "views/page_switcher.cc",
     "views/page_switcher.h",
-    "views/page_switcher_vertical.cc",
-    "views/page_switcher_vertical.h",
     "views/pulsing_block_view.cc",
     "views/pulsing_block_view.h",
     "views/search_box_view.cc",
diff --git a/ui/app_list/app_list_constants.cc b/ui/app_list/app_list_constants.cc
index f6746fc..1091cfc7 100644
--- a/ui/app_list/app_list_constants.cc
+++ b/ui/app_list/app_list_constants.cc
@@ -57,7 +57,6 @@
 // Color of the folder bubble shadow.
 const SkColor kFolderShadowColor = SkColorSetRGB(0xBF, 0xBF, 0xBF);
 const float kFolderBubbleOpacity = 0.12f;
-const int kFolderBackgroundBubbleRadius = 288;
 
 const SkColor kCardBackgroundColor = SkColorSetRGB(0xFA, 0xFA, 0xFC);
 
@@ -166,8 +165,11 @@
 // The height/width of the shelf from the bottom/side of the screen.
 const int kShelfSize = 48;
 
-// Max items allowed in a folder.
-const size_t kMaxFolderItems = 20;
+// Max pages allowed in a folder.
+const size_t kMaxFolderPages = 3;
+
+// Max items per page allowed in a folder.
+const size_t kMaxFolderItemsPerPage = 16;
 
 // Maximum length of the folder name in chars.
 const size_t kMaxFolderNameChars = 80;
@@ -176,6 +178,11 @@
 const ui::ResourceBundle::FontStyle kItemTextFontStyle =
     ui::ResourceBundle::SmallFont;
 
+// Range of the height of centerline above screen bottom that all apps should
+// change opacity. NOTE: this is used to change page switcher's opacity as well.
+const float kAllAppsOpacityStartPx = 8.0f;
+const float kAllAppsOpacityEndPx = 144.0f;
+
 // The UMA histogram that logs usage of suggested and regular apps.
 const char kAppListAppLaunched[] = "Apps.AppListAppLaunched";
 
diff --git a/ui/app_list/app_list_constants.h b/ui/app_list/app_list_constants.h
index 58f3b98..ea0393fa 100644
--- a/ui/app_list/app_list_constants.h
+++ b/ui/app_list/app_list_constants.h
@@ -55,8 +55,6 @@
 APP_LIST_EXPORT extern const SkColor kFolderShadowColor;
 APP_LIST_EXPORT extern const float kFolderBubbleOpacity;
 
-APP_LIST_EXPORT extern const int kFolderBackgroundBubbleRadius;
-
 APP_LIST_EXPORT extern const SkColor kCardBackgroundColor;
 
 APP_LIST_EXPORT extern const int kPageTransitionDurationInMs;
@@ -107,12 +105,15 @@
 APP_LIST_EXPORT extern const int kPeekingAppListHeight;
 APP_LIST_EXPORT extern const int kShelfSize;
 
-APP_LIST_EXPORT extern const size_t kMaxFolderItems;
-APP_LIST_EXPORT extern const size_t kMaxFolderItems;
+APP_LIST_EXPORT extern const size_t kMaxFolderPages;
+APP_LIST_EXPORT extern const size_t kMaxFolderItemsPerPage;
 APP_LIST_EXPORT extern const size_t kMaxFolderNameChars;
 
 APP_LIST_EXPORT extern const ui::ResourceBundle::FontStyle kItemTextFontStyle;
 
+APP_LIST_EXPORT extern const float kAllAppsOpacityStartPx;
+APP_LIST_EXPORT extern const float kAllAppsOpacityEndPx;
+
 // The different ways that the app list can transition from PEEKING to
 // FULLSCREEN_ALL_APPS. These values are written to logs.  New enum
 // values can be added, but existing enums must never be renumbered or deleted
diff --git a/ui/app_list/views/app_list_folder_view.cc b/ui/app_list/views/app_list_folder_view.cc
index e177d99..8d64c34 100644
--- a/ui/app_list/views/app_list_folder_view.cc
+++ b/ui/app_list/views/app_list_folder_view.cc
@@ -10,6 +10,8 @@
 #include "ash/app_list/model/app_list_model.h"
 #include "ui/accessibility/ax_node_data.h"
 #include "ui/app_list/app_list_constants.h"
+#include "ui/app_list/app_list_features.h"
+#include "ui/app_list/pagination_model.h"
 #include "ui/app_list/views/app_list_item_view.h"
 #include "ui/app_list/views/app_list_main_view.h"
 #include "ui/app_list/views/apps_container_view.h"
@@ -17,11 +19,14 @@
 #include "ui/app_list/views/contents_view.h"
 #include "ui/app_list/views/folder_background_view.h"
 #include "ui/app_list/views/folder_header_view.h"
+#include "ui/app_list/views/page_switcher.h"
 #include "ui/app_list/views/search_box_view.h"
 #include "ui/compositor/scoped_layer_animation_settings.h"
 #include "ui/events/event.h"
+#include "ui/gfx/canvas.h"
 #include "ui/gfx/geometry/rect_conversions.h"
 #include "ui/strings/grit/ui_strings.h"
+#include "ui/views/background.h"
 #include "ui/views/controls/textfield/textfield.h"
 #include "ui/views/view_model.h"
 #include "ui/views/view_model_utils.h"
@@ -30,18 +35,37 @@
 
 namespace {
 
-// The preferred width/height for AppListFolderView.
-constexpr int kAppsFolderPreferredWidth = 576;
-constexpr int kAppsFolderPreferredHeight = 504;
+constexpr int kFolderBackgroundCornerRadius = 4;
+constexpr int kItemGridsBottomPadding = 24;
+constexpr int kFolderPadding = 12;
 
 // Indexes of interesting views in ViewModel of AppListFolderView.
-const int kIndexFolderHeader = 0;
-const int kIndexChildItems = 1;
+constexpr int kIndexChildItems = 0;
+constexpr int kIndexFolderHeader = 1;
+constexpr int kIndexPageSwitcher = 2;
 
-// Threshold for the distance from the center of the item to the circle of the
-// folder container ink bubble, beyond which, the item is considered dragged
-// out of the folder boundary.
-const int kOutOfFolderContainerBubbleDelta = 30;
+// A background with rounded corner.
+class FolderBackground : public views::Background {
+ public:
+  FolderBackground(SkColor color, int corner_radius)
+      : color_(color), corner_radius_(corner_radius) {}
+  ~FolderBackground() override = default;
+
+ private:
+  // views::Background overrides:
+  void Paint(gfx::Canvas* canvas, views::View* view) const override {
+    gfx::Rect bounds = view->GetContentsBounds();
+    cc::PaintFlags flags;
+    flags.setAntiAlias(true);
+    flags.setColor(color_);
+    canvas->DrawRoundRect(bounds, corner_radius_, flags);
+  }
+
+  const SkColor color_;
+  const int corner_radius_;
+
+  DISALLOW_COPY_AND_ASSIGN(FolderBackground);
+};
 
 }  // namespace
 
@@ -55,20 +79,23 @@
       model_(model),
       folder_item_(NULL),
       hide_for_reparent_(false) {
-  AddChildView(folder_header_view_);
-  view_model_->Add(folder_header_view_, kIndexFolderHeader);
-
   items_grid_view_ =
       new AppsGridView(app_list_main_view_->contents_view(), this);
-  items_grid_view_->SetLayout(
-      container_view->apps_grid_view()->cols(),
-      container_view->apps_grid_view()->rows_per_page());
   items_grid_view_->SetModel(model);
   AddChildView(items_grid_view_);
   view_model_->Add(items_grid_view_, kIndexChildItems);
 
+  AddChildView(folder_header_view_);
+  view_model_->Add(folder_header_view_, kIndexFolderHeader);
+
+  page_switcher_ = new PageSwitcher(items_grid_view_->pagination_model(),
+                                    false /* vertical */);
+  AddChildView(page_switcher_);
+  view_model_->Add(page_switcher_, kIndexPageSwitcher);
+
   SetPaintToLayer();
-  layer()->SetFillsBoundsOpaquely(false);
+  SetBackground(std::make_unique<FolderBackground>(
+      kCardBackgroundColor, kFolderBackgroundCornerRadius));
 
   model_->AddObserver(this);
 }
@@ -79,6 +106,10 @@
   // This prevents the AppsGridView's destructor from calling the now-deleted
   // AppListFolderView's methods if a drag is in progress at the time.
   items_grid_view_->set_folder_delegate(nullptr);
+
+  // Make sure |page_switcher_| is deleted before |items_grid_view_| because
+  // |page_switcher_| uses the PaginationModel owned by |items_grid_view_|.
+  delete page_switcher_;
 }
 
 void AppListFolderView::SetAppListFolderItem(AppListFolderItem* folder) {
@@ -98,14 +129,18 @@
   // Stop any previous animation.
   layer()->GetAnimator()->StopAnimating();
 
-  // Hide the top items temporarily if showing the view for opening the folder.
-  if (show)
+  if (show) {
+    // Hide the top items temporarily if showing the view for opening the
+    // folder.
     items_grid_view_->SetTopItemViewsVisible(false);
 
+    // Reset page if showing the view.
+    items_grid_view_->pagination_model()->SelectPage(0, false);
+  }
+
   // Set initial state.
   layer()->SetOpacity(show ? 0.0f : 1.0f);
   SetVisible(true);
-  UpdateFolderNameVisibility(true);
 
   ui::ScopedLayerAnimationSettings animation(layer()->GetAnimator());
   animation.SetTweenType(show ? kFolderFadeInTweenType
@@ -115,11 +150,13 @@
       show ? kFolderTransitionInDurationMs : kFolderTransitionOutDurationMs));
 
   layer()->SetOpacity(show ? 1.0f : 0.0f);
-  app_list_main_view_->search_box_view()->ShowBackOrGoogleIcon(show);
 }
 
 gfx::Size AppListFolderView::CalculatePreferredSize() const {
-  gfx::Size size(kAppsFolderPreferredWidth, kAppsFolderPreferredHeight);
+  gfx::Size size = items_grid_view_->GetTileGridSizeWithoutPadding();
+  size.Enlarge(0, kItemGridsBottomPadding +
+                      folder_header_view_->GetPreferredSize().height());
+  size.Enlarge(kFolderPadding * 2, kFolderPadding * 2);
   return size;
 }
 
@@ -168,14 +205,30 @@
   if (rect.IsEmpty())
     return;
 
+  rect.Inset(kFolderPadding, kFolderPadding);
+
+  // Calculate bounds for items grid view.
+  gfx::Rect grid_frame(rect);
+  grid_frame.Inset(items_grid_view_->GetTilePadding());
+  grid_frame.set_height(items_grid_view_->GetPreferredSize().height());
+  view_model_->set_ideal_bounds(kIndexChildItems, grid_frame);
+
+  // Calculate bounds for folder header view..
   gfx::Rect header_frame(rect);
-  gfx::Size size = folder_header_view_->GetPreferredSize();
-  header_frame.set_height(size.height());
+  header_frame.set_y(grid_frame.bottom() +
+                     items_grid_view_->GetTilePadding().bottom() +
+                     kItemGridsBottomPadding);
+  header_frame.set_height(folder_header_view_->GetPreferredSize().height());
   view_model_->set_ideal_bounds(kIndexFolderHeader, header_frame);
 
-  gfx::Rect grid_frame(rect);
-  grid_frame.Subtract(header_frame);
-  view_model_->set_ideal_bounds(kIndexChildItems, grid_frame);
+  // Calculate bounds for page_switcher.
+  gfx::Rect page_switcher_frame(rect);
+  gfx::Size page_switcher_size = page_switcher_->GetPreferredSize();
+  page_switcher_frame.set_x(page_switcher_frame.right() -
+                            page_switcher_size.width());
+  page_switcher_frame.set_y(header_frame.y());
+  page_switcher_frame.set_size(page_switcher_size);
+  view_model_->set_ideal_bounds(kIndexPageSwitcher, page_switcher_frame);
 }
 
 void AppListFolderView::StartSetupDragInRootLevelAppsGridView(
@@ -210,36 +263,9 @@
   return to_folder;
 }
 
-void AppListFolderView::UpdateFolderViewBackground(bool show_bubble) {
-  if (hide_for_reparent_)
-    return;
-
-  // Before showing the folder container inking bubble, hide the folder name.
-  if (show_bubble)
-    UpdateFolderNameVisibility(false);
-
-  container_view_->folder_background_view()->UpdateFolderContainerBubble(
-      show_bubble ? FolderBackgroundView::SHOW_BUBBLE
-                  : FolderBackgroundView::HIDE_BUBBLE);
-}
-
-void AppListFolderView::UpdateFolderNameVisibility(bool visible) {
-  folder_header_view_->UpdateFolderNameVisibility(visible);
-}
-
-void AppListFolderView::SetBackButtonLabel(bool folder) {
-  app_list_main_view_->search_box_view()->SetBackButtonLabel(folder);
-}
-
 bool AppListFolderView::IsPointOutsideOfFolderBoundary(
     const gfx::Point& point) {
-  if (!GetLocalBounds().Contains(point))
-    return true;
-
-  gfx::Point center = GetLocalBounds().CenterPoint();
-  float delta = (point - center).Length();
-  return delta >
-         kFolderBackgroundBubbleRadius + kOutOfFolderContainerBubbleDelta;
+  return !GetLocalBounds().Contains(point);
 }
 
 // When user drags a folder item out of the folder boundary ink bubble, the
diff --git a/ui/app_list/views/app_list_folder_view.h b/ui/app_list/views/app_list_folder_view.h
index 6641797..a1b9c10 100644
--- a/ui/app_list/views/app_list_folder_view.h
+++ b/ui/app_list/views/app_list_folder_view.h
@@ -27,12 +27,13 @@
 class AppListMainView;
 class AppListModel;
 class FolderHeaderView;
+class PageSwitcher;
 
-class AppListFolderView : public views::View,
-                          public FolderHeaderViewDelegate,
-                          public AppListModelObserver,
-                          public ui::ImplicitAnimationObserver,
-                          public AppsGridViewFolderDelegate {
+class APP_LIST_EXPORT AppListFolderView : public views::View,
+                                          public FolderHeaderViewDelegate,
+                                          public AppListModelObserver,
+                                          public ui::ImplicitAnimationObserver,
+                                          public AppsGridViewFolderDelegate {
  public:
   AppListFolderView(AppsContainerView* container_view,
                     AppListModel* model,
@@ -50,9 +51,6 @@
   // AppListFolderView.
   gfx::Rect GetItemIconBoundsAt(int index);
 
-  void UpdateFolderNameVisibility(bool visible);
-  void SetBackButtonLabel(bool folder);
-
   // Hides the view immediately without animation.
   void HideViewImmediately();
 
@@ -94,7 +92,6 @@
   void SetItemName(AppListFolderItem* item, const std::string& name) override;
 
   // Overridden from AppsGridViewFolderDelegate:
-  void UpdateFolderViewBackground(bool show_bubble) override;
   void ReparentItem(AppListItemView* original_drag_view,
                     const gfx::Point& drag_point_in_folder_grid,
                     bool has_native_drag) override;
@@ -111,6 +108,7 @@
   AppListMainView* app_list_main_view_;   // Not Owned.
   FolderHeaderView* folder_header_view_;  // Owned by views hierarchy.
   AppsGridView* items_grid_view_;         // Owned by the views hierarchy.
+  PageSwitcher* page_switcher_ = nullptr;  // Owned by the views hierarchy.
 
   std::unique_ptr<views::ViewModel> view_model_;
 
diff --git a/ui/app_list/views/app_list_item_view.cc b/ui/app_list/views/app_list_item_view.cc
index 47874df..33d27e1 100644
--- a/ui/app_list/views/app_list_item_view.cc
+++ b/ui/app_list/views/app_list_item_view.cc
@@ -52,6 +52,12 @@
 // 650ms.
 constexpr int kTouchLongpressDelayInMs = 300;
 
+// The color of the title for the tiles within folder.
+constexpr SkColor kFolderGridTitleColor = SK_ColorBLACK;
+
+// The color of the selected item view within folder.
+constexpr SkColor kFolderGridSelectedColor = SkColorSetARGBMacro(31, 0, 0, 0);
+
 }  // namespace
 
 // static
@@ -82,7 +88,9 @@
   title_->SetFontList(font);
   title_->SetLineHeight(font.GetHeight());
   title_->SetHorizontalAlignment(gfx::ALIGN_CENTER);
-  title_->SetEnabledColor(kGridTitleColor);
+  title_->SetEnabledColor(apps_grid_view_->is_in_folder()
+                              ? kFolderGridTitleColor
+                              : kGridTitleColor);
 
   SetTitleSubpixelAA();
 
@@ -335,7 +343,8 @@
                (rect.height() - kGridSelectedSize) / 2);
     cc::PaintFlags flags;
     flags.setAntiAlias(true);
-    flags.setColor(kGridSelectedColor);
+    flags.setColor(apps_grid_view_->is_in_folder() ? kFolderGridSelectedColor
+                                                   : kGridSelectedColor);
     flags.setStyle(cc::PaintFlags::kFill_Style);
     canvas->DrawRoundRect(gfx::RectF(rect), kGridSelectedCornerRadius, flags);
   }
diff --git a/ui/app_list/views/app_list_view.cc b/ui/app_list/views/app_list_view.cc
index 2e821a3..b6fea2af 100644
--- a/ui/app_list/views/app_list_view.cc
+++ b/ui/app_list/views/app_list_view.cc
@@ -510,7 +510,13 @@
   // No-op if app list is on fullscreen all apps state and the event location is
   // within apps grid view's bounds.
   if (app_list_state_ == AppListViewState::FULLSCREEN_ALL_APPS &&
-      GetAppsGridView()->GetBoundsInScreen().Contains(event->location())) {
+      GetRootAppsGridView()->GetBoundsInScreen().Contains(event->location())) {
+    return;
+  }
+
+  if (GetAppsContainerView()->IsInFolderView()) {
+    // Close the folder if it is opened.
+    GetAppsContainerView()->app_list_folder_view()->CloseFolderPage();
     return;
   }
 
@@ -684,11 +690,8 @@
       target_state != AppListViewState::FULLSCREEN_ALL_APPS)
     return;
 
-  AppsContainerView* apps_container_view =
-      app_list_main_view_->contents_view()->apps_container_view();
-
-  if (apps_container_view->IsInFolderView())
-    apps_container_view->ResetForShowApps();
+  if (GetAppsContainerView()->IsInFolderView())
+    GetAppsContainerView()->ResetForShowApps();
 
   if (target_state == AppListViewState::PEEKING) {
     app_list_main_view_->contents_view()->SetActiveState(
@@ -701,7 +704,7 @@
     }
   } else {
     // Set timer to ignore further scroll events for this transition.
-    GetAppsGridView()->StartTimerToIgnoreScrollEvents();
+    GetRootAppsGridView()->StartTimerToIgnoreScrollEvents();
 
     app_list_main_view_->contents_view()->SetActiveState(
         AppListModel::STATE_APPS, !is_side_shelf_);
@@ -774,10 +777,16 @@
   return display::Screen::GetScreen()->GetDisplayNearestView(parent_window_);
 }
 
-AppsGridView* AppListView::GetAppsGridView() const {
-  return app_list_main_view_->contents_view()
-      ->apps_container_view()
-      ->apps_grid_view();
+AppsContainerView* AppListView::GetAppsContainerView() {
+  return app_list_main_view_->contents_view()->apps_container_view();
+}
+
+AppsGridView* AppListView::GetRootAppsGridView() {
+  return GetAppsContainerView()->apps_grid_view();
+}
+
+AppsGridView* AppListView::GetFolderAppsGridView() {
+  return GetAppsContainerView()->app_list_folder_view()->items_grid_view();
 }
 
 AppListStateTransitionSource AppListView::GetAppListStateTransitionSource(
@@ -1000,12 +1009,16 @@
     return false;
 
   // Let the Apps grid view handle the event first in FULLSCREEN_ALL_APPS.
-  if (app_list_state_ == AppListViewState::FULLSCREEN_ALL_APPS &&
-      GetAppsGridView()->HandleScrollFromAppListView(offset, type)) {
-    // Set the scroll ignore timer to avoid processing the tail end of the
-    // stream of scroll events, which would close the view.
-    SetOrRestartScrollIgnoreTimer();
-    return true;
+  if (app_list_state_ == AppListViewState::FULLSCREEN_ALL_APPS) {
+    AppsGridView* apps_grid_view = GetAppsContainerView()->IsInFolderView()
+                                       ? GetFolderAppsGridView()
+                                       : GetRootAppsGridView();
+    if (apps_grid_view->HandleScrollFromAppListView(offset, type)) {
+      // Set the scroll ignore timer to avoid processing the tail end of the
+      // stream of scroll events, which would close the view.
+      SetOrRestartScrollIgnoreTimer();
+      return true;
+    }
   }
 
   if (ShouldIgnoreScrollEvents())
@@ -1065,10 +1078,7 @@
 
   // Updates the visibility of app list items according to the change of
   // |app_list_state_|.
-  app_list_main_view_->contents_view()
-      ->apps_container_view()
-      ->apps_grid_view()
-      ->UpdateControlVisibility(app_list_state_, is_in_drag_);
+  GetAppsContainerView()->UpdateControlVisibility(app_list_state_, is_in_drag_);
 }
 
 void AppListView::StartAnimationForState(AppListViewState target_state) {
@@ -1196,8 +1206,8 @@
   DraggingLayout();
 }
 
-PaginationModel* AppListView::GetAppsPaginationModel() const {
-  return GetAppsGridView()->pagination_model();
+PaginationModel* AppListView::GetAppsPaginationModel() {
+  return GetRootAppsGridView()->pagination_model();
 }
 
 gfx::Rect AppListView::GetAppInfoDialogBounds() const {
@@ -1215,10 +1225,7 @@
     return;
 
   is_in_drag_ = is_in_drag;
-  app_list_main_view_->contents_view()
-      ->apps_container_view()
-      ->apps_grid_view()
-      ->UpdateControlVisibility(app_list_state_, is_in_drag_);
+  GetAppsContainerView()->UpdateControlVisibility(app_list_state_, is_in_drag_);
 }
 
 int AppListView::GetScreenBottom() {
@@ -1236,7 +1243,7 @@
 
   // Updates the opacity of the items in the app list.
   search_box_view_->UpdateOpacity();
-  GetAppsGridView()->UpdateOpacity();
+  GetAppsContainerView()->UpdateOpacity();
 
   Layout();
 }
@@ -1247,12 +1254,10 @@
 
   views::Textfield* search_box = search_box_view_->search_box();
   const bool is_search_box_focused = search_box->HasFocus();
-  const bool is_folder_header_view_focused =
-      app_list_main_view_->contents_view()
-          ->apps_container_view()
-          ->app_list_folder_view()
-          ->folder_header_view()
-          ->HasTextFocus();
+  const bool is_folder_header_view_focused = GetAppsContainerView()
+                                                 ->app_list_folder_view()
+                                                 ->folder_header_view()
+                                                 ->HasTextFocus();
   if (is_search_box_focused || is_folder_header_view_focused) {
     // Do not redirect the key event to the |search_box_| when focus is on a
     // text field.
diff --git a/ui/app_list/views/app_list_view.h b/ui/app_list/views/app_list_view.h
index 684e8a0..4524adf 100644
--- a/ui/app_list/views/app_list_view.h
+++ b/ui/app_list/views/app_list_view.h
@@ -37,6 +37,7 @@
 }
 
 namespace app_list {
+class AppsContainerView;
 class ApplicationDragAndDropHost;
 class AppListMainView;
 class AppListModel;
@@ -178,7 +179,7 @@
   }
 
   // Gets the PaginationModel owned by this view's apps grid.
-  PaginationModel* GetAppsPaginationModel() const;
+  PaginationModel* GetAppsPaginationModel();
 
   // Gets the content bounds of the app info dialog of the app list in the
   // screen coordinates.
@@ -271,8 +272,14 @@
   // Gets the display nearest to the parent window.
   display::Display GetDisplayNearestView() const;
 
-  // Gets the apps grid view owned by this view.
-  AppsGridView* GetAppsGridView() const;
+  // Gets the apps container view owned by this view.
+  AppsContainerView* GetAppsContainerView();
+
+  // Gets the root apps grid view owned by this view.
+  AppsGridView* GetRootAppsGridView();
+
+  // Gets the apps grid view within the folder view owned by this view.
+  AppsGridView* GetFolderAppsGridView();
 
   // Gets the AppListStateTransitionSource for |app_list_state_| to
   // |target_state|. If we are not interested in recording a state transition
diff --git a/ui/app_list/views/app_list_view_unittest.cc b/ui/app_list/views/app_list_view_unittest.cc
index c817c77..c090f1b 100644
--- a/ui/app_list/views/app_list_view_unittest.cc
+++ b/ui/app_list/views/app_list_view_unittest.cc
@@ -595,13 +595,12 @@
 
   std::vector<views::View*> forward_view_list;
   forward_view_list.push_back(search_box_view()->search_box());
-  forward_view_list.push_back(
-      app_list_folder_view()->folder_header_view()->GetFolderNameViewForTest());
   const views::ViewModelT<AppListItemView>* view_model =
       app_list_folder_view()->items_grid_view()->view_model_for_test();
   for (int i = 0; i < view_model->view_size(); ++i)
     forward_view_list.push_back(view_model->view_at(i));
-  forward_view_list.push_back(search_box_view()->back_button());
+  forward_view_list.push_back(
+      app_list_folder_view()->folder_header_view()->GetFolderNameViewForTest());
   forward_view_list.push_back(search_box_view()->search_box());
   std::vector<views::View*> backward_view_list = forward_view_list;
   std::reverse(backward_view_list.begin(), backward_view_list.end());
@@ -744,12 +743,13 @@
 
   std::vector<views::View*> forward_view_list;
   forward_view_list.push_back(search_box_view()->search_box());
-  forward_view_list.push_back(
-      app_list_folder_view()->folder_header_view()->GetFolderNameViewForTest());
   const views::ViewModelT<AppListItemView>* view_model =
       app_list_folder_view()->items_grid_view()->view_model_for_test();
-  for (int i = 0; i < view_model->view_size(); i += apps_grid_view()->cols())
+  for (int i = 0; i < view_model->view_size();
+       i += app_list_folder_view()->items_grid_view()->cols())
     forward_view_list.push_back(view_model->view_at(i));
+  forward_view_list.push_back(
+      app_list_folder_view()->folder_header_view()->GetFolderNameViewForTest());
   forward_view_list.push_back(search_box_view()->search_box());
 
   // Test traversal triggered by down.
@@ -757,11 +757,11 @@
 
   std::vector<views::View*> backward_view_list;
   backward_view_list.push_back(search_box_view()->search_box());
-  for (int i = view_model->view_size() - 1; i >= 0;
-       i -= apps_grid_view()->cols())
-    backward_view_list.push_back(view_model->view_at(i));
   backward_view_list.push_back(
       app_list_folder_view()->folder_header_view()->GetFolderNameViewForTest());
+  for (int i = view_model->view_size() - 1; i >= 0;
+       i -= app_list_folder_view()->items_grid_view()->cols())
+    backward_view_list.push_back(view_model->view_at(i));
   backward_view_list.push_back(search_box_view()->search_box());
 
   // Test traversal triggered by up.
diff --git a/ui/app_list/views/apps_container_view.cc b/ui/app_list/views/apps_container_view.cc
index 5db8047..3fc0a24 100644
--- a/ui/app_list/views/apps_container_view.cc
+++ b/ui/app_list/views/apps_container_view.cc
@@ -17,6 +17,7 @@
 #include "ui/app_list/views/apps_grid_view.h"
 #include "ui/app_list/views/contents_view.h"
 #include "ui/app_list/views/folder_background_view.h"
+#include "ui/app_list/views/page_switcher.h"
 #include "ui/app_list/views/search_box_view.h"
 #include "ui/app_list/views/suggestions_container_view.h"
 #include "ui/base/l10n/l10n_util.h"
@@ -42,13 +43,17 @@
   apps_grid_view_->SetLayout(kPreferredCols, kPreferredRows);
   AddChildView(apps_grid_view_);
 
-  folder_background_view_ = new FolderBackgroundView();
-  AddChildView(folder_background_view_);
+  // Page switcher should be initialized after AppsGridView.
+  page_switcher_ = new PageSwitcher(apps_grid_view_->pagination_model(),
+                                    true /* vertical */);
+  AddChildView(page_switcher_);
 
   app_list_folder_view_ =
       new AppListFolderView(this, model, app_list_main_view);
   // The folder view is initially hidden.
   app_list_folder_view_->SetVisible(false);
+  folder_background_view_ = new FolderBackgroundView(app_list_folder_view_);
+  AddChildView(folder_background_view_);
   AddChildView(app_list_folder_view_);
 
   apps_grid_view_->SetModel(model);
@@ -56,7 +61,11 @@
   SetShowState(SHOW_APPS, false);
 }
 
-AppsContainerView::~AppsContainerView() = default;
+AppsContainerView::~AppsContainerView() {
+  // Make sure |page_switcher_| is deleted before |apps_grid_view_| because
+  // |page_switcher_| uses the PaginationModel owned by |apps_grid_view_|.
+  delete page_switcher_;
+}
 
 void AppsContainerView::ShowActiveFolder(AppListFolderItem* folder_item) {
   // Prevent new animations from starting if there are currently animations
@@ -69,7 +78,10 @@
 
   CreateViewsForFolderTopItemsAnimation(folder_item, true);
 
+  // Disable all the items behind the folder so that they will not be reached
+  // during focus traversal.
   contents_view()->GetSearchBoxView()->search_box()->RequestFocus();
+  apps_grid_view_->DisableFocusForShowingActiveFolder(true);
 }
 
 void AppsContainerView::ShowApps(AppListFolderItem* folder_item) {
@@ -78,12 +90,12 @@
 
   PrepareToShowApps(folder_item);
   SetShowState(SHOW_APPS, true);
+  apps_grid_view_->DisableFocusForShowingActiveFolder(false);
 }
 
 void AppsContainerView::ResetForShowApps() {
   SetShowState(SHOW_APPS, false);
-  folder_background_view_->UpdateFolderContainerBubble(
-      FolderBackgroundView::NO_BUBBLE);
+  apps_grid_view_->DisableFocusForShowingActiveFolder(false);
 }
 
 void AppsContainerView::SetDragAndDropHostOfCurrentAppList(
@@ -100,6 +112,7 @@
 
   PrepareToShowApps(folder_item);
   SetShowState(SHOW_ITEM_REPARENT, false);
+  apps_grid_view_->DisableFocusForShowingActiveFolder(false);
 }
 
 bool AppsContainerView::IsInFolderView() const {
@@ -111,13 +124,40 @@
   show_state_ = AppsContainerView::SHOW_APPS;
 }
 
-gfx::Size AppsContainerView::CalculatePreferredSize() const {
-  const gfx::Size grid_size = apps_grid_view_->GetPreferredSize();
-  const gfx::Size folder_view_size = app_list_folder_view_->GetPreferredSize();
+void AppsContainerView::UpdateControlVisibility(AppListViewState app_list_state,
+                                                bool is_in_drag) {
+  apps_grid_view_->UpdateControlVisibility(app_list_state, is_in_drag);
+  page_switcher_->SetVisible(
+      app_list_state == AppListViewState::FULLSCREEN_ALL_APPS || is_in_drag);
+}
 
-  int width = std::max(grid_size.width(), folder_view_size.width());
-  int height = std::max(grid_size.height(), folder_view_size.height());
-  return gfx::Size(width, height);
+void AppsContainerView::UpdateOpacity() {
+  apps_grid_view_->UpdateOpacity();
+
+  // Updates the opacity of page switcher buttons. The same rule as all apps in
+  // AppsGridView.
+  AppListView* app_list_view = contents_view()->app_list_view();
+  bool should_restore_opacity =
+      !app_list_view->is_in_drag() &&
+      (app_list_view->app_list_state() != AppListViewState::CLOSED);
+  int screen_bottom = app_list_view->GetScreenBottom();
+  gfx::Rect switcher_bounds = page_switcher_->GetBoundsInScreen();
+  float centerline_above_work_area =
+      std::max<float>(screen_bottom - switcher_bounds.CenterPoint().y(), 0.f);
+  float opacity =
+      std::min(std::max((centerline_above_work_area - kAllAppsOpacityStartPx) /
+                            (kAllAppsOpacityEndPx - kAllAppsOpacityStartPx),
+                        0.f),
+               1.0f);
+  page_switcher_->layer()->SetOpacity(should_restore_opacity ? 1.0f : opacity);
+}
+
+gfx::Size AppsContainerView::CalculatePreferredSize() const {
+  gfx::Size size = apps_grid_view_->GetPreferredSize();
+  // Add padding to both side of the apps grid to keep it horizontally
+  // centered since we place page switcher on the right side.
+  size.Enlarge(kAppsGridLeftRightPadding * 2, 0);
+  return size;
 }
 
 void AppsContainerView::Layout() {
@@ -126,13 +166,36 @@
     return;
 
   switch (show_state_) {
-    case SHOW_APPS:
-      apps_grid_view_->SetBoundsRect(rect);
+    case SHOW_APPS: {
+      gfx::Rect grid_rect = rect;
+      grid_rect.Inset(kAppsGridLeftRightPadding, 0);
+      apps_grid_view_->SetBoundsRect(grid_rect);
+
+      gfx::Rect page_switcher_rect = rect;
+      const int page_switcher_width =
+          page_switcher_->GetPreferredSize().width();
+      page_switcher_rect.set_x(page_switcher_rect.right() -
+                               page_switcher_width);
+      page_switcher_rect.set_width(page_switcher_width);
+      page_switcher_->SetBoundsRect(page_switcher_rect);
       break;
-    case SHOW_ACTIVE_FOLDER:
+    }
+    case SHOW_ACTIVE_FOLDER: {
       folder_background_view_->SetBoundsRect(rect);
-      app_list_folder_view_->SetBoundsRect(rect);
+
+      // The opened folder view's center should try to overlap with the folder
+      // item's center while it must fit within the bounds of this view.
+      DCHECK(apps_grid_view_->activated_folder_item_view());
+      gfx::Rect item_bounds_in_container = apps_grid_view_->ConvertRectToParent(
+          apps_grid_view_->activated_folder_item_view()->bounds());
+      gfx::Rect folder_bounds_in_container =
+          gfx::Rect(app_list_folder_view_->GetPreferredSize());
+      folder_bounds_in_container += (item_bounds_in_container.CenterPoint() -
+                                     folder_bounds_in_container.CenterPoint());
+      folder_bounds_in_container.AdjustToFit(rect);
+      app_list_folder_view_->SetBoundsRect(folder_bounds_in_container);
       break;
+    }
     case SHOW_ITEM_REPARENT:
       break;
     default:
@@ -275,31 +338,24 @@
   switch (show_state_) {
     case SHOW_APPS:
       folder_background_view_->SetVisible(false);
-      if (show_apps_with_animation) {
+      apps_grid_view_->ResetForShowApps();
+      if (show_apps_with_animation)
         app_list_folder_view_->ScheduleShowHideAnimation(false, false);
-        apps_grid_view_->ScheduleShowHideAnimation(true);
-      } else {
+      else
         app_list_folder_view_->HideViewImmediately();
-        apps_grid_view_->ResetForShowApps();
-      }
       break;
     case SHOW_ACTIVE_FOLDER:
       folder_background_view_->SetVisible(true);
-      apps_grid_view_->ScheduleShowHideAnimation(false);
       app_list_folder_view_->ScheduleShowHideAnimation(true, false);
       break;
     case SHOW_ITEM_REPARENT:
       folder_background_view_->SetVisible(false);
-      folder_background_view_->UpdateFolderContainerBubble(
-          FolderBackgroundView::NO_BUBBLE);
       app_list_folder_view_->ScheduleShowHideAnimation(false, true);
-      apps_grid_view_->ScheduleShowHideAnimation(true);
       break;
     default:
       NOTREACHED();
   }
 
-  app_list_folder_view_->SetBackButtonLabel(IsInFolderView());
   Layout();
 }
 
@@ -317,6 +373,9 @@
 void AppsContainerView::CreateViewsForFolderTopItemsAnimation(
     AppListFolderItem* active_folder,
     bool open_folder) {
+  if (!is_folder_top_items_animation_enabled_)
+    return;
+
   top_icon_views_.clear();
   std::vector<gfx::Rect> top_items_bounds =
       GetTopItemIconBoundsInActiveFolder();
diff --git a/ui/app_list/views/apps_container_view.h b/ui/app_list/views/apps_container_view.h
index 3a18695c..400823a 100644
--- a/ui/app_list/views/apps_container_view.h
+++ b/ui/app_list/views/apps_container_view.h
@@ -27,6 +27,7 @@
 class AppListMainView;
 class AppListModel;
 class FolderBackgroundView;
+class PageSwitcher;
 
 // AppsContainerView contains a root level AppsGridView to render the root level
 // app items, and a AppListFolderView to render the app items inside the
@@ -65,6 +66,14 @@
   // Called to notify the AppsContainerView that a reparent drag has completed.
   void ReparentDragEnded();
 
+  // Updates the visibility of the items in this view according to
+  // |app_list_state| and |is_in_drag|.
+  void UpdateControlVisibility(AppListViewState app_list_state,
+                               bool is_in_drag);
+
+  // Updates the opacity of the items in this view during dragging.
+  void UpdateOpacity();
+
   // views::View overrides:
   gfx::Size CalculatePreferredSize() const override;
   void Layout() override;
@@ -91,6 +100,10 @@
   }
   AppListFolderView* app_list_folder_view() { return app_list_folder_view_; }
 
+  void set_folder_top_items_animation_enabled_for_test(bool enabled) {
+    is_folder_top_items_animation_enabled_ = enabled;
+  }
+
  private:
   enum ShowState {
     SHOW_NONE,  // initial state
@@ -123,6 +136,7 @@
   // The views below are owned by views hierarchy.
   AppsGridView* apps_grid_view_ = nullptr;
   AppListFolderView* app_list_folder_view_ = nullptr;
+  PageSwitcher* page_switcher_ = nullptr;
   FolderBackgroundView* folder_background_view_ = nullptr;
 
   ShowState show_state_ = SHOW_NONE;
@@ -133,6 +147,9 @@
 
   size_t top_icon_animation_pending_count_ = 0u;
 
+  // True if the animation for the folder top items is enabled.
+  bool is_folder_top_items_animation_enabled_ = true;
+
   DISALLOW_COPY_AND_ASSIGN(AppsContainerView);
 };
 
diff --git a/ui/app_list/views/apps_grid_view.cc b/ui/app_list/views/apps_grid_view.cc
index f0fbc48..eba96767 100644
--- a/ui/app_list/views/apps_grid_view.cc
+++ b/ui/app_list/views/apps_grid_view.cc
@@ -31,7 +31,6 @@
 #include "ui/app_list/views/contents_view.h"
 #include "ui/app_list/views/expand_arrow_view.h"
 #include "ui/app_list/views/indicator_chip_view.h"
-#include "ui/app_list/views/page_switcher_vertical.h"
 #include "ui/app_list/views/pulsing_block_view.h"
 #include "ui/app_list/views/search_box_view.h"
 #include "ui/app_list/views/search_result_tile_item_view.h"
@@ -84,6 +83,9 @@
 constexpr int kTileHorizontalPadding = 12;
 constexpr int kTileVerticalPadding = 6;
 
+// Padding of a tile within the folder view.
+constexpr int kFolderTilePadding = 6;
+
 // Width in pixels of the area on the sides that triggers a page flip.
 constexpr int kPageFlipZoneSize = 40;
 
@@ -135,11 +137,6 @@
 constexpr float kExpandArrowShowStartFraction = 0.5f;
 constexpr float kExpandArrowShowEndFraction = 1.0f;
 
-// Range of the height of centerline above screen bottom that all apps should
-// change opacity.
-constexpr float kAllAppsOpacityStartPx = 8.0f;
-constexpr float kAllAppsOpacityEndPx = 144.0f;
-
 // The length of time we ignore scroll events on the AppsGridView after the
 // AppListView transitions to FULLSCREEN_ALL_APPS.
 constexpr base::TimeDelta kIgnoreScrollEventsDurationMs =
@@ -378,10 +375,10 @@
 
   pagination_model_.AddObserver(this);
 
-  page_switcher_view_ = new PageSwitcherVertical(&pagination_model_);
   pagination_controller_.reset(new PaginationController(
-      &pagination_model_, PaginationController::SCROLL_AXIS_VERTICAL));
-  AddChildView(page_switcher_view_);
+      &pagination_model_, folder_delegate_
+                              ? PaginationController::SCROLL_AXIS_HORIZONTAL
+                              : PaginationController::SCROLL_AXIS_VERTICAL));
 }
 
 AppsGridView::~AppsGridView() {
@@ -399,7 +396,6 @@
   if (item_list_)
     item_list_->RemoveObserver(this);
 
-  // Make sure |page_switcher_view_| is deleted before |pagination_model_|.
   view_model_.Clear();
   RemoveAllChildViews(true);
 }
@@ -409,8 +405,7 @@
   rows_per_page_ = rows_per_page;
 }
 
-// static
-gfx::Size AppsGridView::GetTotalTileSize() {
+gfx::Size AppsGridView::GetTotalTileSize() const {
   static gfx::Size rect_size;
 
   if (!rect_size.IsEmpty())
@@ -423,17 +418,17 @@
   return rect_size;
 }
 
-// static
-gfx::Insets AppsGridView::GetTilePadding() {
-  static gfx::Insets tile_padding_full_screen;
+gfx::Insets AppsGridView::GetTilePadding() const {
+  if (folder_delegate_)
+    return gfx::Insets(-kFolderTilePadding, -kFolderTilePadding);
+  return gfx::Insets(-kTileVerticalPadding, -kTileHorizontalPadding);
+}
 
-  // Full screen mode.
-  if (!tile_padding_full_screen.IsEmpty())
-    return tile_padding_full_screen;
-  tile_padding_full_screen =
-      gfx::Insets(-kTileVerticalPadding, -kTileHorizontalPadding,
-                  -kTileVerticalPadding, -kTileHorizontalPadding);
-  return tile_padding_full_screen;
+gfx::Size AppsGridView::GetTileGridSizeWithoutPadding() const {
+  gfx::Size size = GetTileGridSize();
+  gfx::Insets grid_padding = GetTilePadding();
+  size.Enlarge(grid_padding.width(), grid_padding.height());
+  return size;
 }
 
 void AppsGridView::ResetForShowApps() {
@@ -451,6 +446,14 @@
            static_cast<size_t>(view_model_.view_size()));
 }
 
+void AppsGridView::DisableFocusForShowingActiveFolder(bool disabled) {
+  for (auto* v : suggestions_container_->tile_views())
+    v->SetEnabled(!disabled);
+  for (int i = 0; i < view_model_.view_size(); ++i) {
+    view_model_.view_at(i)->SetEnabled(!disabled);
+  }
+}
+
 void AppsGridView::SetModel(AppListModel* model) {
   if (model_)
     model_->RemoveObserver(this);
@@ -594,11 +597,6 @@
 
   MaybeStartPageFlipTimer(last_drag_point_);
 
-  gfx::Point page_switcher_point(last_drag_point_);
-  views::View::ConvertPointToTarget(this, page_switcher_view_,
-                                    &page_switcher_point);
-  page_switcher_view_->UpdateUIForDragPoint(page_switcher_point);
-
   if (last_folder_drop_target != folder_drop_target_ ||
       last_reorder_drop_target != reorder_drop_target_ ||
       last_drop_attempt != drop_attempt_) {
@@ -689,11 +687,6 @@
   AnimateToIdealBounds();
 
   StopPageFlipTimer();
-
-  // If user releases mouse inside a folder's grid view, burst the folder
-  // container ink bubble.
-  if (folder_delegate_ && !IsDraggingForReparentInHiddenGridView())
-    folder_delegate_->UpdateFolderViewBackground(false);
 }
 
 void AppsGridView::StopPageFlipTimer() {
@@ -824,10 +817,10 @@
 }
 
 gfx::Size AppsGridView::CalculatePreferredSize() const {
+  if (folder_delegate_)
+    return GetTileGridSize();
+
   gfx::Size size = gfx::Size(kAppsGridPreferredWidth, kAppsGridPreferredHeight);
-  // Add padding to both side of the apps grid to keep it horizontally
-  // centered since we place page switcher on the right side.
-  size.Enlarge(kAppsGridLeftRightPadding * 2, 0);
   return size;
 }
 
@@ -909,12 +902,6 @@
       view->SetBoundsRect(view_model_.ideal_bounds(i));
   }
   views::ViewModelUtils::SetViewBoundsToIdealBounds(pulsing_blocks_model_);
-
-  const int page_switcher_width =
-      page_switcher_view_->GetPreferredSize().width();
-  rect.set_x(rect.right() - page_switcher_width);
-  rect.set_width(page_switcher_width);
-  page_switcher_view_->SetBoundsRect(rect);
 }
 
 void AppsGridView::UpdateControlVisibility(AppListViewState app_list_state,
@@ -933,8 +920,6 @@
     AppListItemView* view = GetItemViewAt(i);
     view->SetVisible(fullscreen_apps_in_drag);
   }
-
-  page_switcher_view_->SetVisible(fullscreen_apps_in_drag);
 }
 
 bool AppsGridView::OnKeyPressed(const ui::KeyEvent& event) {
@@ -998,6 +983,7 @@
     view_model_.Add(view, i);
     AddChildView(view);
   }
+  UpdateColsAndRowsForFolder();
   UpdatePaging();
   UpdatePulsingBlockViews();
   Layout();
@@ -1014,6 +1000,8 @@
 }
 
 int AppsGridView::TilesPerPage(int page) const {
+  if (folder_delegate_)
+    return kMaxFolderItemsPerPage;
   if (page == 0)
     return cols_ * (rows_per_page_ - 1);
   return cols_ * rows_per_page_;
@@ -1394,7 +1382,8 @@
   // Items can only be dropped into non-folders (which have no children) or
   // folders that have fewer than the max allowed items.
   // The OEM folder does not allow drag/drop of other items into it.
-  if (target_item->ChildItemCount() >= kMaxFolderItems ||
+  const size_t kMaxItemCount = kMaxFolderItemsPerPage * kMaxFolderPages;
+  if (target_item->ChildItemCount() >= kMaxItemCount ||
       IsOEMFolderItem(target_item)) {
     return false;
   }
@@ -1477,9 +1466,6 @@
     return;
   }
 
-  // Regular drag and drop in a folder's grid view.
-  folder_delegate_->UpdateFolderViewBackground(true);
-
   // Calculate if the drag_view_ is dragged out of the folder's container
   // ink bubble.
   gfx::Rect bounds_to_folder_view = ConvertRectToParent(drag_view_->bounds());
@@ -1587,7 +1573,7 @@
   // Move focus based on target global focus index.
   if (target_global_index < 0 || target_global_index >= cols_ * row_total) {
     // Target index is outside apps grid view.
-    if (folder_delegate_ && arrow_up) {
+    if (folder_delegate_ && !arrow_up) {
       contents_view_->apps_container_view()
           ->app_list_folder_view()
           ->folder_header_view()
@@ -1605,6 +1591,17 @@
   return true;
 }
 
+void AppsGridView::UpdateColsAndRowsForFolder() {
+  if (!folder_delegate_ || !item_list_->item_count())
+    return;
+
+  // Try to shape the apps grid into a square.
+  int items_in_one_page =
+      std::min(kMaxFolderItemsPerPage, item_list_->item_count());
+  cols_ = std::sqrt(items_in_one_page - 1) + 1;
+  rows_per_page_ = (items_in_one_page - 1) / cols_ + 1;
+}
+
 void AppsGridView::DispatchDragEventForReparent(Pointer pointer,
                                                 const gfx::Point& drag_point) {
   folder_delegate_->DispatchDragEventForReparent(pointer, drag_point);
@@ -1789,20 +1786,6 @@
 
     item_view->layer()->SetOpacity(should_restore_opacity ? 1.0f : opacity);
   }
-
-  // Updates the opacity of page switcher buttons. The same rule as all apps.
-  if (page_switcher_view_) {
-    gfx::Rect switcher_bounds = page_switcher_view_->GetBoundsInScreen();
-    centerline_above_work_area =
-        std::max<float>(screen_bottom - switcher_bounds.CenterPoint().y(), 0.f);
-    opacity = std::min(
-        std::max((centerline_above_work_area - kAllAppsOpacityStartPx) /
-                     (kAllAppsOpacityEndPx - kAllAppsOpacityStartPx),
-                 0.f),
-        1.0f);
-    page_switcher_view_->layer()->SetOpacity(should_restore_opacity ? 1.0f
-                                                                    : opacity);
-  }
 }
 
 void AppsGridView::StartTimerToIgnoreScrollEvents() {
@@ -1896,14 +1879,6 @@
     else if (drag_point.y() > height() - kPageFlipZoneSize)
       new_page_flip_target = pagination_model_.selected_page() + 1;
   } else {
-    if (page_switcher_view_->bounds().Contains(drag_point)) {
-      gfx::Point page_switcher_point(drag_point);
-      views::View::ConvertPointToTarget(this, page_switcher_view_,
-                                        &page_switcher_point);
-      new_page_flip_target =
-          page_switcher_view_->GetPageForPoint(page_switcher_point);
-    }
-
     // TODO(xiyuan): Fix this for RTL.
     if (new_page_flip_target == -1 && drag_point.x() < kPageFlipZoneSize)
       new_page_flip_target = pagination_model_.selected_page() - 1;
@@ -2001,6 +1976,7 @@
   bounds_animator_.SetAnimationDelegate(
       drag_view_, std::unique_ptr<gfx::AnimationDelegate>(
                       new ItemRemoveAnimationDelegate(drag_view_)));
+  UpdateColsAndRowsForFolder();
   UpdatePaging();
 }
 
@@ -2043,6 +2019,7 @@
 
   item_list_->AddObserver(this);
   model_->AddObserver(this);
+  UpdateColsAndRowsForFolder();
   UpdatePaging();
 }
 
@@ -2115,6 +2092,7 @@
   bounds_animator_.SetAnimationDelegate(
       drag_view_, std::unique_ptr<gfx::AnimationDelegate>(
                       new ItemRemoveAnimationDelegate(drag_view_)));
+  UpdateColsAndRowsForFolder();
   UpdatePaging();
 
   return true;
@@ -2240,6 +2218,7 @@
   // on drag/animation from PEEKING.
   view->SetVisible(model_->state_fullscreen() != AppListViewState::PEEKING);
 
+  UpdateColsAndRowsForFolder();
   UpdatePaging();
   UpdatePulsingBlockViews();
   Layout();
@@ -2251,6 +2230,7 @@
 
   DeleteItemViewAtIndex(index);
 
+  UpdateColsAndRowsForFolder();
   UpdatePaging();
   UpdatePulsingBlockViews();
   Layout();
@@ -2263,6 +2243,7 @@
   EndDrag(true);
   view_model_.Move(from_index, to_index);
 
+  UpdateColsAndRowsForFolder();
   UpdatePaging();
   AnimateToIdealBounds();
 }
@@ -2360,7 +2341,13 @@
 }
 
 gfx::Size AppsGridView::GetTileGridSize() const {
-  return gfx::Size(kAppsGridPreferredWidth, kAppsGridPreferredHeight);
+  if (!folder_delegate_)
+    return gfx::Size(kAppsGridPreferredWidth, kAppsGridPreferredHeight);
+
+  gfx::Rect bounds = GetExpectedTileBounds(Index(0, 0));
+  bounds.Union(GetExpectedTileBounds(Index(0, rows_per_page_ * cols_ - 1)));
+  bounds.Inset(GetTilePadding());
+  return bounds.size();
 }
 
 int AppsGridView::GetHeightOnTopOfAllAppsTiles(int page) const {
@@ -2379,8 +2366,13 @@
 }
 
 gfx::Rect AppsGridView::GetExpectedTileBounds(const Index& index) const {
+  if (!cols_)
+    return gfx::Rect();
+
   gfx::Rect bounds(GetContentsBounds());
-  bounds.Offset(kAppsGridLeftRightPadding - kTileHorizontalPadding, 0);
+  if (!folder_delegate_)
+    bounds.Offset(-kTileHorizontalPadding, 0);
+
   bounds.Inset(0, GetHeightOnTopOfAllAppsTiles(index.page), 0, 0);
   int row = index.slot / cols_;
   int col = index.slot % cols_;
diff --git a/ui/app_list/views/apps_grid_view.h b/ui/app_list/views/apps_grid_view.h
index deac6e1..2a7fb28 100644
--- a/ui/app_list/views/apps_grid_view.h
+++ b/ui/app_list/views/apps_grid_view.h
@@ -51,7 +51,6 @@
 class ContentsView;
 class IndicatorChipView;
 class SuggestionsContainerView;
-class PageSwitcher;
 class PaginationController;
 class PulsingBlockView;
 class ExpandArrowView;
@@ -82,14 +81,21 @@
   int rows_per_page() const { return rows_per_page_; }
 
   // Returns the size of a tile view including its padding.
-  static gfx::Size GetTotalTileSize();
+  gfx::Size GetTotalTileSize() const;
 
   // Returns the padding around a tile view.
-  static gfx::Insets GetTilePadding();
+  gfx::Insets GetTilePadding() const;
+
+  // Returns the size of the entire tile grid without padding.
+  gfx::Size GetTileGridSizeWithoutPadding() const;
 
   // This resets the grid view to a fresh state for showing the app list.
   void ResetForShowApps();
 
+  // All items in this view become unfocusable if |disabled| is true. This is
+  // used to trap focus within the folder when it is opened.
+  void DisableFocusForShowingActiveFolder(bool disabled);
+
   // Sets |model| to use. Note this does not take ownership of |model|.
   void SetModel(AppListModel* model);
 
@@ -236,6 +242,8 @@
     folder_delegate_ = folder_delegate;
   }
 
+  bool is_in_folder() const { return !!folder_delegate_; }
+
   AppListItemView* activated_folder_item_view() const {
     return activated_folder_item_view_;
   }
@@ -516,6 +524,9 @@
   // state.
   bool HandleFocusMovementInFullscreenAllAppsState(bool arrow_up);
 
+  // Update number of columns and rows for apps within a folder.
+  void UpdateColsAndRowsForFolder();
+
   AppListModel* model_ = nullptr;         // Owned by AppListView.
   AppListItemList* item_list_ = nullptr;  // Not owned.
 
@@ -525,7 +536,6 @@
   PaginationModel pagination_model_;
   // Must appear after |pagination_model_|.
   std::unique_ptr<PaginationController> pagination_controller_;
-  PageSwitcher* page_switcher_view_ = nullptr;  // Owned by views hierarchy.
 
   // Created by AppListMainView, owned by views hierarchy.
   ContentsView* contents_view_ = nullptr;
diff --git a/ui/app_list/views/apps_grid_view_folder_delegate.h b/ui/app_list/views/apps_grid_view_folder_delegate.h
index 924a653..402fc7b 100644
--- a/ui/app_list/views/apps_grid_view_folder_delegate.h
+++ b/ui/app_list/views/apps_grid_view_folder_delegate.h
@@ -19,10 +19,6 @@
 // A delegate which allows an AppsGridView to communicate with its host folder.
 class APP_LIST_EXPORT AppsGridViewFolderDelegate {
  public:
-  // Updates the folder view background to show or hide folder container ink
-  // bubble.
-  virtual void UpdateFolderViewBackground(bool show_bubble) = 0;
-
   // Called when a folder item is dragged out of the folder to be re-parented.
   // |original_drag_view| is the |drag_view_| inside the folder's grid view.
   // |drag_point_in_folder_grid| is the last drag point in coordinate of the
diff --git a/ui/app_list/views/apps_grid_view_unittest.cc b/ui/app_list/views/apps_grid_view_unittest.cc
index 38b2222..2a33975 100644
--- a/ui/app_list/views/apps_grid_view_unittest.cc
+++ b/ui/app_list/views/apps_grid_view_unittest.cc
@@ -30,6 +30,7 @@
 #include "ui/app_list/test/app_list_test_model.h"
 #include "ui/app_list/test/app_list_test_view_delegate.h"
 #include "ui/app_list/test/test_search_result.h"
+#include "ui/app_list/views/app_list_folder_view.h"
 #include "ui/app_list/views/app_list_item_view.h"
 #include "ui/app_list/views/app_list_main_view.h"
 #include "ui/app_list/views/app_list_view.h"
@@ -37,6 +38,7 @@
 #include "ui/app_list/views/apps_grid_view_folder_delegate.h"
 #include "ui/app_list/views/contents_view.h"
 #include "ui/app_list/views/expand_arrow_view.h"
+#include "ui/app_list/views/folder_background_view.h"
 #include "ui/app_list/views/search_box_view.h"
 #include "ui/app_list/views/search_result_tile_item_view.h"
 #include "ui/app_list/views/suggestions_container_view.h"
@@ -178,6 +180,10 @@
     return apps_grid_view_->pagination_model();
   }
 
+  AppListFolderView* app_list_folder_view() const {
+    return contents_view_->apps_container_view()->app_list_folder_view();
+  }
+
   // Points are in |apps_grid_view_|'s coordinates, and fixed for RTL.
   AppListItemView* SimulateDrag(AppsGridView::Pointer pointer,
                                 const gfx::Point& from,
@@ -245,11 +251,6 @@
   TestAppsGridViewFolderDelegate() = default;
   ~TestAppsGridViewFolderDelegate() override = default;
 
-  // Overridden from AppsGridViewFolderDelegate:
-  void UpdateFolderViewBackground(bool show_bubble) override {
-    show_bubble_ = show_bubble;
-  }
-
   void ReparentItem(AppListItemView* original_drag_view,
                     const gfx::Point& drag_point_in_folder_grid,
                     bool has_native_drag) override {}
@@ -269,11 +270,7 @@
 
   void SetRootLevelDragViewVisible(bool visible) override {}
 
-  bool show_bubble() { return show_bubble_; }
-
  private:
-  bool show_bubble_ = false;
-
   DISALLOW_COPY_AND_ASSIGN(TestAppsGridViewFolderDelegate);
 };
 
@@ -383,7 +380,8 @@
 
 TEST_P(AppsGridViewTest, MouseDragMaxItemsInFolder) {
   // Create and add a folder with |kMaxFolderItemsFullscreen - 1| items.
-  size_t kTotalItems = kMaxFolderItems - 1;
+  const size_t kMaxItems = kMaxFolderItemsPerPage * kMaxFolderPages;
+  const size_t kTotalItems = kMaxItems - 1;
   model_->CreateAndPopulateFolderWithApps(kTotalItems);
   EXPECT_EQ(1u, model_->top_level_item_list()->item_count());
   EXPECT_EQ(AppListFolderItem::kItemType,
@@ -397,9 +395,9 @@
   model_->PopulateAppWithId(kTotalItems + 1);
   EXPECT_EQ(3u, model_->top_level_item_list()->item_count());
   EXPECT_EQ(folder_item->id(), model_->top_level_item_list()->item_at(0)->id());
-  EXPECT_EQ(model_->GetItemName(kMaxFolderItems - 1),
+  EXPECT_EQ(model_->GetItemName(kMaxItems - 1),
             model_->top_level_item_list()->item_at(1)->id());
-  EXPECT_EQ(model_->GetItemName(kMaxFolderItems),
+  EXPECT_EQ(model_->GetItemName(kMaxItems),
             model_->top_level_item_list()->item_at(2)->id());
 
   gfx::Point from = GetItemRectOnCurrentPageAt(0, 1).CenterPoint();
@@ -410,8 +408,8 @@
   apps_grid_view_->EndDrag(false);
   EXPECT_EQ(2u, model_->top_level_item_list()->item_count());
   EXPECT_EQ(folder_item->id(), model_->top_level_item_list()->item_at(0)->id());
-  EXPECT_EQ(kMaxFolderItems, folder_item->ChildItemCount());
-  EXPECT_EQ(model_->GetItemName(kMaxFolderItems),
+  EXPECT_EQ(kMaxItems, folder_item->ChildItemCount());
+  EXPECT_EQ(model_->GetItemName(kMaxItems),
             model_->top_level_item_list()->item_at(1)->id());
   test_api_->LayoutToIdealBounds();
 
@@ -420,7 +418,7 @@
   SimulateDrag(AppsGridView::MOUSE, from, to);
   apps_grid_view_->EndDrag(false);
   EXPECT_EQ(2u, model_->top_level_item_list()->item_count());
-  EXPECT_EQ(kMaxFolderItems, folder_item->ChildItemCount());
+  EXPECT_EQ(kMaxItems, folder_item->ChildItemCount());
   test_api_->LayoutToIdealBounds();
 }
 
@@ -428,8 +426,9 @@
 // folder.
 TEST_P(AppsGridViewTest, MouseDragMaxItemsInFolderWithMovement) {
   // Create and add a folder with |kMaxFolderItemsFullscreen| in it.
-  size_t kTotalItems = kMaxFolderItems;
-  model_->CreateAndPopulateFolderWithApps(kTotalItems);
+  const size_t kMaxItems = kMaxFolderItemsPerPage * kMaxFolderPages;
+  size_t kTotalItems = kMaxItems;
+  model_->CreateAndPopulateFolderWithApps(kMaxItems);
   EXPECT_EQ(1u, model_->top_level_item_list()->item_count());
   EXPECT_EQ(AppListFolderItem::kItemType,
             model_->top_level_item_list()->item_at(0)->GetItemType());
@@ -441,7 +440,7 @@
   model_->PopulateAppWithId(kTotalItems);
   EXPECT_EQ(2u, model_->top_level_item_list()->item_count());
   EXPECT_EQ(folder_item->id(), model_->top_level_item_list()->item_at(0)->id());
-  EXPECT_EQ(model_->GetItemName(kMaxFolderItems),
+  EXPECT_EQ(model_->GetItemName(kMaxItems),
             model_->top_level_item_list()->item_at(1)->id());
 
   AppListItemView* folder_view =
@@ -471,7 +470,7 @@
 
   // The item should not have moved into the folder.
   EXPECT_EQ(2u, model_->top_level_item_list()->item_count());
-  EXPECT_EQ(kMaxFolderItems, folder_item->ChildItemCount());
+  EXPECT_EQ(kMaxItems, folder_item->ChildItemCount());
   test_api_->LayoutToIdealBounds();
 }
 
@@ -661,9 +660,7 @@
 
   // Starts a mouse drag and then cancels it.
   SimulateDrag(AppsGridView::MOUSE, mouse_from, mouse_to);
-  EXPECT_TRUE(folder_delegate.show_bubble());
   apps_grid_view_->EndDrag(true);
-  EXPECT_FALSE(folder_delegate.show_bubble());
   EXPECT_EQ(std::string("Item 0,Item 1,Item 2,Item 3"),
             model_->GetModelContent());
 }
@@ -831,5 +828,103 @@
   ASSERT_NE(0, GetPaginationModel()->transition().progress);
 }
 
+TEST_F(AppsGridViewTest, CloseFolderByClickingBackground) {
+  // Disable the animation for the folder top items for test purpose.
+  AppsContainerView* apps_container_view =
+      contents_view_->apps_container_view();
+  apps_container_view->set_folder_top_items_animation_enabled_for_test(false);
+
+  const size_t kTotalItems = kMaxFolderItemsPerPage;
+  model_->CreateAndPopulateFolderWithApps(kTotalItems);
+  EXPECT_EQ(1u, model_->top_level_item_list()->item_count());
+  EXPECT_EQ(AppListFolderItem::kItemType,
+            model_->top_level_item_list()->item_at(0)->GetItemType());
+
+  // Open the folder.
+  test_api_->PressItemAt(0);
+  EXPECT_TRUE(apps_container_view->IsInFolderView());
+
+  // Simulate mouse press on folder background to close the folder.
+  ui::MouseEvent event(ui::ET_MOUSE_PRESSED, gfx::Point(), gfx::Point(),
+                       ui::EventTimeForNow(), ui::EF_LEFT_MOUSE_BUTTON,
+                       ui::EF_LEFT_MOUSE_BUTTON);
+  apps_container_view->folder_background_view()->OnMouseEvent(&event);
+  EXPECT_FALSE(apps_container_view->IsInFolderView());
+}
+
+TEST_F(AppsGridViewTest, PageResetAfterOpenFolder) {
+  // Disable the animation for the folder top items for test purpose.
+  contents_view_->apps_container_view()
+      ->set_folder_top_items_animation_enabled_for_test(false);
+
+  const size_t kTotalItems = kMaxFolderPages * kMaxFolderItemsPerPage;
+  model_->CreateAndPopulateFolderWithApps(kTotalItems);
+  EXPECT_EQ(1u, model_->top_level_item_list()->item_count());
+  EXPECT_EQ(AppListFolderItem::kItemType,
+            model_->top_level_item_list()->item_at(0)->GetItemType());
+
+  // Open the folder. It should be at page 0.
+  test_api_->PressItemAt(0);
+  PaginationModel* pagination_model =
+      app_list_folder_view()->items_grid_view()->pagination_model();
+  EXPECT_EQ(3, pagination_model->total_pages());
+  EXPECT_EQ(0, pagination_model->selected_page());
+
+  // Select page 2.
+  pagination_model->SelectPage(2, false /* animate */);
+  EXPECT_EQ(2, pagination_model->selected_page());
+
+  // Close the folder and reopen it. It should be at page 0.
+  app_list_folder_view()->CloseFolderPage();
+  test_api_->PressItemAt(0);
+  EXPECT_EQ(3, pagination_model->total_pages());
+  EXPECT_EQ(0, pagination_model->selected_page());
+}
+
+TEST_F(AppsGridViewTest, FolderColsAndRows) {
+  // Disable the animation for the folder top items for test purpose.
+  contents_view_->apps_container_view()
+      ->set_folder_top_items_animation_enabled_for_test(false);
+
+  // Populate folders with different number of apps.
+  model_->CreateAndPopulateFolderWithApps(2);
+  model_->CreateAndPopulateFolderWithApps(5);
+  model_->CreateAndPopulateFolderWithApps(9);
+  model_->CreateAndPopulateFolderWithApps(15);
+  model_->CreateAndPopulateFolderWithApps(17);
+
+  // Check the number of cols and rows for each opened folder.
+  AppsGridView* items_grid_view = app_list_folder_view()->items_grid_view();
+  test_api_->PressItemAt(0);
+  EXPECT_EQ(2, items_grid_view->view_model_for_test()->view_size());
+  EXPECT_EQ(2, items_grid_view->cols());
+  EXPECT_EQ(1, items_grid_view->rows_per_page());
+  app_list_folder_view()->CloseFolderPage();
+
+  test_api_->PressItemAt(1);
+  EXPECT_EQ(5, items_grid_view->view_model_for_test()->view_size());
+  EXPECT_EQ(3, items_grid_view->cols());
+  EXPECT_EQ(2, items_grid_view->rows_per_page());
+  app_list_folder_view()->CloseFolderPage();
+
+  test_api_->PressItemAt(2);
+  EXPECT_EQ(9, items_grid_view->view_model_for_test()->view_size());
+  EXPECT_EQ(3, items_grid_view->cols());
+  EXPECT_EQ(3, items_grid_view->rows_per_page());
+  app_list_folder_view()->CloseFolderPage();
+
+  test_api_->PressItemAt(3);
+  EXPECT_EQ(15, items_grid_view->view_model_for_test()->view_size());
+  EXPECT_EQ(4, items_grid_view->cols());
+  EXPECT_EQ(4, items_grid_view->rows_per_page());
+  app_list_folder_view()->CloseFolderPage();
+
+  test_api_->PressItemAt(4);
+  EXPECT_EQ(17, items_grid_view->view_model_for_test()->view_size());
+  EXPECT_EQ(4, items_grid_view->cols());
+  EXPECT_EQ(4, items_grid_view->rows_per_page());
+  app_list_folder_view()->CloseFolderPage();
+}
+
 }  // namespace test
 }  // namespace app_list
diff --git a/ui/app_list/views/folder_background_view.cc b/ui/app_list/views/folder_background_view.cc
index 6fffa54d..a7e1dfe 100644
--- a/ui/app_list/views/folder_background_view.cc
+++ b/ui/app_list/views/folder_background_view.cc
@@ -4,94 +4,29 @@
 
 #include "ui/app_list/views/folder_background_view.h"
 
-#include <algorithm>
-
-#include "ui/app_list/app_list_constants.h"
-#include "ui/app_list/app_list_features.h"
 #include "ui/app_list/views/app_list_folder_view.h"
-#include "ui/app_list/views/apps_container_view.h"
-#include "ui/compositor/scoped_layer_animation_settings.h"
-#include "ui/gfx/canvas.h"
-#include "ui/gfx/transform_util.h"
 
 namespace app_list {
 
-namespace {
+FolderBackgroundView::FolderBackgroundView(AppListFolderView* folder_view)
+    : folder_view_(folder_view) {}
 
-const float kFolderInkBubbleScale = 1.2f;
-const int kBubbleTransitionDurationMs = 200;
+FolderBackgroundView::~FolderBackgroundView() = default;
 
-}  // namespace
-
-FolderBackgroundView::FolderBackgroundView()
-    : folder_view_(NULL), show_state_(NO_BUBBLE) {
-  SetPaintToLayer();
-  layer()->SetFillsBoundsOpaquely(false);
+bool FolderBackgroundView::OnMousePressed(const ui::MouseEvent& event) {
+  HandleClickOrTap();
+  return true;
 }
 
-FolderBackgroundView::~FolderBackgroundView() {
-}
-
-void FolderBackgroundView::UpdateFolderContainerBubble(ShowState state) {
-  if (show_state_ == state ||
-      (state == HIDE_BUBBLE && show_state_ == NO_BUBBLE)) {
+void FolderBackgroundView::OnGestureEvent(ui::GestureEvent* event) {
+  if (event->type() != ui::ET_GESTURE_TAP)
     return;
-  }
-
-  show_state_ = state;
-
-  // Set the initial state before the animation starts.
-  const gfx::Rect bounds(layer()->bounds().size());
-  gfx::Transform transform =
-      gfx::GetScaleTransform(bounds.CenterPoint(), kFolderInkBubbleScale);
-  if (show_state_ == SHOW_BUBBLE) {
-    layer()->SetOpacity(0.0f);
-    layer()->SetTransform(transform);
-  } else {
-    layer()->SetOpacity(GetBubbleOpacity());
-    layer()->SetTransform(gfx::Transform());
-  }
-
-  ui::ScopedLayerAnimationSettings settings(layer()->GetAnimator());
-  settings.AddObserver(this);
-  settings.SetTransitionDuration(
-      base::TimeDelta::FromMilliseconds((kBubbleTransitionDurationMs)));
-  if (show_state_ == SHOW_BUBBLE) {
-    settings.SetTweenType(gfx::Tween::LINEAR_OUT_SLOW_IN);
-    layer()->SetOpacity(GetBubbleOpacity());
-    layer()->SetTransform(gfx::Transform());
-  } else {
-    settings.SetTweenType(gfx::Tween::FAST_OUT_LINEAR_IN);
-    layer()->SetOpacity(0.0f);
-    layer()->SetTransform(transform);
-  }
-
-  SchedulePaint();
+  HandleClickOrTap();
+  event->SetHandled();
 }
 
-void FolderBackgroundView::OnPaint(gfx::Canvas* canvas) {
-  if (show_state_ == NO_BUBBLE)
-    return;
-
-  // Draw ink bubble that shows the folder boundary.
-  cc::PaintFlags flags;
-  flags.setStyle(cc::PaintFlags::kFill_Style);
-  flags.setAntiAlias(true);
-  flags.setColor(FolderImage::kFolderBubbleColor);
-  canvas->DrawCircle(GetContentsBounds().CenterPoint(),
-                     kFolderBackgroundBubbleRadius, flags);
-}
-
-void FolderBackgroundView::OnImplicitAnimationsCompleted() {
-  // Show folder name after the ink bubble disappears.
-  if (show_state_ == HIDE_BUBBLE) {
-    static_cast<AppsContainerView*>(parent())->app_list_folder_view()->
-        UpdateFolderNameVisibility(true);
-  }
-}
-
-float FolderBackgroundView::GetBubbleOpacity() const {
-  return kFolderBubbleOpacity;
+void FolderBackgroundView::HandleClickOrTap() {
+  folder_view_->CloseFolderPage();
 }
 
 }  // namespace app_list
diff --git a/ui/app_list/views/folder_background_view.h b/ui/app_list/views/folder_background_view.h
index cd5a0fa..5f16274 100644
--- a/ui/app_list/views/folder_background_view.h
+++ b/ui/app_list/views/folder_background_view.h
@@ -5,46 +5,32 @@
 #ifndef UI_APP_LIST_VIEWS_FOLDER_BACKGROUND_VIEW_H_
 #define UI_APP_LIST_VIEWS_FOLDER_BACKGROUND_VIEW_H_
 
-#include "base/macros.h"
-#include "ui/compositor/layer_animation_observer.h"
 #include "ui/views/view.h"
 
 namespace app_list {
 
 class AppListFolderView;
 
-// Draws the ink bubble indicating the boundary of the folder when user drags an
-// item inside a folder.
-class FolderBackgroundView : public views::View,
-                             public ui::ImplicitAnimationObserver {
+// An invisible background view of the folder in fullscreen app list. It is used
+// to close folder when the user clicks/taps outside the opened folder.
+class FolderBackgroundView : public views::View {
  public:
-  enum ShowState {
-    NO_BUBBLE,
-    SHOW_BUBBLE,
-    HIDE_BUBBLE,
-  };
-
-  FolderBackgroundView();
+  explicit FolderBackgroundView(AppListFolderView* folder_view);
   ~FolderBackgroundView() override;
 
-  // Updates the ink bubble's ShowState.
-  void UpdateFolderContainerBubble(ShowState state);
-
   void set_folder_view(AppListFolderView* folder_view) {
     folder_view_ = folder_view;
   }
 
  private:
   // views::View overrides:
-  void OnPaint(gfx::Canvas* canvas) override;
+  bool OnMousePressed(const ui::MouseEvent& event) override;
+  void OnGestureEvent(ui::GestureEvent* event) override;
 
-  // ui::ImplicitAnimationObserver overrides:
-  void OnImplicitAnimationsCompleted() override;
-
-  float GetBubbleOpacity() const;
+  // Handles mouse click event or gesture tap event.
+  void HandleClickOrTap();
 
   AppListFolderView* folder_view_;
-  ShowState show_state_;
 
   DISALLOW_COPY_AND_ASSIGN(FolderBackgroundView);
 };
diff --git a/ui/app_list/views/folder_header_view.cc b/ui/app_list/views/folder_header_view.cc
index e71dd35..41860ae 100644
--- a/ui/app_list/views/folder_header_view.cc
+++ b/ui/app_list/views/folder_header_view.cc
@@ -27,10 +27,8 @@
 
 namespace {
 
-constexpr int kPreferredWidth = 360;
-constexpr int kPreferredHeight = 48;
-constexpr int kBottomSeparatorHeight = 1;
-constexpr int kMaxFolderNameWidthFullScreen = 236;
+constexpr int kMaxFolderNameWidth = 204;
+constexpr SkColor kFolderNameColor = SkColorSetARGBMacro(138, 0, 0, 0);
 
 }  // namespace
 
@@ -38,7 +36,7 @@
  public:
   FolderNameView() { SetBorder(views::CreateEmptyBorder(1, 1, 1, 1)); }
 
-  ~FolderNameView() override {}
+  ~FolderNameView() override = default;
 
   void OnFocus() override {
     SelectAll(false);
@@ -66,8 +64,7 @@
   // Make folder name font size 14px.
   folder_name_view_->SetFontList(font_list.DeriveWithSizeDelta(-1));
   folder_name_view_->SetBackgroundColor(SK_ColorTRANSPARENT);
-  folder_name_view_->SetTextColor(kGridTitleColor);
-
+  folder_name_view_->SetTextColor(kFolderNameColor);
   folder_name_view_->set_controller(this);
   AddChildView(folder_name_view_);
 }
@@ -149,10 +146,8 @@
 }
 
 gfx::Size FolderHeaderView::CalculatePreferredSize() const {
-  const int preferred_height = kPreferredHeight +
-                               kBottomSeparatorBottomPadding +
-                               AppsGridView::GetTilePadding().top();
-  return gfx::Size(kPreferredWidth, preferred_height);
+  return gfx::Size(kMaxFolderNameWidth,
+                   folder_name_view_->GetPreferredSize().height());
 }
 
 views::View* FolderHeaderView::GetFolderNameViewForTest() const {
@@ -160,7 +155,7 @@
 }
 
 int FolderHeaderView::GetMaxFolderNameWidth() const {
-  return kMaxFolderNameWidthFullScreen;
+  return kMaxFolderNameWidth;
 }
 
 base::string16 FolderHeaderView::GetElidedFolderName(
@@ -205,26 +200,6 @@
   return false;
 }
 
-void FolderHeaderView::OnPaint(gfx::Canvas* canvas) {
-  views::View::OnPaint(canvas);
-
-  gfx::Rect rect(GetContentsBounds());
-  if (rect.IsEmpty() || !folder_name_visible_)
-    return;
-
-  // Draw bottom separator line.
-  rect.Inset(kAppsGridLeftRightPadding +
-                 (-AppsGridView::GetTilePadding().left()) +
-                 kBottomSeparatorLeftRightPadding,
-             0);
-  int extra_bottom_padding =
-      kBottomSeparatorBottomPadding + AppsGridView::GetTilePadding().top();
-  rect.set_y(rect.bottom() - kBottomSeparatorHeight - extra_bottom_padding);
-  rect.set_height(kBottomSeparatorHeight);
-  SkColor color = kBottomSeparatorColor;
-  canvas->FillRect(rect, color);
-}
-
 void FolderHeaderView::ContentsChanged(views::Textfield* sender,
                                        const base::string16& new_contents) {
   // Temporarily remove from observer to ignore data change caused by us.
diff --git a/ui/app_list/views/folder_header_view.h b/ui/app_list/views/folder_header_view.h
index 52a49a4..5d5cb2f 100644
--- a/ui/app_list/views/folder_header_view.h
+++ b/ui/app_list/views/folder_header_view.h
@@ -68,7 +68,6 @@
   // views::View overrides:
   void Layout() override;
   bool OnKeyPressed(const ui::KeyEvent& event) override;
-  void OnPaint(gfx::Canvas* canvas) override;
 
   // views::TextfieldController overrides:
   void ContentsChanged(views::Textfield* sender,
diff --git a/ui/app_list/views/page_switcher_vertical.cc b/ui/app_list/views/page_switcher.cc
similarity index 66%
rename from ui/app_list/views/page_switcher_vertical.cc
rename to ui/app_list/views/page_switcher.cc
index 05a652a..c14d7c7b 100644
--- a/ui/app_list/views/page_switcher_vertical.cc
+++ b/ui/app_list/views/page_switcher.cc
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "ui/app_list/views/page_switcher_vertical.h"
+#include "ui/app_list/views/page_switcher.h"
 
 #include <algorithm>
 
@@ -34,26 +34,35 @@
 constexpr int kNormalButtonRadius = 3;
 constexpr int kSelectedButtonRadius = 4;
 constexpr int kInkDropRadius = 8;
-// The padding on top/bottom side of each button.
-constexpr int kButtonPadding = 12;
 constexpr int kMaxButtonRadius = 8;
 constexpr int kPreferredButtonStripWidth = kMaxButtonRadius * 2;
-
-// The selected button color.
-constexpr SkColor kSelectedButtonColor = SK_ColorWHITE;
-// The normal button color (54% white).
-constexpr SkColor kNormalColor = SkColorSetA(SK_ColorWHITE, 138);
-constexpr SkColor kInkDropBaseColor = SK_ColorWHITE;
-constexpr SkColor kInkDropRippleColor = SkColorSetA(kInkDropBaseColor, 20);
-constexpr SkColor kInkDropHighlightColor = SkColorSetA(kInkDropBaseColor, 15);
-
 constexpr SkScalar kStrokeWidth = SkIntToScalar(1);
 
+// Constants for the button strip that grows vertically.
+// The padding on top/bottom side of each button.
+constexpr int kVerticalButtonPadding = 12;
+// The selected button color.
+constexpr SkColor kVerticalSelectedButtonColor = SK_ColorWHITE;
+// The normal button color (54% white).
+constexpr SkColor kVerticalNormalColor = SkColorSetA(SK_ColorWHITE, 138);
+constexpr SkColor kVerticalInkDropBaseColor = SK_ColorWHITE;
+constexpr SkColor kVerticalInkDropRippleColor =
+    SkColorSetA(kVerticalInkDropBaseColor, 20);
+constexpr SkColor kVerticalInkDropHighlightColor =
+    SkColorSetA(kVerticalInkDropBaseColor, 15);
+
+// Constants for the button strip that grows horizontally.
+// The padding on left/right side of each button.
+constexpr int kHorizontalButtonPadding = 6;
+// The normal button color (54% black).
+constexpr SkColor kHorizontalNormalColor = SkColorSetA(SK_ColorBLACK, 138);
+
 class PageSwitcherButton : public views::Button {
  public:
-  explicit PageSwitcherButton(views::ButtonListener* listener)
-      : views::Button(listener) {
-    SetInkDropMode(InkDropMode::ON);
+  PageSwitcherButton(views::ButtonListener* listener, bool vertical)
+      : views::Button(listener), vertical_(vertical) {
+    if (vertical)
+      SetInkDropMode(InkDropMode::ON);
   }
 
   ~PageSwitcherButton() override {}
@@ -99,15 +108,15 @@
                      2 * kMaxButtonRadius);
     return std::make_unique<views::FloodFillInkDropRipple>(
         size(), GetLocalBounds().InsetsFrom(bounds),
-        GetInkDropCenterBasedOnLastEvent(), kInkDropRippleColor, 1.0f);
+        GetInkDropCenterBasedOnLastEvent(), kVerticalInkDropRippleColor, 1.0f);
   }
 
   std::unique_ptr<views::InkDropHighlight> CreateInkDropHighlight()
       const override {
     return std::make_unique<views::InkDropHighlight>(
         gfx::PointF(GetLocalBounds().CenterPoint()),
-        std::make_unique<views::CircleLayerDelegate>(kInkDropHighlightColor,
-                                                     kInkDropRadius));
+        std::make_unique<views::CircleLayerDelegate>(
+            kVerticalInkDropHighlightColor, kInkDropRadius));
   }
 
   void NotifyClick(const ui::Event& event) override {
@@ -128,12 +137,13 @@
   PaintButtonInfo BuildPaintButtonInfo() {
     PaintButtonInfo info;
     if (selected_) {
-      info.color = kSelectedButtonColor;
+      info.color =
+          vertical_ ? kVerticalSelectedButtonColor : kHorizontalNormalColor;
       info.style = cc::PaintFlags::kFill_Style;
       info.radius = SkIntToScalar(kSelectedButtonRadius);
       info.stroke_width = SkIntToScalar(0);
     } else {
-      info.color = kNormalColor;
+      info.color = vertical_ ? kVerticalNormalColor : kHorizontalNormalColor;
       info.style = cc::PaintFlags::kStroke_Style;
       info.radius = SkIntToScalar(kNormalButtonRadius);
       info.stroke_width = kStrokeWidth;
@@ -157,6 +167,9 @@
   // If this button is selected, set to true. By default, set to false;
   bool selected_ = false;
 
+  // True if the page switcher button strip should grow vertically.
+  const bool vertical_;
+
   DISALLOW_COPY_AND_ASSIGN(PageSwitcherButton);
 };
 
@@ -167,13 +180,19 @@
 
 }  // namespace
 
-PageSwitcherVertical::PageSwitcherVertical(PaginationModel* model)
-    : model_(model), buttons_(new views::View) {
+PageSwitcher::PageSwitcher(PaginationModel* model, bool vertical)
+    : model_(model), buttons_(new views::View), vertical_(vertical) {
   SetPaintToLayer();
   layer()->SetFillsBoundsOpaquely(false);
 
-  buttons_->SetLayoutManager(std::make_unique<views::BoxLayout>(
-      views::BoxLayout::kVertical, gfx::Insets(), kButtonPadding));
+  if (vertical_) {
+    buttons_->SetLayoutManager(std::make_unique<views::BoxLayout>(
+        views::BoxLayout::kVertical, gfx::Insets(), kVerticalButtonPadding));
+  } else {
+    buttons_->SetLayoutManager(std::make_unique<views::BoxLayout>(
+        views::BoxLayout::kHorizontal, gfx::Insets(),
+        kHorizontalButtonPadding));
+  }
 
   AddChildView(buttons_);
 
@@ -182,68 +201,34 @@
   model_->AddObserver(this);
 }
 
-PageSwitcherVertical::~PageSwitcherVertical() {
-  model_->RemoveObserver(this);
+PageSwitcher::~PageSwitcher() {
+  if (model_)
+    model_->RemoveObserver(this);
 }
 
-int PageSwitcherVertical::GetPageForPoint(const gfx::Point& point) const {
-  if (!buttons_->bounds().Contains(point))
-    return -1;
-
-  gfx::Point buttons_point(point);
-  views::View::ConvertPointToTarget(this, buttons_, &buttons_point);
-
-  for (int i = 0; i < buttons_->child_count(); ++i) {
-    const views::View* button = buttons_->child_at(i);
-    if (button->bounds().Contains(buttons_point))
-      return i;
-  }
-
-  return -1;
-}
-
-void PageSwitcherVertical::UpdateUIForDragPoint(const gfx::Point& point) {
-  int page = GetPageForPoint(point);
-
-  const int button_count = buttons_->child_count();
-  if (page >= 0 && page < button_count) {
-    PageSwitcherButton* button =
-        static_cast<PageSwitcherButton*>(buttons_->child_at(page));
-    button->SetState(views::Button::STATE_HOVERED);
-    return;
-  }
-
-  for (int i = 0; i < button_count; ++i) {
-    PageSwitcherButton* button =
-        static_cast<PageSwitcherButton*>(buttons_->child_at(i));
-    button->SetState(views::Button::STATE_NORMAL);
-  }
-}
-
-gfx::Rect PageSwitcherVertical::GetButtonsBoundsInScreen() {
-  return buttons_->GetBoundsInScreen();
-}
-
-gfx::Size PageSwitcherVertical::CalculatePreferredSize() const {
+gfx::Size PageSwitcher::CalculatePreferredSize() const {
   // Always return a size with correct width so that container resize is not
   // needed when more pages are added.
-  return gfx::Size(kPreferredButtonStripWidth,
-                   buttons_->GetPreferredSize().height());
+  if (vertical_) {
+    return gfx::Size(kPreferredButtonStripWidth,
+                     buttons_->GetPreferredSize().height());
+  }
+  return gfx::Size(buttons_->GetPreferredSize().width(),
+                   kPreferredButtonStripWidth);
 }
 
-void PageSwitcherVertical::Layout() {
+void PageSwitcher::Layout() {
   gfx::Rect rect(GetContentsBounds());
-
-  // Makes |buttons_| vertically center and horizontally fill.
   gfx::Size buttons_size(buttons_->GetPreferredSize());
-  gfx::Rect buttons_bounds(rect.x(),
-                           rect.CenterPoint().y() - buttons_size.height() / 2,
-                           rect.width(), buttons_size.height());
-  buttons_->SetBoundsRect(gfx::IntersectRects(rect, buttons_bounds));
+  rect.ClampToCenteredSize(buttons_size);
+  buttons_->SetBoundsRect(rect);
 }
 
-void PageSwitcherVertical::ButtonPressed(views::Button* sender,
-                                         const ui::Event& event) {
+void PageSwitcher::ButtonPressed(views::Button* sender,
+                                 const ui::Event& event) {
+  if (!model_)
+    return;
+
   for (int i = 0; i < buttons_->child_count(); ++i) {
     if (sender == static_cast<views::Button*>(buttons_->child_at(i))) {
       if (model_->selected_page() == i)
@@ -258,10 +243,13 @@
   }
 }
 
-void PageSwitcherVertical::TotalPagesChanged() {
+void PageSwitcher::TotalPagesChanged() {
+  if (!model_)
+    return;
+
   buttons_->RemoveAllChildViews(true);
   for (int i = 0; i < model_->total_pages(); ++i) {
-    PageSwitcherButton* button = new PageSwitcherButton(this);
+    PageSwitcherButton* button = new PageSwitcherButton(this, vertical_);
     button->SetAccessibleName(l10n_util::GetStringFUTF16(
         IDS_APP_LIST_PAGE_SWITCHER, base::FormatNumber(i + 1),
         base::FormatNumber(model_->total_pages())));
@@ -272,18 +260,17 @@
   Layout();
 }
 
-void PageSwitcherVertical::SelectedPageChanged(int old_selected,
-                                               int new_selected) {
+void PageSwitcher::SelectedPageChanged(int old_selected, int new_selected) {
   if (old_selected >= 0 && old_selected < buttons_->child_count())
     GetButtonByIndex(buttons_, old_selected)->SetSelected(false);
   if (new_selected >= 0 && new_selected < buttons_->child_count())
     GetButtonByIndex(buttons_, new_selected)->SetSelected(true);
 }
 
-void PageSwitcherVertical::TransitionStarted() {}
+void PageSwitcher::TransitionStarted() {}
 
-void PageSwitcherVertical::TransitionChanged() {}
+void PageSwitcher::TransitionChanged() {}
 
-void PageSwitcherVertical::TransitionEnded() {}
+void PageSwitcher::TransitionEnded() {}
 
 }  // namespace app_list
diff --git a/ui/app_list/views/page_switcher.h b/ui/app_list/views/page_switcher.h
index 5cb6c0bc..67348355f 100644
--- a/ui/app_list/views/page_switcher.h
+++ b/ui/app_list/views/page_switcher.h
@@ -5,26 +5,46 @@
 #ifndef UI_APP_LIST_VIEWS_PAGE_SWITCHER_H_
 #define UI_APP_LIST_VIEWS_PAGE_SWITCHER_H_
 
-#include "ui/views/view.h"
+#include "base/macros.h"
+#include "ui/app_list/pagination_model_observer.h"
+#include "ui/views/controls/button/button.h"
 
 namespace app_list {
 
-// PageSwitcher represents its underlying PaginationModel with a button strip.
-// Each page in the PageinationModel has a button in the strip and when the
-// button is clicked, the corresponding page becomes selected.
-class PageSwitcher : public views::View {
+class PaginationModel;
+
+// PageSwitcher represents its underlying PaginationModel with a button
+// strip. Each page in the PageinationModel has a button in the strip and
+// when the button is clicked, the corresponding page becomes selected.
+class PageSwitcher : public views::View,
+                     public views::ButtonListener,
+                     public PaginationModelObserver {
  public:
-  // Returns the page index of the page switcher button under the point. If no
-  // page switcher button is under the point, -1 is return. |point| is in
-  // PageSwitcher's coordinates.
-  virtual int GetPageForPoint(const gfx::Point& point) const = 0;
+  PageSwitcher(PaginationModel* model, bool vertical);
+  ~PageSwitcher() override;
 
-  // Shows hover for button under the point. |point| is in PageSwitcher's
-  // coordinates.
-  virtual void UpdateUIForDragPoint(const gfx::Point& point) = 0;
+  // Overridden from views::View:
+  gfx::Size CalculatePreferredSize() const override;
+  void Layout() override;
 
-  // Gets the screen bounds of the buttons in the page switcher.
-  virtual gfx::Rect GetButtonsBoundsInScreen() = 0;
+ private:
+  // Overridden from views::ButtonListener:
+  void ButtonPressed(views::Button* sender, const ui::Event& event) override;
+
+  // Overridden from PaginationModelObserver:
+  void TotalPagesChanged() override;
+  void SelectedPageChanged(int old_selected, int new_selected) override;
+  void TransitionStarted() override;
+  void TransitionChanged() override;
+  void TransitionEnded() override;
+
+  PaginationModel* model_;  // Owned by AppsGridView.
+  views::View* buttons_;    // Owned by views hierarchy.
+
+  // True if the page switcher button strip should grow vertically.
+  const bool vertical_;
+
+  DISALLOW_COPY_AND_ASSIGN(PageSwitcher);
 };
 
 }  // namespace app_list
diff --git a/ui/app_list/views/page_switcher_vertical.h b/ui/app_list/views/page_switcher_vertical.h
deleted file mode 100644
index 25650aa..0000000
--- a/ui/app_list/views/page_switcher_vertical.h
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef UI_APP_LIST_VIEWS_PAGE_SWITCHER_VERTICAL_H_
-#define UI_APP_LIST_VIEWS_PAGE_SWITCHER_VERTICAL_H_
-
-#include "base/macros.h"
-#include "ui/app_list/pagination_model_observer.h"
-#include "ui/app_list/views/page_switcher.h"
-#include "ui/views/controls/button/button.h"
-
-namespace app_list {
-
-class PaginationModel;
-
-// PageSwitcher represents its underlying PaginationModel with a button strip.
-// Each page in the PageinationModel has a button in the strip and when the
-// button is clicked, the corresponding page becomes selected.
-class PageSwitcherVertical : public PageSwitcher,
-                             public views::ButtonListener,
-                             public PaginationModelObserver {
- public:
-  explicit PageSwitcherVertical(PaginationModel* model);
-  ~PageSwitcherVertical() override;
-
-  // Overridden from PageSwitcher:
-  int GetPageForPoint(const gfx::Point& point) const override;
-  void UpdateUIForDragPoint(const gfx::Point& point) override;
-  gfx::Rect GetButtonsBoundsInScreen() override;
-
-  // Overridden from views::View:
-  gfx::Size CalculatePreferredSize() const override;
-  void Layout() override;
-
- private:
-  // Overridden from views::ButtonListener:
-  void ButtonPressed(views::Button* sender, const ui::Event& event) override;
-
-  // Overridden from PaginationModelObserver:
-  void TotalPagesChanged() override;
-  void SelectedPageChanged(int old_selected, int new_selected) override;
-  void TransitionStarted() override;
-  void TransitionChanged() override;
-  void TransitionEnded() override;
-
-  PaginationModel* model_;  // Owned by AppsGridView.
-  views::View* buttons_;    // Owned by views hierarchy.
-
-  DISALLOW_COPY_AND_ASSIGN(PageSwitcherVertical);
-};
-
-}  // namespace app_list
-
-#endif  // UI_APP_LIST_VIEWS_PAGE_SWITCHER_VERTICAL_H_
diff --git a/ui/gfx/geometry/mojo/BUILD.gn b/ui/gfx/geometry/mojo/BUILD.gn
index f6cda9d..2d0e1efb 100644
--- a/ui/gfx/geometry/mojo/BUILD.gn
+++ b/ui/gfx/geometry/mojo/BUILD.gn
@@ -10,6 +10,8 @@
   sources = [
     "geometry.mojom",
   ]
+
+  check_includes_blink = false
 }
 
 mojom("test_interfaces") {
diff --git a/ui/gl/gl_image_io_surface.mm b/ui/gl/gl_image_io_surface.mm
index 5c7b79ae..b3a2342 100644
--- a/ui/gl/gl_image_io_surface.mm
+++ b/ui/gl/gl_image_io_surface.mm
@@ -39,7 +39,6 @@
     case GL_RG:
     case GL_BGRA_EXT:
     case GL_RGB:
-    case GL_RGB10_A2_EXT:
     case GL_RGB_YCBCR_420V_CHROMIUM:
     case GL_RGB_YCBCR_422_CHROMIUM:
     case GL_RGBA:
diff --git a/ui/gl/sync_control_vsync_provider.cc b/ui/gl/sync_control_vsync_provider.cc
index 6ce9350..2b94e43a 100644
--- a/ui/gl/sync_control_vsync_provider.cc
+++ b/ui/gl/sync_control_vsync_provider.cc
@@ -65,13 +65,9 @@
   // Both Intel and Mali drivers will return TRUE for GetSyncValues
   // but a value of 0 for MSC if they cannot access the CRTC data structure
   // associated with the surface. crbug.com/231945
-  bool prev_invalid_msc = invalid_msc_;
   invalid_msc_ = (media_stream_counter == 0);
-  if (invalid_msc_) {
-    LOG_IF(ERROR, !prev_invalid_msc) << "glXGetSyncValuesOML "
-        "should not return TRUE with a media stream counter of 0.";
+  if (invalid_msc_)
     return false;
-  }
 
   struct timespec real_time;
   clock_gettime(CLOCK_REALTIME, &real_time);
diff --git a/ui/touch_selection/touch_selection_controller.cc b/ui/touch_selection/touch_selection_controller.cc
index 884ea9072..dfbbb4a 100644
--- a/ui/touch_selection/touch_selection_controller.cc
+++ b/ui/touch_selection/touch_selection_controller.cc
@@ -88,12 +88,31 @@
 
   // Swap the Handles when the start and end selection points cross each other.
   if (active_status_ == SELECTION_ACTIVE) {
-    if ((start_selection_handle_->IsActive() &&
-         end_.edge_bottom() == start.edge_bottom()) ||
-        (end_selection_handle_->IsActive() &&
-         end.edge_bottom() == start_.edge_bottom())) {
+    // Bounds have the same orientation.
+    bool need_swap = (start_selection_handle_->IsActive() &&
+                      end_.edge_bottom() == start.edge_bottom()) ||
+                     (end_selection_handle_->IsActive() &&
+                      end.edge_bottom() == start_.edge_bottom());
+
+    // Bounds have different orientation.
+    // Specifically, for writing-mode: vertical-*, selection bounds are
+    // horizontal.
+    // When vertical-lr:
+    //   - start bound is from right to left,
+    //   - end bound is from left to right.
+    // When vertical-rl:
+    //   - start bound is from left to right,
+    //   - end bound is from right to left.
+    // So when previous start/end bound become current end/start bound,
+    // edge_top() and edge_bottom() are swapped. Therefore, we are comparing
+    // edge_bottom() with edge_top() here.
+    need_swap |= (start_selection_handle_->IsActive() &&
+                  end_.edge_bottom() == start.edge_top()) ||
+                 (end_selection_handle_->IsActive() &&
+                  end.edge_bottom() == start_.edge_top());
+
+    if (need_swap)
       start_selection_handle_.swap(end_selection_handle_);
-    }
   }
 
   start_ = start;
diff --git a/ui/touch_selection/touch_selection_controller_unittest.cc b/ui/touch_selection/touch_selection_controller_unittest.cc
index 0056940c..856fe85 100644
--- a/ui/touch_selection/touch_selection_controller_unittest.cc
+++ b/ui/touch_selection/touch_selection_controller_unittest.cc
@@ -147,6 +147,20 @@
     controller_->OnSelectionBoundsChanged(start_bound, end_bound);
   }
 
+  void ChangeVerticalSelection(const gfx::RectF& start_rect,
+                               bool start_visible,
+                               const gfx::RectF& end_rect,
+                               bool end_visible) {
+    gfx::SelectionBound start_bound, end_bound;
+    start_bound.set_type(gfx::SelectionBound::RIGHT);
+    end_bound.set_type(gfx::SelectionBound::LEFT);
+    start_bound.SetEdge(start_rect.origin(), start_rect.bottom_right());
+    end_bound.SetEdge(end_rect.bottom_right(), end_rect.origin());
+    start_bound.set_visible(start_visible);
+    end_bound.set_visible(end_visible);
+    controller_->OnSelectionBoundsChanged(start_bound, end_bound);
+  }
+
   void OnLongPressEvent() {
     controller().HandleLongPressEvent(base::TimeTicks(),
                                           kIgnoredPoint);
@@ -1266,6 +1280,82 @@
             TouchHandleOrientation::RIGHT);
 }
 
+TEST_F(TouchSelectionControllerTest, VerticalTextSelectionHandleSwap) {
+  TouchSelectionControllerTestApi test_controller(&controller());
+  base::TimeTicks event_time = base::TimeTicks::Now();
+  OnLongPressEvent();
+
+  // Horizontal bounds.
+  gfx::RectF start_rect(0, 50, 16, 0);
+  gfx::RectF end_rect(0, 100, 16, 0);
+
+  bool visible = true;
+  ChangeVerticalSelection(start_rect, visible, end_rect, visible);
+  EXPECT_THAT(GetAndResetEvents(), ElementsAre(SELECTION_HANDLES_SHOWN));
+  EXPECT_EQ(start_rect.bottom_right(), GetLastEventStart());
+  EXPECT_EQ(test_controller.GetStartHandleOrientation(),
+            TouchHandleOrientation::RIGHT);
+  EXPECT_EQ(test_controller.GetEndHandleOrientation(),
+            TouchHandleOrientation::LEFT);
+
+  SetDraggingEnabled(true);
+
+  // Simulate moving the base, triggering a swap of points.
+  // Start to drag start handle.
+  MockMotionEvent event(MockMotionEvent::ACTION_DOWN, event_time,
+                        start_rect.right(), start_rect.bottom());
+  EXPECT_TRUE(controller().WillHandleTouchEvent(event));
+  EXPECT_THAT(GetAndResetEvents(), ElementsAre(SELECTION_HANDLE_DRAG_STARTED));
+
+  // Move start handle down below end handle.
+  gfx::RectF offset_rect = end_rect;
+  offset_rect.Offset(gfx::Vector2dF(0, 20));
+  ChangeVerticalSelection(end_rect, visible, offset_rect, visible);
+  EXPECT_THAT(GetAndResetEvents(), ElementsAre(SELECTION_HANDLES_MOVED));
+  EXPECT_EQ(test_controller.GetStartHandleOrientation(),
+            TouchHandleOrientation::RIGHT);
+  EXPECT_EQ(test_controller.GetEndHandleOrientation(),
+            TouchHandleOrientation::RIGHT);
+
+  // Release.
+  event_time += base::TimeDelta::FromMilliseconds(2 * kDefaultTapTimeoutMs);
+  event = MockMotionEvent(MockMotionEvent::ACTION_UP, event_time,
+                          offset_rect.x(), offset_rect.bottom());
+  EXPECT_TRUE(controller().WillHandleTouchEvent(event));
+  EXPECT_THAT(GetAndResetEvents(), ElementsAre(SELECTION_HANDLE_DRAG_STOPPED));
+  EXPECT_EQ(test_controller.GetStartHandleOrientation(),
+            TouchHandleOrientation::RIGHT);
+  EXPECT_EQ(test_controller.GetEndHandleOrientation(),
+            TouchHandleOrientation::LEFT);
+
+  // Move end handle up.
+  // Start to drag end handle.
+  event = MockMotionEvent(MockMotionEvent::ACTION_DOWN, event_time,
+                          offset_rect.x(), offset_rect.bottom());
+  EXPECT_TRUE(controller().WillHandleTouchEvent(event));
+  EXPECT_THAT(GetAndResetEvents(), ElementsAre(SELECTION_HANDLE_DRAG_STARTED));
+
+  // Move up end handle up above the start handle.
+  offset_rect = start_rect;
+  ChangeVerticalSelection(offset_rect, visible, end_rect, visible);
+  EXPECT_THAT(GetAndResetEvents(), ElementsAre(SELECTION_HANDLES_MOVED));
+  EXPECT_EQ(test_controller.GetStartHandleOrientation(),
+            TouchHandleOrientation::LEFT);
+  EXPECT_EQ(test_controller.GetEndHandleOrientation(),
+            TouchHandleOrientation::LEFT);
+
+  // Release.
+  event_time += base::TimeDelta::FromMilliseconds(2 * kDefaultTapTimeoutMs);
+  event = MockMotionEvent(MockMotionEvent::ACTION_UP, event_time,
+                          offset_rect.x(), offset_rect.bottom());
+  EXPECT_TRUE(controller().WillHandleTouchEvent(event));
+  EXPECT_THAT(GetAndResetEvents(), ElementsAre(SELECTION_HANDLE_DRAG_STOPPED));
+  EXPECT_EQ(test_controller.GetStartHandleOrientation(),
+            TouchHandleOrientation::RIGHT);
+  EXPECT_EQ(test_controller.GetEndHandleOrientation(),
+            TouchHandleOrientation::LEFT);
+}
+
 TEST_F(TouchSelectionControllerTest, InsertionActiveBoundMiddlePoint) {
   base::TimeTicks event_time = base::TimeTicks::Now();
   float line_height = 10.f;
diff --git a/ui/webui/resources/polymer_resources.grdp b/ui/webui/resources/polymer_resources.grdp
index 6e5f88e..adfd2d8 100644
--- a/ui/webui/resources/polymer_resources.grdp
+++ b/ui/webui/resources/polymer_resources.grdp
@@ -704,26 +704,6 @@
              file="../../../third_party/polymer/v1_0/components-chromium/paper-material/paper-material-shared-styles.html"
              type="chrome_html"
              compress="gzip" />
-  <structure name="IDR_POLYMER_1_0_PAPER_MENU_PAPER_MENU_EXTRACTED_JS"
-             file="../../../third_party/polymer/v1_0/components-chromium/paper-menu/paper-menu-extracted.js"
-             type="chrome_html"
-             compress="gzip" />
-  <structure name="IDR_POLYMER_1_0_PAPER_MENU_PAPER_MENU_SHARED_STYLES_HTML"
-             file="../../../third_party/polymer/v1_0/components-chromium/paper-menu/paper-menu-shared-styles.html"
-             type="chrome_html"
-             compress="gzip" />
-  <structure name="IDR_POLYMER_1_0_PAPER_MENU_PAPER_MENU_HTML"
-             file="../../../third_party/polymer/v1_0/components-chromium/paper-menu/paper-menu.html"
-             type="chrome_html"
-             compress="gzip" />
-  <structure name="IDR_POLYMER_1_0_PAPER_MENU_PAPER_SUBMENU_EXTRACTED_JS"
-             file="../../../third_party/polymer/v1_0/components-chromium/paper-menu/paper-submenu-extracted.js"
-             type="chrome_html"
-             compress="gzip" />
-  <structure name="IDR_POLYMER_1_0_PAPER_MENU_PAPER_SUBMENU_HTML"
-             file="../../../third_party/polymer/v1_0/components-chromium/paper-menu/paper-submenu.html"
-             type="chrome_html"
-             compress="gzip" />
   <structure name="IDR_POLYMER_1_0_PAPER_PROGRESS_PAPER_PROGRESS_EXTRACTED_JS"
              file="../../../third_party/polymer/v1_0/components-chromium/paper-progress/paper-progress-extracted.js"
              type="chrome_html"
diff --git a/url/mojo/BUILD.gn b/url/mojo/BUILD.gn
index 7d5e5d69..1f77a2f 100644
--- a/url/mojo/BUILD.gn
+++ b/url/mojo/BUILD.gn
@@ -18,6 +18,8 @@
   public_deps = [
     ":url_mojom_gurl",
   ]
+
+  check_includes_blink = false
 }
 
 mojom("test_url_mojom_gurl") {